[gdal-dev] Problem to compile in Lucid with Spatialite 3.0 and gdal 1.9

Frank Broniewski brfr at metrico.lu
Tue Jan 24 02:39:59 EST 2012


Just a quick guesst: Did you install the development files for sqlite?


Am 24.01.2012 02:32, schrieb Thomas Gratier:
> Hello all,
>
> I've done some tests to build gdal 1.9.0 in Ubuntu 10.04 (Lucid)
> I've build proj 3.3.2, Sqlite 3.3.10, Free XL 1.0.0b, libspatialite
> amalgation 3.0.0, spatialite-tools 3.0.0
> No problem with sqlite alone.
>
> #####################################################
> My main problem is when I compile gdal for spatialite support.
> #####################################################
>
> I do
>
> ./configure --with-geos=yes --with-python --with-spatialite=yes
> --with-sqlite3=yes --with-curl=/usr/bin/
> --with-pg=/usr/lib/postgresql/9.0/bin/pg_config
> make
>
> and I get
>
> ...
> libtool: link: g++ .libs/gdalinfo.o -o .libs/gdalinfo
> /home/thomas/compile/gdal-1.9.0/.libs/libgdal.so -L/usr/local/lib
> -L/usr/lib /usr/lib/libodbc.so /usr/lib/libodbcinst.so /usr/lib/libexpat.so
> -lxerces-c /usr/lib/libNCSEcw.so /usr/lib/libNCSEcwC.so
> /usr/lib/libNCSCnet.so /usr/lib/libNCSUtil.so /usr/lib/libjasper.so
> -lnetcdf /usr/lib/libhdf5.so /usr/lib/libmfhdfalt.so /usr/lib/libdfalt.so
> -logdi /usr/lib/libgif.so /usr/lib/libjpeg.so -lpng -lpq -lz -lrt
> /usr/local/lib/libspatialite.so -lpthread -ldl /usr/local/lib/libfreexl.so
> /usr/local/lib/libgeos_c.so /usr/local/lib/libgeos.so /usr/lib/libproj.so
> -lm /usr/lib/libcurl-gnutls.so
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_bind_int'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_double'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_exec'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_text'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_bind_double'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_bind_blob'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_step'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_get_table'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_open'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_free_table'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_reset'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_vfs_find'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_bytes'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_clear_bindings'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_blob'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_vfs_unregister'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to
> `sqlite3_last_insert_rowid'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to
> `sqlite3_libversion_number'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_name'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_prepare'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_vfs_register'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_int'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_prepare_v2'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_finalize'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_bind_text'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_count'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_close'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to
> `sqlite3_column_decltype'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_column_type'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_errmsg'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_bind_null'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_free'
> gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_open_v2'
>
> With the ./configure, the return was
> SQLite support:            yes
> SpatiaLite support:        yes
>
> Doing
>
> ldd /home/thomas/compile/gdal-1.9.0/.libs/libgdal.so|grep lite
> return
> libspatialite.so.2 =>  /usr/local/lib/libspatialite.so.2 (0x012ec000)
>
>
> #############################################################
> The same case without --with-spatialite=yes
> no problem in the make, but no spatialite support
> #############################################################
>
> ./configure --with-geos=yes --with-python --with-sqlite3=yes
> --with-curl=/usr/bin/ --with-pg=/usr/lib/postgresql/9.0/bin/pg_config
> make
>
> Doing
>
> ldd /home/thomas/compile/gdal-1.9.0/.libs/libgdal.so|grep lite
> return
> libsqlite3.so.0 =>  /usr/local/lib/libsqlite3.so.0 (0x0040f000)
>
> ########
> Question
> ########
>
> I suppose the list of
> "gdal-1.9.0/.libs/libgdal.so: undefined reference to `sqlite3_*" is sent
> because of the missing
> libsqlite3.so.0 =>  /usr/local/lib/libsqlite3.so.0 (0x0040f000)
> but why the libgdal.so doesn't reference libsqlite3.so too when building
> using --with-spatialite=yes
> For information, I've used ldconfig after each build of each lib.
> Any clue is welcome, maybe I miss something obvious.
>
> Thanks
>
> ThomasG
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


-- 
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu


More information about the gdal-dev mailing list