[gdal-dev] GDAL 2.0.2 & gpkg woes

Alan Stewart astewart at terragotech.com
Wed May 4 06:36:02 PDT 2016


Libspatialite. The new GDAL 2.0.2 DLL I've been given fails in spatialite initialization when attempting to create a new vector geopackage, whether from my application code or ogr2ogr. The original question was whether something has changed in GDAL 2.0.2 that requires a change in how libspatialite/sqlite is built or is there something wrong with our GDAL 2.0.2 build. We have a libspatialite 4.2.0 DLL, and on Even's suggestion have built a new 4.3.0a DLL. Both work fine with our GDAL 1.11.0 DLL, but fail in the same way with the GDAL 2.0.2 DLL.

LOADABLE_EXTENSION was something I had to ask about, being unfamiliar with the GDAL source. We've always left LOADABLE_EXTENSION undefined in our libspatialite build and continue to do so.

From what I've learned it seems the issue must be our GDAL 2.0.2 build. It's actually being built by a developer on the other side of the world. I'm building sqlite/libspatialite. We share a repository between us. The other developer ported our GDAL customizations from 1.11.0 to 2.0.2 and built it. For various reasons it's not practical at this time for me to throw this issue back at the other developer. I need to have a  reasonable idea of what to ask him to change first. I'm in the process of comparing the source and build files between the two, looking for a difference that could matter.

Would supplying the /LTCG flag when building ogr.lib make difference? Our GDAL 1.11.0 build does not have this, but for some reason the other developer added this to ogr/makefile.vc. From what I understand of it I would only expect this flag when building an EXE or DLL.

Alan Stewart
Senior Software Engineer
TerraGo Technologies
3200 Windy Hill Road, Suite 1550W
Atlanta, GA 30339 USA
O.  +1 678.391.9615

-----Original Message-----
From: Brad Hards [mailto:bradh at frogmouth.net] 
Sent: Tuesday, May 03, 2016 6:46 PM
To: Alan Stewart; 'Even Rouault'; gdal-dev at lists.osgeo.org
Subject: RE: [gdal-dev] GDAL 2.0.2 & gpkg woes

> The libspatialite code where the failure occurs is only executed when 
> spatialite is built with LOADABLE_EXTENSION undefined. Is there any 
> possibility that the new gpkg code depends on this being defined?
> LOADABLE_EXTENSION does not appear anywhere in the GDAL source.

Are you trying to link to mod_spatialite or libspatialite ?


More information about the gdal-dev mailing list