[gdal-dev] building gdal: conflict with sqlite3 version

Even Rouault even.rouault at spatialys.com
Fri Jan 23 04:22:02 PST 2015


Le vendredi 23 janvier 2015 13:07:03, Max Bohnet a écrit :
> Dear gdal experts,
> 
> Under Ubuntu 14, 64bit, i have the python distribution anaconda installed
> in /opt/anaconda
> and want to use the environment
> /opt/anaconda/envs/py27
> source activate py27
> 
> I need gdal with Esri FileGeodatabase support, 

With write support ? If you just need read-only support, the OpenFileGDB 
driver should be good enough.

> so i could not use
> conda install gdal, because this version is built without FGDB-support.
> I had to build it from source using gdal 1.11.1
> with the following options for the ./configure command
> 
> (py27)root at j109817:/opt/drivers/gdal/gdal-1.11.1# ./configure
> --with-fgdb=/opt/drivers/FileGDB_API/ --with-pg
> --with-python=/opt/anaconda/envs/py27/bin/python --with-sqlite3
> --with-spatialite
> 
> this causes a warning of a conflict between the FGDB-driver and the
> libxml2 driver, because the FGDB-driver of Esri comes with another
> libxml2 library as the one in anaconda python.
> If i ignore the warning, there is an error when i type make.

Max, when you report something, "there is an error" is not a description. You 
have to include the full text of the error.

I doubt your error was related to the libxml2 warning. This one is more about 
to warn about potential strange things at runtime.

> 
> So i renamed /opt/anaconda to /opt/anaconda2 and started the building of
> gdal:
> 
> (py27)root at j109817:/opt/drivers/gdal/gdal-1.11.1# ./configure
> --with-fgdb=/opt/drivers/FileGDB_API/ --with-pg
> --with-python=/opt/anaconda2/envs/py27/bin/python --with-sqlite3
> --with-spatialite
> make
> make install
> 
> This installs a package GDAL-1.11.1-py2.7-linux-x86_64.egg into
> /opt/anaconda2/envs/py27/lib/python2.7/site-packages
> 
> and then renamed /opt/anaconda2 back to /opt/anaconda
> 
> when i start python and try to
> 
> from osgeo import gdal
> the following error message appears:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/opt/anaconda/envs/py27/lib/python2.7/site-packages/GDAL-1.11.1-py2.7-linu
> x-x86_64.egg/osgeo/__init__.py", line 21, in <module>
>     _gdal = swig_import_helper()
>   File
> "/opt/anaconda/envs/py27/lib/python2.7/site-packages/GDAL-1.11.1-py2.7-linu
> x-x86_64.egg/osgeo/__init__.py", line 17, in swig_import_helper
>     _mod = imp.load_module('_gdal', fp, pathname, description)
> ImportError: /usr/local/lib/libgdal.so.1: undefined symbol:
> sqlite3_column_table_name

The error seemts to indicate that the sqlite3 lib that GDAL found at configure 
time (likely the system one) had the sqlite3_column_table_name symbol (which 
GDAL can optionally use when available), whereas the one available at runtime 
in your environment has not.
If you want to link against a specific sqlite3 version, you should mention it 
in the --with-sqlite3 option, so as GDAL properly configures against the 
appropriate sqlite3 version. But you would also need the relevant sqlite3 
headers.

> 
> In another Forum i found, that the sqlite3 python package is compiled
> aganist another sqlite version than gdal.
> In Anaconda python 2.7, it seems to be sqlite version 3.8.4.1
> 
> >>> import sqlite3
> >>> sqlite3.sqlite_version
> 
> '3.8.4.1'
> 
> 
> I could find 4 sourcefiles for sqlite 3.8.4.1
> wget
> https://olex-secure.openlogic.com/content/private/5e6a6f0815e830bba705e79e4
> a0470fbee8a5880/sqlite/3.8.4.1/sqlite-amalgamation-3080401.zip unzip
> sqlite-amalgamation-3080401.zip
> gcc shell.c sqlite3.c -lpthread -ldl
> mv "a.out" sqlite3841
> 
> and tried to build gdal against this sqlite3 version with
> ./configure --with-fgdb=/opt/drivers/FileGDB_API/ --with-pg
> --with-python=/opt/anaconda2/envs/py27/bin/python
> --with-sqlite3=/opt/drivers/sqlite/sqlite-amalgamation-3080401/sqlite3481
> --with-spatialite
> 
> but i have no idea, if that makes any sense.
> 
> the error that appears when from osgeo import gdal remains the same.
> 
> any idea what i could do?

It looks like you are going to have big troubles trying to mix things...


> 
> Thanks in advance for any help,
> Max
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list