[math] boost build error: ::log1pl has not been declared

Hello all, cross compiling boost 1.36 for power pc using a gcc-4.0 derivative the math library ends up with the following error: ./boost/math/special_functions/log1p.hpp: In function 'long double boost::math::log1p(long double, const Policy&)': ./boost/math/special_functions/log1p.hpp:342: error: '::log1pl' has not been declared my gcc configuration is: Target: powerpc-linux Configured with: /opt/eldk/build/ppc-2006-01-11/work/usr/src/denx/BUILD/crosstool-0.35/bu ild/gcc-4.0.0-glibc-2.3.5-eldk/powerpc-linux/gcc-4.0.0/configure --target=powerpc-linux --host=i686-host_pc-linux-gnu --prefix=/var/tmp/eldk.BjN6Wo/usr/crosstool/gcc-4.0.0-glibc-2.3.5-eldk/p owerpc-linux --with-headers=/var/tmp/eldk.BjN6Wo/usr/crosstool/gcc-4.0.0-glibc-2.3.5- eldk/powerpc-linux/powerpc-linux/include --with-local-prefix=/var/tmp/eldk.BjN6Wo/usr/crosstool/gcc-4.0.0-glibc-2 .3.5-eldk/powerpc-linux/powerpc-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long Thread model: posix gcc version 4.0.0 (DENX ELDK 4.0 4.0.0) Does anyone have a solution for this? Regards, -- Christian Pfligersdorffer Dipl.-Ing. Bakk.rer.nat. Software Engineering EOS GmbH - Electro Optical Systems Robert-Stirling-Ring 1 D-82152 Krailling / Munich Phone +49 89 893 36-229 Fax +49 89 893 36-287 christian.pfligersdorffer@eos.info http://www.eos.info

Pfligersdorffer, Christian wrote:
Hello all,
cross compiling boost 1.36 for power pc using a gcc-4.0 derivative the math library ends up with the following error:
./boost/math/special_functions/log1p.hpp: In function 'long double boost::math::log1p(long double, const Policy&)': ./boost/math/special_functions/log1p.hpp:342: error: '::log1pl' has not been declared
Strange, Linux should have a ::log1p in math.h? What compiler settings are you using - is there anything that enables/suppresses this definition in math.h? Otherwise possible solutions are: 1) change the line in log1p.hpp that reads #ifdef BOOST_HAS_LOG1P to #if 0 2) create a custom config header following the instructions here: http://www.boost.org/doc/libs/1_36_0/libs/config/doc/html/index.html#boost_c... However, if you can help me find the proper fix so this works "out the box", that would be great. HTH, John.

Hi John, you wrote on Wednesday, September 24, 2008 1:02 PM:
Pfligersdorffer, Christian wrote:
Hello all,
cross compiling boost 1.36 for power pc using a gcc-4.0 derivative the math library ends up with the following error:
./boost/math/special_functions/log1p.hpp: In function 'long double boost::math::log1p(long double, const Policy&)': ./boost/math/special_functions/log1p.hpp:342: error: '::log1pl' has not been declared
Strange, Linux should have a ::log1p in math.h?
log1p is there, it's the long double version log1pl that's missing with my cmath implementation. However boost::math thinks it should be there... maybe BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS must be set on my platform?
What compiler settings are you using - is there anything that enables/suppresses this definition in math.h?
Otherwise possible solutions are:
1) change the line in log1p.hpp that reads #ifdef BOOST_HAS_LOG1P to #if 0 2) create a custom config header following the instructions here: http://www.boost.org/doc/libs/1_36_0/libs/config/doc/html/inde x.html#boost_config.configuring_boost_for_your_platform.using_ the_configure_script
However, if you can help me find the proper fix so this works "out the box", that would be great.
I'll try my best! -- Christian Pfligersdorffer Software Engineering http://www.eos.info

Pfligersdorffer, Christian wrote:
log1p is there, it's the long double version log1pl that's missing with my cmath implementation. However boost::math thinks it should be there... maybe BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS must be set on my platform?
Hmm... only if there are no long double math functions at all, do you have expl powl etc? I just had a quick look at the glibc manual, and it doesn't mention that those functions might sometimes be unsupported, but you never know I guess. If you can mail me you're glibc math.h that might help.
However, if you can help me find the proper fix so this works "out the box", that would be great.
I'll try my best!
Thanks! John.
participants (2)
-
John Maddock
-
Pfligersdorffer, Christian