[gdal-dev] FileGDB_COMPILE fails during CMake

Jon Morris Jon.Morris at jbarisk.com
Thu Mar 9 07:29:20 PST 2023


So, does the OpenFileGDB driver work in the same way as the FileGDB driver? The build appeared to work, but when I try and use it in a Python shell, I get the following error.

>>> from osgeo import gdal
>>> drv=gdal.GetDriverByName('OpenFileGDB')
>>> ds=drv.Create('/data/test.gdb',0,0,0)
ERROR 6: Only vector datasets supported

I've tried leaving out the x/y size and nbands parameters, but they are required.

Looking at the source code (https://github.com/OSGeo/gdal/blob/release/3.6/gcore/gdaldriver.cpp#L225) there seems to be a create capability check before using the vector creation option. Is there a way to set this when creating the driver?

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.
-----Original Message-----
From: Scott <public at postholer.com> 
Sent: 27 February 2023 16:03
To: Jon Morris <Jon.Morris at jbarisk.com>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] FileGDB_COMPILE fails during CMake

CAUTION: This email originated from outside of JBA and contains one or more links. DO NOT click links unless you recognise the sender's email address and are absolutely certain that the content is safe.
See the Phishing page on IMS on SP for more information about how to spot and report suspicious messages.

WARNING: The sender of this email could not be validated and may not match the person in the "From" field.

3.6 has read, write, update and create abilities using the builtin OpenFIleGDB. Building from source on linux I don't specify anything.

On 2/27/23 00:37, Jon Morris wrote:
> Does that mean we should no longer attempt to use the FileGDB API? Our 
> tool makes quite heavy use of FileGDB so we'd have to do something 
> like this every time a user wants to use it:
>
> if GDAL_VERSION >= (3, 6):
> driver = 'OpenFileGDB'
> else:
> driver = 'FileGDB'
>
> Jon
>
> e: ​  *Jon.Morris at jbarisk.com* <mailto:Jon.Morris at jbarisk.com>
> d:    +44 (0)1756 587229
> t:    *+44 (0)1756 799919* <tel:+44%20(0)1756%20799919>
>
>
> *www.jbarisk.com* <http://www.jbarisk.com/>
>
> Facebook <https://www.facebook.com/TheFloodPeople>
>
>
> LinkedIn <https://www.linkedin.com/company/jba-risk-management/>
>
>
> Twitter <https://twitter.com/JBARisk>
>
>
> YouTube <https://www.youtube.com/channel/UC0iatom2jYbW96voW0rlpCw>
>
>
>
> 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.
>
> -----Original Message-----
> From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of Scott
> Sent: 24 February 2023 16:44
> To: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] FileGDB_COMPILE fails during CMake
>
> CAUTION: This email originated from outside of JBA and contains one or 
> more links. DO NOT click links unless you recognise the sender's email 
> address and are absolutely certain that the content is safe.
> See the Phishing page on IMS on SP for more information about how to 
> spot and report suspicious messages.
>
> With gdal >= 3.6 OpenFileGDB is built in by default, no need for 
> external API.
>
>
>
> On 2/24/23 08:37, Jon Morris wrote:
>  > 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 <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* <mailto:Jon.Morris at jbarisk.com>  > d: 
> +44 (0)1756 587229  > t: *+44 (0)1756 799919* 
> <tel:+44%20(0)1756%20799919>  >  >  > *www.jbarisk.com* 
> <http://www.jbarisk.com/>  >  > Facebook 
> <https://www.facebook.com/TheFloodPeople>
>  >
>  >
>  > LinkedIn <https://www.linkedin.com/company/jba-risk-management/>
>  >
>  >
>  > Twitter <https://twitter.com/JBARisk>  >  >  > YouTube 
> <https://www.youtube.com/channel/UC0iatom2jYbW96voW0rlpCw>
>  >
>  >
>  >
>  > 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.
>  >
>  >
>  > _______________________________________________
>  > gdal-dev mailing list
>  > gdal-dev at lists.osgeo.org
>  > https://lists.osgeo.org/mailman/listinfo/gdal-dev
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image243819.png
Type: image/png
Size: 9321 bytes
Desc: image243819.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image952942.png
Type: image/png
Size: 651 bytes
Desc: image952942.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image304634.png
Type: image/png
Size: 715 bytes
Desc: image304634.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image845049.png
Type: image/png
Size: 966 bytes
Desc: image845049.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image220436.png
Type: image/png
Size: 784 bytes
Desc: image220436.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230309/106a4fb9/attachment-0009.png>


More information about the gdal-dev mailing list