GDAL Superbuild fails when building the KEA driver
By default the KEA GDAL driver is built by GDAL if
libkea is found on the system. This leads to the following error in the SuperBuild if
libkea is found.
/usr/bin/ld: warning: libkea.so.1.4, needed by /tmp/SuperBuild/GDAL/src/GDAL/.libs/libgdal.so, not found (try using -rpath or -rpath-link) /tmp/SuperBuild/GDAL/src/GDAL/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::getImageBandClrInterp(unsigned int)' /tmp/SuperBuild/GDAL/src/GDAL/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::readImageBlock2BandMask(unsigned int, void*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, kealib::KEADataType)' [...]
This can be reproduced in a conda environment :
conda create -n pykea -c conda-forge python=3.7 kealib conda activate pykea cmake ~/OTB/otb/SuperBuild/ -DCMAKE_INSTALL_PREFIX=/tmp/install -DCMAKE_PREFIX_PATH=/tmp/install make GDAL -j12
In the SuperBuild, drivers should not be built depending what libraries are installed on the system. Only the drivers corresponding to the SuperBuild dependencies should be built. Most drivers are specifically disabled in the Superbuild using the
--with-driver=kea should be adde din this case. If an user wants to use an exotic GDAL driver with OTB he should compile its own version of GDAL and set
Maybe an issue should be opened on GDAL on the kea driver compilation though.