QGIS adapters cause issues with SuperBuild
Description
- building using SuperBuild without
OTB_WRAP_QGIS
fails at the configure step:
CMake Error at CMake/OTBModuleAPI.cmake:69 (message):
No such module: "OTBQGIS"
Call Stack (most recent call first):
CMake/OTBModuleAPI.cmake:44 (otb_module_load)
CMake/OTBModuleAPI.cmake:88 (_otb_module_config_recurse)
build/OTB/build/OTBConfig.cmake:99 (otb_module_config)
Utilities/Completion/CMakeLists.txt:21 (find_package)
- building using SuperBuild with
OTB_WRAP_QGIS
works initially (perhaps?), but fails on a second build:
[ 87%] ./bin/otbQgisDescriptor OpticalCalibration lib/otb/applications ./share/otb/description/
[ 87%] ./bin/otbQgisDescriptor BundleToPerfectSensor lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor Pansharpening lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ReadImageInfo lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ExtractROI lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor DynamicConvert lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor CompareImages lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ConcatenateImages lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ManageNoData lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor Rasterization lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataTransform lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor Mosaic lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor ResetMargin lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataExtractROI lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 90%] ./bin/otbQgisDescriptor ConcatenateVectorData lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataSetField lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor ZonalStatistics lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor OrthoRectification lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor RigidTransformResample lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor Superimpose lib/otb/applications ./share/otb/description/
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:416: share/otb/description/OpticalCalibration.txt] Error 127
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:196: share/otb/description/BundleToPerfectSensor.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:424: share/otb/description/Pansharpening.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor ImageEnvelope lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor VectorDataReprojection lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor ColorMapping lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor MultiResolutionPyramid lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor Quicklook lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:280: share/otb/description/ExtractROI.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor TileFusion lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor Synthetize lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor SplitImage lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor PixelValue lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:452: share/otb/description/ReadImageInfo.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:228: share/otb/description/ConcatenateImages.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:208: share/otb/description/CompareImages.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:372: share/otb/description/ManageNoData.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:448: share/otb/description/Rasterization.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:268: share/otb/description/DynamicConvert.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:392: share/otb/description/Mosaic.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:456: share/otb/description/ResetMargin.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:592: share/otb/description/VectorDataTransform.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:608: share/otb/description/ZonalStatistics.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:460: share/otb/description/RigidTransformResample.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:420: share/otb/description/OrthoRectification.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:232: share/otb/description/ConcatenateVectorData.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:580: share/otb/description/VectorDataExtractROI.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:588: share/otb/description/VectorDataSetField.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:540: share/otb/description/Superimpose.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:332: share/otb/description/ImageEnvelope.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:204: share/otb/description/ColorMapping.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:544: share/otb/description/Synthetize.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:400: share/otb/description/MultiResolutionPyramid.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:440: share/otb/description/Quicklook.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:432: share/otb/description/PixelValue.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:528: share/otb/description/SplitImage.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:584: share/otb/description/VectorDataReprojection.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:548: share/otb/description/TileFusion.txt] Error 127
gmake[4]: *** [CMakeFiles/Makefile2:11482: Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/all] Error 2
gmake[3]: *** [Makefile:156: all] Error 2
gmake[2]: *** [CMakeFiles/OTB.dir/build.make:87: OTB/src/OTB-stamp/OTB-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:974: CMakeFiles/OTB.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
I do have libtiff
already built in the current directory:
TIFF/build/libtiff/libtiff.so
TIFF/build/libtiff/libtiff.so.6
TIFF/build/libtiff/libtiff.so.6.0.2
My workaround was to do something like below, but it isn't ideal, of course:
cmake --build . --parallel $(nproc); cp OTB/build/lib/libOTBSampling-9.0.so.1 ../superbuild_install/lib/libOTBSampling-9.0.so.1; cp OTB/build/lib/otb/applications/otbapp_SampleAugmentation.so ../superbuild_install/lib/otb/applications/otbapp_SampleAugmentation.so
Steps to reproduce
$ mkdir build
$ cd build
$ ccmake ../SuperBuild # choose your favourite settings
$ cmake --build . --parallel $(nproc)
Configuration information
Fedora 39, tested at c302db4e