__float128 is not supported on this target
Asked Answered
G

1

8

I am trying to install sentry server on windows via cygwin. While installing it , it fails with the error:

/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/c++/type_traits:311:39: error: __float128 is not supported on this target
struct __is_floating_point_helper<__float128>
                                  ^

Now on investigating it, I found out that it is relates to the issue of clang supporting the '__float128' on only select target, i.e Before 3.9.0 clang did not support __float128 and prior to 3.9.0 it was defining a type alias as a workaround.

Starting with 3.9.0 clang implemented native __float128 support and the alias workaround was removed. The only targets supporting __float128 at this moment are linux x86_64 and i686

Hence my question, Is there any solution to make this error go away ?

Glazed answered 10/4, 2017 at 6:48 Comment(6)
Find the file bits/c++config.h and edit it so it defines _GLIBCXX_USE_FLOAT128 to 0 instead of 1. Compiling with -std=c++XX instead of -std=gnu++XX may also work. Or using -stdlib=libc++ instead of libstdc++.Clotho
@MarcGlisse I edited _GLIBCXX_USE_FLOAT128 to 0, but it didn't help. can u tell me how can I compile with -std=c++XX instead of -std=gnu++XX m or use -stdlib=libc++ instead of libstdc++Glazed
Oups, sorry, you need to replace it with #undef _GLIBCXX_USE_FLOAT128 instead of defining it to 0.Clotho
@MarcGlisse it is not workingGlazed
You are probably doing it wrong if that isn't working. If you ask the compiler to preprocess the file (flag -E, possibly also -dD), you can check that the file c++config.h that gets included is the one you edited, and what happens in type_traits.Clotho
@MarcGlisse It is done thanks, I just rerun it and it was done :-)Glazed
S
8

In my cygwin64,

$ grep -r _GLIBCXX_USE_FLOAT128 /usr /lib
/usr/include/boost/config/compiler/gcc.hpp:#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
/usr/include/boost/math/tools/config.hpp:#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
/usr/include/boost/multiprecision/detail/number_base.hpp:#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
/usr/lib/gcc/x86_64-pc-cygwin/6.3.0/include/c++/x86_64-pc-cygwin/bits/c++config.h:#define _GLIBCXX_USE_FLOAT128 1
/lib/gcc/x86_64-pc-cygwin/6.3.0/include/c++/type_traits:#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
/lib/gcc/x86_64-pc-cygwin/6.3.0/include/c++/x86_64-pc-cygwin/bits/c++config.h:#define _GLIBCXX_USE_FLOAT128 1

So, change value of _GLIBCXX_USE_FLOAT128 won't help, because other macro checks its existence, not value.

The solution is removing a line containing _GLIBCXX_USE_FLOAT128 from c++config.h.

Septempartite answered 30/5, 2017 at 13:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.