Error during OTB SuperBuild compilation on Ubuntu 16.04
Description
Error during OTB SuperBuild compilation on Ubuntu 16.04 as described in
https://groups.google.com/forum/#!topic/otb-users/n7PGcgah4Pg
See also #1503 (closed)
Steps to reproduce
I compile OTB in superbuild mode on Ubuntu 16.04 with gcc 5.4.0
I have an error on GEOS :
Scanning dependencies of target GEOS
[ 35%] Creating directories for 'GEOS'
[ 36%] Performing download step (download, verify and extract) for 'GEOS'
-- GEOS download command succeeded. See also /home/cpenard/OSO/iota2/scripts/install/OTB/build/GEOS/src/GEOS-stamp/GEOS-download-*.log
[ 36%] No update step for 'GEOS'
[ 36%] No patch step for 'GEOS'
[ 36%] Performing GEOS_custom_patch step for 'GEOS'
Input patch file: /home/cpenard/OSO/iota2/scripts/install/OTB/OTB/SuperBuild/patches/GEOS/geos-1-fixes-all.diff
patching file cmake/modules/GenerateSourceGroups.cmake
[ 37%] Performing configure step for 'GEOS'
-- GEOS configure command succeeded. See also /home/cpenard/OSO/iota2/scripts/install/OTB/build/GEOS/src/GEOS-stamp/GEOS-configure-*.log
[ 37%] Performing build step for 'GEOS'
CMake Error at /home/cpenard/OSO/iota2/scripts/install/OTB/build/GEOS/src/GEOS-stamp/GEOS-build-Release.cmake:16 (message):
Command failed: 2
'make'
See also
/home/cpenard/OSO/iota2/scripts/install/OTB/build/GEOS/src/GEOS-stamp/GEOS-build-*.log
CMakeFiles/GEOS.dir/build.make:114 : la recette pour la cible « GEOS/src/GEOS-stamp/GEOS-build » a échouée
make[2]: *** [GEOS/src/GEOS-stamp/GEOS-build] Erreur 1
CMakeFiles/Makefile2:744 : la recette pour la cible « CMakeFiles/GEOS.dir/all » a échouée
make[1]: *** [CMakeFiles/GEOS.dir/all] Erreur 2
Makefile:83 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
This error is fixed by change the line 142 in the file platform.h in GEOS archive :
# define ISNAN(x) isnan(x)
By :
# define ISNAN(x) (std ::isnan)(x)
I used these command lines :
git clone https://github.com/orfeotoolbox/OTB
wget https://www.orfeo-toolbox.org/packages/SuperBuild-archives-6.4.tar.bz2
tar -xvjf SuperBuild-archives-6.4.tar.bz2
cd OTB
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS:STRING=-std=c++14 -DUSE_SYSTEM_BOOST=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DOTB_WRAP_PYTHON:BOOL=ON -DGDAL_SB_EXTRA_OPTIONS:STRING="--with-python" -DCMAKE_INSTALL_PREFIX=../install/ -DDOWNLOAD_LOCATION=../SuperBuild-archives/ -DOTB_USE_QWT=ON -DOTB_USE_GLEW=ON -DOTB_USE_GLUT=ON -DOTB_USE_OPENGL=ON ../OTB/SuperBuild/
make
Configuration information
OTB 6.4 on Ubuntu 16.04