node-spatialite
node-spatialite copied to clipboard
error: call of overloaded ‘isnan(double&)’ is ambiguous
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))
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 will it compile if you change it to std::isnan(x)
?
@doublesharp Yes, it will compile successfully. Thx for fast response !
Same issue here on arch. Using std::isnan() fixes this.