<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 25, 2017 at 2:44 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:monospace;font-size:9pt;font-weight:400;font-style:normal"><span class="gmail-m_3163566851651949922gmail-">
<p style="margin:0px;text-indent:0px">On mardi 25 avril 2017 14:26:46 CEST Sean Gillies wrote:</p>
<p style="margin:0px;text-indent:0px">> Hi Even,</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> 2.2.0beta2 fails to build on my macbook. Here is the error:</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> cpl_conv.cpp:2060:9: error: use of undeclared identifier 'isnan'; did you</p>
<p style="margin:0px;text-indent:0px">> mean 'std::isnan'?</p>
<p style="margin:0px;text-indent:0px">>     if( CPLIsNan(dfAngle) )</p>
<p style="margin:0px;text-indent:0px">>         ^</p>
<p style="margin:0px;text-indent:0px">> /Users/sean/code/frs-wheel-bui<wbr>lds/parts/gdal__compile__/gdal<wbr>-2.2.0/port/cpl_</p>
<p style="margin:0px;text-indent:0px">> port.h:687:23: note: expanded from macro 'CPLIsNan'</p>
<p style="margin:0px;text-indent:0px">> #  define CPLIsNan(x) isnan(x)</p>
<p style="margin:0px;text-indent:0px">>                       ^</p>
<p style="margin:0px;text-indent:0px">> /usr/include/c++/4.2.1/cmath:5<wbr>51:5: note: 'std::isnan' declared here</p>
<p style="margin:0px;text-indent:0px">>     isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(_<wbr>_f); }</p>
<p style="margin:0px;text-indent:0px">>     ^</p>
<p style="margin:0px;text-indent:0px">> 1 error generated.</p>
<p style="margin:0px;text-indent:0px"> </p>
</span><p style="margin:0px;text-indent:0px">Hi Sean,</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">ah damned isnan issues...</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Can you try the following patch:</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Index: port/cpl_port.h</p>
<p style="margin:0px;text-indent:0px">==============================<wbr>==============================<wbr>=======</p>
<p style="margin:0px;text-indent:0px">--- port/cpl_port.h       (revision 38115)</p>
<p style="margin:0px;text-indent:0px">+++ port/cpl_port.h       (working copy)</p>
<p style="margin:0px;text-indent:0px">@@ -653,8 +653,7 @@</p>
<p style="margin:0px;text-indent:0px"> #  define CPLIsNan(x) _isnan(x)</p>
<p style="margin:0px;text-indent:0px"> #  define CPLIsInf(x) (!_isnan(x) && !_finite(x))</p>
<p style="margin:0px;text-indent:0px"> #  define CPLIsFinite(x) _finite(x)</p>
<p style="margin:0px;text-indent:0px">-#elif defined(__cplusplus) && defined(__MINGW32__) &&  __GNUC__ == 4 && __GNUC_MINOR__ == 2</p>
<p style="margin:0px;text-indent:0px">-/* Hack for compatibility with ancient i586-mingw32msvc toolchain */</p>
<p style="margin:0px;text-indent:0px">+#elif defined(__cplusplus) && ((defined(__MINGW32__) &&  __GNUC__ == 4 && __GNUC_MINOR__ == 2) || HAVE_CXX11)</p>
<p style="margin:0px;text-indent:0px"> extern "C++" {</p>
<p style="margin:0px;text-indent:0px"> #include <cmath></p>
<p style="margin:0px;text-indent:0px"> static inline int CPLIsNan(float f) { return std::isnan(f); }</p></div></blockquote></div><br>That works for cpl_conv.cpp. My next set of failures:</div><div class="gmail_extra"><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_extra">cplstring.cpp:458:26: error: no member named 'back' in 'CPLString'</div></div><div class="gmail_extra"><div class="gmail_extra">            if( osNewURL.back() == '&'</div></div><div class="gmail_extra"><div class="gmail_extra">                ~~~~~~~~ ^</div></div><div class="gmail_extra"><div class="gmail_extra">cplstring.cpp:459:29: error: no member named 'back' in 'CPLString'</div></div><div class="gmail_extra"><div class="gmail_extra">                || osNewURL.back() == '?' )</div></div><div class="gmail_extra"><div class="gmail_extra">                   ~~~~~~~~ ^</div></div><div class="gmail_extra"><div class="gmail_extra">cplstring.cpp:470:23: error: no member named 'back' in 'CPLString'</div></div><div class="gmail_extra"><div class="gmail_extra">            if( osURL.back() != '&' && osURL.back() != '?' )</div></div><div class="gmail_extra"><div class="gmail_extra">                ~~~~~ ^</div></div><div class="gmail_extra"><div class="gmail_extra">cplstring.cpp:470:46: error: no member named 'back' in 'CPLString'</div></div><div class="gmail_extra"><div class="gmail_extra">            if( osURL.back() != '&' && osURL.back() != '?' )</div></div><div class="gmail_extra"><div class="gmail_extra">                                       ~~~~~ ^</div></div><div class="gmail_extra"><div class="gmail_extra">4 errors generated.</div></div></blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">This seems to be related to: <a href="https://github.com/OSGeo/gdal/commit/3ed7812f95de1b2d9a6e6bc93717a522df765377" target="_blank">https://github.com/OSGeo/gdal/<wbr>commit/<wbr>3ed7812f95de1b2d9a6e6bc93717a5<wbr>22df765377</a>. Maybe HAVE_CXX11 isn't guaranteeing all the expected C++11 features?</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br><div class="gmail-m_3163566851651949922gmail_signature"><div dir="ltr">Sean Gillies</div></div>
</div></div>