SuperBuild fails to build on Ubuntu 20.04 and 22.04
Running in docker.io/ubuntu:20.04
or :22.04
:
$ apt update -y && apt upgrade -y && cat Docker/system-dependencies.txt | DEBIAN_FRONTEND=noninteractive xargs apt-get install -y --no-install-recommends && apt install -y patch perl python3-setuptools git --no-install-recommends
[snip]
$ cmake ../SuperBuild -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DOTB_WRAP_PYTHON=OFF -DOTB_WRAP_QGIS=OFF
[snip]
$ cmake --build . --parallel $(nproc)
[snip]
Scanning dependencies of target GDAL
[ 92%] Creating directories for 'GDAL'
[ 92%] Performing download step (download, verify and extract) for 'GDAL'
-- GDAL download command succeeded. See also /home/grayshade/Projects/otb/build/GDAL/src/GDAL-stamp/GDAL-download-*.log
[ 93%] No update step for 'GDAL'
[ 93%] No patch step for 'GDAL'
[ 94%] Performing configure step for 'GDAL'
-- GDAL configure command succeeded. See also /home/grayshade/Projects/otb/build/GDAL/src/GDAL-stamp/GDAL-configure-*.log
[ 94%] Performing build step for 'GDAL'
-- GDAL build command succeeded. See also /home/grayshade/Projects/otb/build/GDAL/src/GDAL-stamp/GDAL-build-*.log
[ 95%] Performing install step for 'GDAL'
-- GDAL install command succeeded. See also /home/grayshade/Projects/otb/build/GDAL/src/GDAL-stamp/GDAL-install-*.log
[ 95%] Completed 'GDAL'
[ 95%] Built target GDAL
Scanning dependencies of target OTB
[ 95%] Creating directories for 'OTB'
[ 96%] No download step for 'OTB'
[ 96%] No patch step for 'OTB'
[ 96%] No update step for 'OTB'
[ 97%] Performing configure step for 'OTB'
CMake Error at /home/grayshade/Projects/otb/build/OTB/src/OTB-stamp/OTB-configure-RelWithDebugInfo.cmake:49 (message):
Command failed: 1
'env' 'CC=/usr/bin/cc' 'CXX=/usr/bin/c++' '/usr/bin/cmake' '-GUnix Makefiles' '-DCURL_INCLUDE_DIR:PATH=/home/grayshade/Projects/otb/superbuild_install/include' '-DCURL_LIBRARY:FILEPATH=/home/grayshade/Projects/otb/superbuild_install/lib/libcurl.so' '-DGSL_INCLUDE_DIR:PATH=/home/grayshade/Projects/otb/superbuild_install/include' '-DGSL_LIBRARY:FILEPATH=/home/grayshade/Projects/otb/superbuild_install/lib/libgsl.so' '-DITK_DIR:PATH=/home/grayshade/Projects/otb/superbuild_install/lib/cmake/ITK-4.13' '-DTINYXML_INCLUDE_DIR:PATH=/home/grayshade/Projects/otb/superbuild_install/include' '-DTINYXML_LIBRARY:FILEPATH=/home/grayshade/Projects/otb/superbuild_install/lib/libtinyxml.so' '-DBoost_INCLUDE_DIR:PATH=/home/grayshade/Projects/otb/superbuild_install/include' '-GUnix Makefiles' '-C/home/grayshade/Projects/otb/build/OTB/tmp/OTB-cache-RelWithDebugInfo.cmake' '/home/grayshade/Projects/otb/SuperBuild/..'
See also
/home/grayshade/Projects/otb/build/OTB/src/OTB-stamp/OTB-configure-*.log
make[2]: *** [CMakeFiles/OTB.dir/build.make:115: OTB/src/OTB-stamp/OTB-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:833: CMakeFiles/OTB.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
$ cat /home/grayshade/Projects/otb/build/OTB/src/OTB-stamp/OTB-configure-err.log
Setting GDAL_CONFIG_CHECKING to ON. (all GDAL tests will run again)
CMake Error at Modules/ThirdParty/GDAL/otb-module-init.cmake:51 (message):
Performing Test GDAL_VERSION - Failed
Call Stack (most recent call first):
Modules/ThirdParty/GDAL/otb-module-init.cmake:76 (error_message)
Modules/ThirdParty/GDAL/otb-module-init.cmake:91 (gdal_try_run)
CMake/OTBModuleEnablement.cmake:285 (include)
CMakeLists.txt:308 (include)
I also tried -DOTB_WRAP_PYTHON=ON -DOTB_WRAP_QGIS=OFF
on 24.04, just to spice things up:
CMake Error at CMake/OTBModuleAPI.cmake:79 (message):
No such module: "OTBQGIS"
Call Stack (most recent call first):
CMake/OTBModuleAPI.cmake:46 (otb_module_load)
CMake/OTBModuleAPI.cmake:100 (_otb_module_config_recurse)
build/OTB/build/OTBConfig.cmake:133 (otb_module_config)
Utilities/Completion/CMakeLists.txt:21 (find_package)
Edited by Laurențiu Nicola