Closed bmw2621 closed 6 years ago
I got the same error trying to build.
I'm running python 3.6.5 on Ubuntu 18.04 machine. I have the following module installed
cycler==0.10.0
kiwisolver==1.0.1
matplotlib==2.2.2
numpy==1.15.0
pyparsing==2.2.0
pyproj==1.9.5.1
pyshp==1.2.12
python-dateutil==2.7.3
pytz==2018.5
six==1.11.0
However, I manged to compile by adding #define HAVE_ISNAN 1
to include/geos/platform.h
after running configure. See this advice for details.
This error seems familiar... like something I have seen years ago... when did you download the source code?
On Mon, Jul 30, 2018 at 9:38 AM, Émile Nadeau notifications@github.com wrote:
I got the same error trying to build.
I'm running python 3.6.5 on Ubuntu 18.04 machine. I have the following module installed
cycler==0.10.0 kiwisolver==1.0.1 matplotlib==2.2.2 numpy==1.15.0 pyparsing==2.2.0 pyproj==1.9.5.1 pyshp==1.2.12 python-dateutil==2.7.3 pytz==2018.5 six==1.11.0
However, I manged to compile by adding #define HAVE_ISNAN 1 to include/geos/platform.h after running configure. See this advice https://askubuntu.com/a/1024475/854984 for details.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/415#issuecomment-408866008, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-GxRG_xyN7H3Lq-3ZDpWiIB6VCxaks5uLww_gaJpZM4VlUTP .
I downloaded it yesterday on the release page.
I got it to work, thanks.
For my own learning... what did changing that do?
I am unable to reproduce the problem, and I am pretty certain this has already been fixed at some other point. I am going to close this issue.
I had the same issue when trying to install geos-3.3.3 following the procedure of https://matplotlib.org/basemap/users/installing.html in a (standard) Python3.6 Docker image (which itself is built on Debian Stretch) and which has g++-6.3.0 installed.
I didn't like modifying the platform.h file as proposed above, so I searched for another solution, which I found here: https://gis.stackexchange.com/questions/289409/error-building-geos-on-ubuntu-18-04. The first answer proposes:
Work-around by setting:
export CXX="g++ -std=c++98"
before running ./configure
And that worked for me!
By the way, according to a comment on that post "If you are using the latest version of g++ with old headers, it could be causing the problem." So I guess another solution would be to use a newer version of geos?
I have been searching for days trying to figure out why I cannot make the package, with no luck. I am following the instructions for a linux install. When I input make, the end of the log returns.
``In file included from ../../../include/geos/geom/Geometry.h:26:0, from IndexedPointInAreaLocator.cpp:18: ../../../include/geos/platform.h:110:2: error: #error "Can not compile without isnan function or macro"
error "Can not compile without isnan function or macro"
^~~~~ In file included from ../../../include/geos/geom/Coordinate.h:161:0, from ../../../include/geos/geom/Envelope.h:26, from ../../../include/geos/geom/Geometry.h:28, from IndexedPointInAreaLocator.cpp:18: ../../../include/geos/geom/Coordinate.inl: In member function 'bool geos::geom::Coordinate::isNull() const': ../../../include/geos/geom/Coordinate.inl:39:10: error: 'ISNAN' was not declared in this scope return (ISNAN(x) && ISNAN(y) && ISNAN(z)); ^~~~~ ../../../include/geos/geom/Coordinate.inl:39:10: note: suggested alternative: 'SNAN' return (ISNAN(x) && ISNAN(y) && ISNAN(z)); ^~~~~ SNAN ../../../include/geos/geom/Coordinate.inl: In member function 'bool geos::geom::Coordinate::equals3D(const geos::geom::Coordinate&) const': ../../../include/geos/geom/Coordinate.inl:83:21: error: 'ISNAN' was not declared in this scope ((z == other.z)||(ISNAN(z) && ISNAN(other.z))); ^~~~~ ../../../include/geos/geom/Coordinate.inl:83:21: note: suggested alternative: 'SNAN' ((z == other.z)||(ISNAN(z) && ISNAN(other.z))); ^~~~~ SNAN Makefile:373: recipe for target 'IndexedPointInAreaLocator.lo' failed make[4]: [IndexedPointInAreaLocator.lo] Error 1 make[4]: Leaving directory '/home/ben/Downloads/basemap-1.1.0/geos-3.3.3/src/algorithm/locate' Makefile:392: recipe for target 'all-recursive' failed make[3]: [all-recursive] Error 1 make[3]: Leaving directory '/home/ben/Downloads/basemap-1.1.0/geos-3.3.3/src/algorithm/locate' Makefile:444: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/home/ben/Downloads/basemap-1.1.0/geos-3.3.3/src/algorithm' Makefile:476: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/ben/Downloads/basemap-1.1.0/geos-3.3.3/src' Makefile:368: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 ``
I cant figure out what the problem causing the errors relating to ISNAN.
Please help.