1.88.0 build fails on powerpc64le-linux-gnu with IEEE long double
The 1.88.0 build fails on powerpc64le-linux-gnu with IEEE long double enabled. It still succeeds with with IBM long double. The 1.83.0 build succeeds with both long double configurations.
a failing build log can be found at https://launchpad.net/ubuntu/+source/boost1.88/1.88.0-1ubuntu2/+build/30693987/+files/buildlog_ubuntu-questing-ppc64el.boost1.88_1.88.0-1ubuntu2_BUILDING.txt.gz
however it's non-obvious what exactly is failing ... any hint?
There seems to be two issues in this bug
- The build silently fails when charconv library build fails (the logs say that the targets have been skipped, but the exit status from the build process is 1 meaning not successful, and therefore the over build fails). If we run the build with b2 again, we can see the error particularly in the charconv library
- Redefinition of functions in charconv library. When ieeelongdouble is enabled, the types for long double and __float128 is essentially the same during compilation and we see the following error
/home/avinashj/src/boost_1.88_src/libs/charconv/build/../src/to_chars_float_impl.hpp:849:17: error: redefinition of ‘boost::charconv::to_chars_result boost::charconv::detail::to_chars_float_impl(char*, char*, Real, boost::charconv::chars_format, int) [with Real = long double]’
849 | to_chars_result to_chars_float_impl(char* first, char* last, __float128 value, chars_format fmt, int precision) noexcept
| ^~~~~~~~~~~~~~~~~~~
/home/avinashj/src/boost_1.88_src/libs/charconv/build/../src/to_chars_float_impl.hpp:776:17: note: ‘boost::charconv::to_chars_result boost::charconv::detail::to_chars_float_impl(char*, char*, Real, boost::charconv::chars_format, int) [with Real = long double]’ previously declared here
776 | to_chars_result to_chars_float_impl(char* first, char* last, long double value, chars_format fmt, int precision) noexcept
| ^~~~~~~~~~~~~~~~~~~
specifically the macros BOOST_CHARCONV_HAS_QUADMATH and BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE are defined and undefined respectively, and therefore both definitions move on for compilation after pre-processing which causes this specific error. Small note: In some architectures like IA-64 __float128 is an alias for long double (more details here: https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html.), so this error would happen there as well. For example, in x86 platform if -mlong-double-128 compiler option is used (however here error happens at assembly stage rather than at compile stage).
@doko42 , please let me know in case we need to investigate this further for why both macros are turned on during compilation.
that would be nice for a first successful build
The errors mention "charconv", @mborland might know.
@doko42 Can you please give https://github.com/boostorg/charconv/pull/278 a try if you have a chance? I added an extra configuration macro that checks for the number of mantissa bits in a long double on PPC64 which should tell us if you're using IEEE754 ldbl or IBM128 ldbl.
please see https://launchpad.net/~doko/+archive/ubuntu/toolchain/+sourcepub/17487487/+listing-archive-extra it looks that the build is progressing further, but it still fails
Sorry for the noise; the linked PR should be good now. I have local dockers running PPC64LE with IBM128 and IEEE128 and both build and run fine with the updated PR.
it's running longer, now having a 5.7MB compressed build log, but unfortunately again, without any visible error message. please see https://launchpad.net/~doko/+archive/ubuntu/toolchain/+build/31057161
Any chance you could try building boost from source on that platform using either B2 or Cmake? It should give us the error messages.
requested in https://bugs.debian.org/1110432, I'm not the original maintainer
Thanks. In the meantime I pushed another attempt at a fix to the linked PR. Once again it runs fine locally on QEMU ppc64le with Docker, but I have not been able to replicate the original bug.
@mborland Perhaps you can try adding "-mabi=ieeelongdouble" to the CFLAGS and CXXFLAGS, and try to compile to see this error. I think by default it is just using the ibmlongdouble and so you are not able to reproduce it.
https://launchpad.net/ubuntu/+source/boost1.88/1.88.0-1ubuntu4 builds fine
the applied patch is http://launchpadlibrarian.net/809518464/boost1.88_1.88.0-1ubuntu3_1.88.0-1ubuntu4.diff.gz
I have updated the linked PR to match the applied patch.
Merged for 1.89 release