Re: [boost] [Boost-commit] svn:boost r66442 - in trunk/boost: math/tools test test/impl

Hi ! On Sunday, 7. November 2010 21:05:06 admin@thefireflyproject.us wrote:
Author: wash Date: 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) New Revision: 66442 URL: http://svn.boost.org/trac/boost/changeset/66442
Log: Clang hand-holding, mostly for issues caused by Clang defining GCC macros.
I do not think that removing the inclusion of "fenv.h" for clang is the right solution. According to http://llvm.org/bugs/show_bug.cgi?id=6907 it is a known compiler bug that clang fails to correctly load "fenv.h" in certain environments (several gcc versions installed...) I've been working around this by simply adding (see below)
Text files modified: trunk/boost/math/tools/config.hpp | 2 +- trunk/boost/test/execution_monitor.hpp | 15 ++++++++------- trunk/boost/test/impl/execution_monitor.ipp | 18 +++++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-)
Modified: trunk/boost/math/tools/config.hpp =========================================================================== === --- trunk/boost/math/tools/config.hpp (original) +++ trunk/boost/math/tools/config.hpp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) @@ -255,7 +255,7 @@ } // namespace tools }} // namespace boost namespace math
-#if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__) +#if (defined(__linux__) && !defined(__UCLIBC__) && !defined(__clang__)) || defined(__QNX__) || defined(__IBMCPP__)
#include <fenv.h>
#if defined(__clang__) #include </usr/include/fenvh.> #else for my local working copies.
return ~old_cw & BOOST_FPE_ALL; -#elif defined(__GLIBC__) && defined(__USE_GNU) +#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG)
::feclearexcept(BOOST_FPE_ALL);
And this actually removes fp-Support from Boost.Test. Not good. Please find a better solution. And/Or mark the relevant places with Todo containing a reference to the clang bug report. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sunday, 7. November 2010 21:05:06 admin@thefireflyproject.us wrote:
Author: wash Date: 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) New Revision: 66442 URL:
Log: Clang hand-holding, mostly for issues caused by Clang defining GCC macros.
I do not think that removing the inclusion of "fenv.h" for clang is the right solution.
The issue isn't just that clang can't find the header.
According to http://llvm.org/bugs/show_bug.cgi?id=6907 it is a known compiler bug that clang fails to correctly load "fenv.h" in certain environments (several gcc versions installed...)
Exactly; and in some environments, it loads the right header, and chokes on it. All depends on your platform/version of clang/standard library.
I've been working around this by simply adding (see below)
I have fixed this issue in my github fork of clang; however, the majority of clang users use clang 2.8 or clang 2.7, and that's where we've got problems.
Text files modified: trunk/boost/math/tools/config.hpp | 2 +- trunk/boost/test/execution_monitor.hpp | 15 ++++++++------- trunk/boost/test/impl/execution_monitor.ipp | 18 +++++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-)
Modified: trunk/boost/math/tools/config.hpp =========================================================================== === --- trunk/boost/math/tools/config.hpp (original) +++ trunk/boost/math/tools/config.hpp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) @@ -255,7 +255,7 @@ } // namespace tools }} // namespace boost namespace math
-#if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__) +#if (defined(__linux__) && !defined(__UCLIBC__) && !defined(__clang__)) || defined(__QNX__) || defined(__IBMCPP__)
#include <fenv.h>
#if defined(__clang__) #include </usr/include/fenvh.> #else
Well, part of the problem is the location of fenv.h. It's a lot easier for me to just fix the issue.
for my local working copies.
return ~old_cw & BOOST_FPE_ALL; -#elif defined(__GLIBC__) && defined(__USE_GNU) +#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG)
::feclearexcept(BOOST_FPE_ALL);
And this actually removes fp-Support from Boost.Test.
Yes, it does (remove it for clang). I'm working on a longer term solution.
Not good.
Yep.
Please find a better solution.
As I said, working on it ;). - -- Bryce Lelbach aka wash http://groups.google.com/group/ariel_devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkzXDmoACgkQO/fqqIuE2t538ACg3P6vJYunrIv/66mX8hrZchM+ lzkAoKFNPlaHg29HcW/5ITE+9dP9pow5 =F2hr -----END PGP SIGNATURE-----

Bryce Lelbach <admin <at> thefireflyproject.us> writes:
And this actually removes fp-Support from Boost.Test.
Yes, it does (remove it for clang). I'm working on a longer term solution.
The Trunk regression tests are failing all over the place with errors like ../boost/test/execution_monitor.hpp:361: error: ???FE_DIVBYZERO??? was not declared in this scope Is the change to execution_monitor.hpp correct? It looks like fenv.h will currently only be included if both __CYGWIN__ and BOOST_CLANG are defined.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 8 Nov 2010 12:27:32 +0000 (UTC) Richard Webb <richard.webb@boldonjames.com> wrote:
Bryce Lelbach <admin <at> thefireflyproject.us> writes:
And this actually removes fp-Support from Boost.Test.
Yes, it does (remove it for clang). I'm working on a longer term solution.
The Trunk regression tests are failing all over the place with errors like
../boost/test/execution_monitor.hpp:361: error: ???FE_DIVBYZERO??? was not declared in this scope
Is the change to execution_monitor.hpp correct? It looks like fenv.h will currently only be included if both __CYGWIN__ and BOOST_CLANG are defined.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Whoops; my bad. I've written a workaround header that should ensure that we can safely include fenv.h on clang. It works on the platforms I have locally; I am comitting it to the trunk so it will go through the test matrix. The header is <boost/detail/fenv.hpp> - -- Bryce Lelbach aka wash http://groups.google.com/group/ariel_devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkzYBbcACgkQO/fqqIuE2t4lzQCZAXfs0Q8OIFkd/66Ija9pt6jL x+oAn3c2Zlo66YvFL/aqxuLUcUs8xz5W =iU/3 -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Replied to this in Boost.Devel. On Sun, 7 Nov 2010 21:26:53 +0100 Jürgen Hunold <juergen.hunold@ivembh.de> wrote:
Hi !
On Sunday, 7. November 2010 21:05:06 admin@thefireflyproject.us wrote:
Author: wash Date: 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) New Revision: 66442 URL: http://svn.boost.org/trac/boost/changeset/66442
Log: Clang hand-holding, mostly for issues caused by Clang defining GCC macros.
I do not think that removing the inclusion of "fenv.h" for clang is the right solution. According to http://llvm.org/bugs/show_bug.cgi?id=6907 it is a known compiler bug that clang fails to correctly load "fenv.h" in certain environments (several gcc versions installed...) I've been working around this by simply adding (see below)
Text files modified: trunk/boost/math/tools/config.hpp | 2 +- trunk/boost/test/execution_monitor.hpp | 15 ++++++++------- trunk/boost/test/impl/execution_monitor.ipp | 18 +++++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-)
Modified: trunk/boost/math/tools/config.hpp =========================================================================== === --- trunk/boost/math/tools/config.hpp (original) +++ trunk/boost/math/tools/config.hpp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010) @@ -255,7 +255,7 @@ } // namespace tools }} // namespace boost namespace math
-#if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__) +#if (defined(__linux__) && !defined(__UCLIBC__) && !defined(__clang__)) || defined(__QNX__) || defined(__IBMCPP__)
#include <fenv.h>
#if defined(__clang__) #include </usr/include/fenvh.> #else
for my local working copies.
return ~old_cw & BOOST_FPE_ALL; -#elif defined(__GLIBC__) && defined(__USE_GNU) +#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG)
::feclearexcept(BOOST_FPE_ALL);
And this actually removes fp-Support from Boost.Test.
Not good.
Please find a better solution. And/Or mark the relevant places with Todo containing a reference to the clang bug report.
Yours,
Jürgen
- -- Bryce Lelbach aka wash http://groups.google.com/group/ariel_devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkzXENEACgkQO/fqqIuE2t5fsACgwpcpFY3FfS8rKho6GhFMoAwL Xx0AoKpFvcrRpchggFgwNVqUa5f92P6C =qgAx -----END PGP SIGNATURE-----
participants (3)
-
Bryce Lelbach
-
Jürgen Hunold
-
Richard Webb