#2526 closed Bugs (fixed)
More architectures that do not support long double math
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | math |
Version: | Boost 1.37.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi,
The header math/tools/config.hpp defines BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS in a number of cases, some of which are the OS (cygwin, FreeBSD, NetBSD) and one is the CPU (hppa).
While building Boost for 14 CPU architectures of Debian, I needed to add ARM and MIPS to this list, both of which come in two flavours: little endian and big endian.
I'm not sure how to decide whether it is the CPU that prevents long doubles from working regardless of OS, or whether it is due to Linux on the CPU. So I took the simpler option and make the exception based on CPU alone.
Attachments (1)
Change History (10)
by , 14 years ago
Attachment: | math_tools_config.patch added |
---|
comment:1 by , 14 years ago
Component: | None → math |
---|---|
Owner: | set to |
follow-up: 3 comment:2 by , 14 years ago
Status: | new → assigned |
---|
comment:3 by , 14 years ago
Replying to johnmaddock:
This is the Debian Linux distro that has the issues?
Yes. The build failures were observed on the official package builds (I'm one of the maintainers of the Boost packages for Debian). The problem appeared in 1.36.0 but I didn't notice until a few weeks ago.
Have you run the tests to verify that long double support is broken on these combinations of glibc and processor - out of interest what's the issue - no true long double functions in glibc? If the latter I wonder if there is some way to detect that (either glibc or libstdc++ config macro?
What tests are you referring to?
My evidence is simply that the math library failed to compile on these architectures: the common symptom is that log1p1() isn't declared; e.g.
./boost/math/special_functions/log1p.hpp:342: error: '::log1pl' has not been declared
To be honest, I did not look any further. All the build logs are available (c.f. http://tinyurl.com/5fz9ok) and looking at those for 1.36.0-1, I can see that MIPSEL (failure) and i386 (success) both have identical versions of libc6-dev, g++, and libstdc++6-dev.
follow-up: 5 comment:4 by , 14 years ago
OK, log1pl and expm1l are slightly different issues as they're part of C99 rather than C++03. Are you able to tell if _GLIBCXX_USE_C99 is defined on the problem platforms?
Thanks, John.
comment:5 by , 14 years ago
Replying to johnmaddock:
OK, log1pl and expm1l are slightly different issues as they're part of C99 rather than C++03. Are you able to tell if _GLIBCXX_USE_C99 is defined on the problem platforms?
I have checked 4 of the five problem architectures -- none of them define _GLIBCXX_USE_C99; I have no access to the fifth architecture (hppa). I also checked a random sampling of other ("successful") architectures in Debian (alpha, amd64, i386, powerpc, and sparc) and found they all defined the symbol as 1.
Hope that helps.
-Steve
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Hopefully this changeset: https://svn.boost.org/trac/boost/changeset/50055/trunk/boost will now fix this.
I'm closing the issue for now, but please reopen if theres still a problem.
John.
comment:7 by , 14 years ago
There is a missing backslash on one line of the patch. Fix attached.
Index: boost/math/special_functions/fpclassify.hpp =================================================================== --- boost/math/special_functions/fpclassify.hpp (revision 50082) +++ boost/math/special_functions/fpclassify.hpp (working copy) @@ -166,7 +166,7 @@ return BOOST_FPCLASSIFY_PREFIX fpclassify(t); } #if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) \ - && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) + && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ && !(defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) // The native fpclassify broken for long doubles with aCC // use portable one instead....
comment:9 by , 14 years ago
<nelchael> "XML is like violence, if it doesn't solve the problem, just
use more."
- nelchael hides
acquista viagra in italia fioricet rx quanto costa comprare cialis generico tramadol relieve pain
Thanks for the info Steven, just to clarify:
Thanks, John.