Created attachment 476512 [details, diff] gdal isnan workaround for gcc-5.4 Compilation of dev-games/flightgear-2017.2.1 (which enables -std=c++11) with gdal (2.0.2 or 2.0.3) fails: In file included from /usr/include/gdal/cpl_conv.h:35:0, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile_gdal.cxx:39: /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile_gdal.cxx: In member function 'void SGDemTile::doWarp(int, char*, GDALDatasetH, char**, char**)': /usr/include/gdal/cpl_port.h:395:30: error: 'isnan' was not declared in this scope # define CPLIsNan(x) isnan(x) ^ /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile_gdal.cxx:547:13: note: in expansion of macro 'CPLIsNan' if (CPLIsNan(dfReal)) ^ /usr/include/gdal/cpl_port.h:395:30: note: suggested alternative: # define CPLIsNan(x) isnan(x) ^ /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile_gdal.cxx:547:13: note: in expansion of macro 'CPLIsNan' if (CPLIsNan(dfReal)) ^ In file included from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/constants.h:35:0, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/math/SGGeod.hxx:21, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile.hxx:10, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemRoot.hxx:5, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDem.hxx:31, from /tmp/portage/dev-games/simgear-2017.2.1/work/simgear-2017.2.1/simgear/scene/dem/SGDemTile_gdal.cxx:46: /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/cmath:641:5: note: 'std::isnan' isnan(_Tp __x) ^ This seems to be already resolved upstream in some newer versions (see URL) but I tried that patch and it doesn't work, obviously, since it requires gdal user to define HAVE_CXX11... So I propose attached patch instead (check GCC and __cplusplus >= 201103L).
Created attachment 476514 [details] emerge --info
Fixed with bump to 2.2.3. https://github.com/gentoo/gentoo/commit/bfe3c66ba7340f890a0d70dc0b1d02a18c4f6668