[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47212] Faddeeva build failure: need better co
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #47212] Faddeeva build failure: need better configure test for std::isinf / std::isnan |
Date: |
Thu, 03 Mar 2016 17:56:58 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0.2 |
Update of bug #47212 (project octave):
Status: None => Confirmed
Summary: Faddeeva build failure due to unresolved namespace
=> Faddeeva build failure: need better configure test for std::isinf /
std::isnan
_______________________________________________________
Follow-up Comment #3:
Yes, the intention is to use std::isinf and std::isnan when building under
C++11, see
http://hg.savannah.gnu.org/hgweb/octave/file/0196666bf900/liboctave/cruft/Faddeeva/Faddeeva.cc#l184
The way it tells that the compiler is building to the C++11 standard is by the
value of the __cplusplus macro. Unfortunately, gcc 4.6 doesn't do this
correctly (probably because it was still early in the development to the
standard).
With gcc 4.6 on Ubuntu 12.04:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror
--with-arch-32=i686 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
$ gcc -x c++ -dM -E <(:) | grep __cplusplus
#define __cplusplus 1
$ gcc -x c++ -std=gnu++0x -dM -E <(:) | grep __cplusplus
#define __cplusplus 1
These macros are supposed to be
$ gcc -x c++ -dM -E <(:) | grep __cplusplus
#define __cplusplus 199711L
$ gcc -x c++ -std=gnu++11 -dM -E <(:) | grep __cplusplus
#define __cplusplus 201103L
So the logic in Fadeeva.cc is failing here. I think this could actually be
improved by checking for std::isinf and std::isnan in configure rather than
relying on the C++ version.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47212>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47212] Faddeeva build failure: need better configure test for std::isinf / std::isnan,
Mike Miller <=