Failed to build gdal using gcc 5.2.1
Building with
cd /tmp && \
git clone git@gitlab.kitware.com:cmb/cmb-superbuild.git && \
pushd cmb-superbuild && \
git submodule init && \
git submodule update --recursive && \
popd && \
mkdir cmb-superbuild-build && \
cd cmb-superbuild-build
cmake \
-DUSE_SYSTEM_qt5:BOOL=1 \
-DUSE_SYSTEM_python:BOOL=1 \
-DQt5_DIR:PATH=/home/jcfr/Software/Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5 \
-DENABLE_cmbusersguide:BOOL=0 \
-DENABLE_opencv:BOOL=0 \
-DENABLE_smtk:BOOL=0 \
-DENABLE_smtkusersguide:BOOL=0 \
-DBUILD_TESTING:BOOL=0 \
../cmb-superbuild
make -j5
[...]
[ 11%] Performing build step for 'gdal'
CMake Error at /tmp/cmb-superbuild-build/superbuild/gdal/stamp/gdal-build-Release.cmake:16 (message):
Command failed: 1
'/home/jcfr/Software/cmake-3.9.0-Linux-x86_64/bin/cmake' '-P' '/tmp/cmb-superbuild-build/superbuild/sb-gdal-build.cmake'
See also
/tmp/cmb-superbuild-build/superbuild/gdal/stamp/gdal-build-*.log
leads to the following error:
$ cat /tmp/cmb-superbuild-build/superbuild/gdal/stamp/gdal-build-err.log
In file included from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdal.h:41:0,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdal_priv.h:53,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdalmajorobject.cpp:30:
/tmp/cmb-superbuild-build/superbuild/gdal/src/port/cpl_port.h:382:12: error: ‘constexpr bool std::isnan(double)’ conflicts with a previous declaration
using std::isnan;
^
In file included from /usr/include/features.h:364:0,
from /usr/include/stdio.h:27,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/port/cpl_port.h:143,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdal.h:41,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdal_priv.h:53,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/gcore/gdalmajorobject.cpp:30:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:234:1: note: previous declaration ‘int isnan(double)’
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
^
In file included from /tmp/cmb-superbuild-build/superbuild/gdal/src/port/cpl_minixml.h:33:0,
from /tmp/cmb-superbuild-build/superbuild/gdal/src/ogr/gml2ogrgeometry.cpp:41:
/tmp/cmb-superbuild-build/superbuild/gdal/src/port/cpl_port.h:382:12: error: ‘constexpr bool std::isnan(double)’ conflicts with a previous declaration
using std::isnan;
^
[...]