[gdal-dev] GDAL 2.2.0 beta 2 available

Even Rouault even.rouault at spatialys.com
Tue Apr 25 05:44:06 PDT 2017


On mardi 25 avril 2017 14:26:46 CEST Sean Gillies wrote:
> Hi Even,
> 
> 2.2.0beta2 fails to build on my macbook. Here is the error:
> 
> cpl_conv.cpp:2060:9: error: use of undeclared identifier 'isnan'; did you
> mean 'std::isnan'?
>     if( CPLIsNan(dfAngle) )
>         ^
> /Users/sean/code/frs-wheel-builds/parts/gdal__compile__/gdal-2.2.0/port/cpl_
> port.h:687:23: note: expanded from macro 'CPLIsNan'
> #  define CPLIsNan(x) isnan(x)
>                       ^
> /usr/include/c++/4.2.1/cmath:551:5: note: 'std::isnan' declared here
>     isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
>     ^
> 1 error generated.

Hi Sean,

ah damned isnan issues...

Can you try the following patch:

Index: port/cpl_port.h
===================================================================
--- port/cpl_port.h	(revision 38115)
+++ port/cpl_port.h	(working copy)
@@ -653,8 +653,7 @@
 #  define CPLIsNan(x) _isnan(x)
 #  define CPLIsInf(x) (!_isnan(x) && !_finite(x))
 #  define CPLIsFinite(x) _finite(x)
-#elif defined(__cplusplus) && defined(__MINGW32__) &&  __GNUC__ == 4 && __GNUC_MINOR__ == 2
-/* Hack for compatibility with ancient i586-mingw32msvc toolchain */
+#elif defined(__cplusplus) && ((defined(__MINGW32__) &&  __GNUC__ == 4 && __GNUC_MINOR__ == 2) || HAVE_CXX11)
 extern "C++" {
 #include <cmath>
 static inline int CPLIsNan(float f) { return std::isnan(f); }



Even
-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170425/e3357036/attachment.html>


More information about the gdal-dev mailing list