Boost logo

Boost :

Subject: Re: [boost] [trippels-ppc64le][math] Missing quadmath.h errors
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-11-16 07:33:30


On 2015-11-16 14:47, John Maddock wrote:
>
>
> On 16/11/2015 10:48, Andrey Semashev wrote:
>> Hi,
>>
>> I'm seeing some test failures on the trippels-powerpc64le-gcc-6.0
>> tester that amount to Boost.Math failing to build because the
>> quadmath.h header is missing.
>>
>> http://www.boost.org/development/tests/develop/developer/output/trippels-powerpc64le-gcc-6-0-boost-bin-v2-libs-log-test-filt_matches_spirit_qi-test-gcc-6-0-0-release-build-no-threading-multi.html
>>
>>
>> I understand that gcc 6.0 is an unreleased compiler, but the error is
>> probably not a consequence of a compiler bug. Besides, another tester,
>> Flast-FreeBSD10-gcc-6.0.0~gnu++11, passes. Is it possible that the
>> header is not provided for powerpc64le? Or is an optional dependency
>> whose presence is misdetected? Is this a known problem?
>>
>
> Not a known problem, no.
>
> My understanding is that libquadmath is an integral part of GCC, and I
> see that BOOST_HAS_FLOAT128 is defined for that platform - and that's
> predicated on _GLIBCXX_USE_FLOAT128 so __float128 appears to be
> supported? The GCC manual is a little unclear to me when this is
> supposed to be supported:
> https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html.
>
> What happens on that platform with older (released) compilers?

I really don't know as I don't have access to a PPC machine. But after
installing gcc 5.2.1 cross-compilers for ppc64le, aarch64, armhf on my
local Kubuntu I couldn't find quadmath.h for these architectures - only
the x86 and x86_64 ones. Also, the release notes for gcc 4.6 [1] only
mention x86, x86-64 and Itanium as the platforms that support
libquadmath. Looking at the gcc package build scripts in Ubuntu there's
definitely some special casing regarding quadmath for these
architectures: ia64 i386 i486 i586 i686 amd64.

My understanding is that gcc may support __float128 type, which probably
includes only the arithmetic/relational operators. libquadmath
implements math functions for these types (sin, cos, etc.), and it may
not support the architecture where gcc supports __float128. So it has to
be detected separately.

I would suggest using __has_include when possible and hard-locking to
x86, x86-64 and IA64 when not.

[1]: https://gcc.gnu.org/gcc-4.6/changes.html


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk