[gdal-dev] FileGDB_COMPILE fails during CMake

Jon Morris Jon.Morris at jbarisk.com
Fri Feb 24 08:37:29 PST 2023


Hi all,

I've been upgrading our build script from autotools to CMake and I've almost got it working, except for FileGDB. I've added the cmake parameters  -DFileGDB_ROOT=/usr/local/FileGDB_API -DFileGDB_INCLUDE_DIR=/usr/local/FileGDB_API/include and the paths are correct. The earlier FileGDB install stage is the same as in https://github.com/OSGeo/gdal/blob/release/3.6/.github/workflows/ubuntu_20.04/build-deps.sh.
(I've also tried /usr/include for the include path with the same result).

When I run CMake, I get the following lines in the log (irrelevant lines have been removed):

-- Performing Test TEST_FileGDB_COMPILE
-- Performing Test TEST_FileGDB_COMPILE - Failed
-- Found FileGDB: /usr/local/FileGDB_API/lib/libFileGDBAPI.so

-- Enabled drivers and features and found dependency packages
-- The following features have been enabled:

* ogr_FILEGDB, FileGDB

-- The following OPTIONAL packages have been found:

* FileGDB
   Enable FileGDB (based on closed-source SDK) driver

[ 82%] Building CXX object ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbDatasource.cpp.o
[ 82%] Building CXX object ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbDriver.cpp.o
[ 82%] Building CXX object ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbLayer.cpp.o
[ 82%] Building CXX object ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbResultLayer.cpp.o
[ 82%] Building CXX object ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbUtils.cpp.o
[ 82%] Built target ogr_FileGDB

[ 94%] Linking CXX shared library libgdal.so
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: ogr/ogrsf_frmts/filegdb/CMakeFiles/ogr_FileGDB.dir/FGdbDatasource.cpp.o: in function FGdbDataSource::DeleteLayer(int)':
FGdbDatasource.cpp:(.text+0x12b0): undefined reference to `FileGDBAPI::Geodatabase::Delete(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'

Many more undefined reference errors follow.

Does anyone know what could be going wrong here and what else I can try to debug it? I'm all out of ideas.

Many thanks,

Jon

e: Jon.Morris at jbarisk.com
d:+44 (0)1756 587229
t: +44 (0)1756 799919
www.jbarisk.com
All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. 
JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, England.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image913050.png
Type: image/png
Size: 9321 bytes
Desc: image913050.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image698461.png
Type: image/png
Size: 651 bytes
Desc: image698461.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image868662.png
Type: image/png
Size: 715 bytes
Desc: image868662.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image762809.png
Type: image/png
Size: 966 bytes
Desc: image762809.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image658687.png
Type: image/png
Size: 784 bytes
Desc: image658687.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230224/71ec8850/attachment-0009.png>


More information about the gdal-dev mailing list