node-spatialite icon indicating copy to clipboard operation
node-spatialite copied to clipboard

error: call of overloaded ‘isnan(double&)’ is ambiguous

Open doublesharp opened this issue 8 years ago • 4 comments

I was unable to install the module on my CentOS7 machine with the error: error:

call of overloaded ‘isnan(double&)’ is ambiguous

My C++ skills leave alot to be desired, but I think the issue is that isnan() was added to a recent version and there is now a conflict. By editing the file /src/spatialite/deps/geos/config/linux/ia32/geos/platform.h and change line 88 from:

# define ISNAN(x) (isnan(x))

to:

# define ISNAN(x) (std::isnan(x))

doublesharp avatar Dec 10 '16 04:12 doublesharp

I had similar problems on my Elementary OS Loki. I am not able to compile it during installation.

../src/spatialite/deps/geos/config/linux/x64/geos/platform.h:88:27: error: ‘isnan’ was not declared in this scope
 # define ISNAN(x) (isnan(x))

jborysewicz avatar Feb 10 '17 09:02 jborysewicz

@jborysewicz will it compile if you change it to std::isnan(x)?

doublesharp avatar Feb 15 '17 18:02 doublesharp

@doublesharp Yes, it will compile successfully. Thx for fast response !

jborysewicz avatar Feb 15 '17 19:02 jborysewicz

Same issue here on arch. Using std::isnan() fixes this.

christophgysin avatar Jul 24 '17 07:07 christophgysin