#784 closed defect (fixed)
g++ 6 isnan issues
Reported by: | rsbivand | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 3.5.1 |
Component: | Default | Version: | 3.5.0 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
Further to https://lists.osgeo.org/pipermail/geos-devel/2016-March/007433.html, and success with the suggested patch for 3.5.0 for some of the make, on Fedora 24, g++ 6.1.1 20160621, I see later on, in tests/xmltester:
g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos -I../../include -I../../src/io/tinyxml -DTIXML_USE_STL -DGEOS_INLINE -g -O2 -MT XMLTester-XMLTester.o -MD -MP -MF .deps/XMLTester-XMLTester.Tpo -c -o XMLTester-XMLTester.o `test -f 'XMLTester.cpp' || echo './'`XMLTester.cpp In file included from ../../include/geos/geom/Point.h:25:0, from XMLTester.cpp:27: ../../include/geos/geom/Coordinate.inl: In member function ‘bool geos::geom::Coordinate::isNull() const’: ../../include/geos/platform.h:90:27: error: ‘isnan’ was not declared in this scope # define ISNAN(x) (isnan(x)) ^ ../../include/geos/geom/Coordinate.inl:38:10: note: in expansion of macro ‘ISNAN’ return (ISNAN(x) && ISNAN(y) && ISNAN(z)); ^~~~~ ../../include/geos/platform.h:90:27: note: suggested alternative: # define ISNAN(x) (isnan(x)) ^ ../../include/geos/geom/Coordinate.inl:38:10: note: in expansion of macro ‘ISNAN’ return (ISNAN(x) && ISNAN(y) && ISNAN(z)); ^~~~~ In file included from ../../include/geos/geom/Coordinate.inl:22:0, from ../../include/geos/geom/Coordinate.h:158, from ../../include/geos/geom/Envelope.h:25, from ../../include/geos/geom/Geometry.h:27, from ../../include/geos/geom/Point.h:26, from XMLTester.cpp:27: /usr/include/c++/6.1.1/cmath:655:5: note: ‘std::isnan’ isnan(_Tp __x) ^~~~~
This means that 3.5.0 cannot be built on Fedora 24 without further changes to configure.ac, and possibly elsewhere, to pass through the settings seen earlier in the make process.
Attachments (1)
Change History (12)
comment:1 by , 8 years ago
Priority: | major → blocker |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
The GCC 6 isnan issue is causing a Release Critical bug in the geos Debian package too, Debian Bug #831177 reported by Lucas Nussbaum.
It looks like the std::isnan
change from r4169 also needs to be applied to include/geos/platform.h.in
to use that instead of plain isnan
. attachment:gcc6-isnan.patch fixes this issue for the Debian package with GCC 6.1.1 from Debian unstable (in addition to the change from r4169).
by , 8 years ago
Attachment: | gcc6-isnan.patch added |
---|
comment:8 by , 8 years ago
Confirmed resolved for Fedora 24, and #4229, GEOS builds cleanly, and rgeos builds and checks as expected. Thanks for fixing this!
Work-around by setting:
before running ./configure (without the patch, from the release tarball).