[Gdal-dev] building gdal with local xerces/proj4

VJorg jorg.verstraete at incgeo.be
Tue May 27 06:11:05 EDT 2008


Hello,

I'm trying to build a gdal 1.5.1 using a local version of Xerces 2.7.0 and
Proj 4 4.6.0 (despite the fact that both are installed on the system, but we
wish to be independant of it). I'm using Xerces 2.7.0, as compilation with
2.8.0 fails ( http://trac.osgeo.org/gdal/ticket/2370 ticket 2370 ), but that
is a different issue. For this purpose, I have build xerces and proj4 in
/home/jv/thirdparty/xerces/xerces-c-src_2_7_0 and
/home/jv/thirdparty/proj/proj4.6.0 respectively.

The configure step is
-
./configure --prefix=/home/jv/thirdparty/linuxbuilds/gdal151 --enable-rtti
--with-static-proj4=/home/jv/thirdparty/proj/proj4.6.0
--with-xerces=/home/jv/thirdparty/xerces/xerces-c-src_2_7_0
-
In the output, it shows:
-
checking for Xerces C++ Parser headers in
/home/jv/thirdparty/xerces/xerces-c-src_2_7_0/include and
/home/jv/thirdparty/xerces/xerces-c-src_2_7_0/include/xercesc... found
checking for Xerces C++ Parser libraries... found
checking for Xerces C++ Parser... yes
checking if Xerces C++ Parser version is >= 2.7.0... yes
-

The compilation output however shows (just one example)
-
libtool: link: g++ ogr2ogr.o -o .libs/ogr2ogr 
/home/jv/thirdparty/gdal/gdal-1.5.1/.libs/libgdal.so
-L/home/jv/thirdparty/proj/proj4.6.0/src -L/usr/lib
-L/home/jv/thirdparty/xerces/xerces-c-src_2_7_0/lib /usr/lib/libproj.so
/usr/lib/libsqlite3.so /usr/lib/libodbc.so /usr/lib/libodbcinst.so
/usr/lib/libexpat.so -lxerces-c -lpthread /usr/lib/libjasper.so
/usr/lib/libhdf5.so -logdi31 -lgif -lgeotiff /usr/lib/libtiff.so -lm -lc
/usr/lib/libjpeg.so -lpng -lnetcdf -lcfitsio -lpq -lz -lrt -ldl -Wl,-rpath
-Wl,/home/jv/thirdparty/linuxbuilds/gdal151/lib
-
and further
-
libtool: link: g++ ogrtindex.o -o .libs/ogrtindex 
/home/jv/thirdparty/gdal/gdal-1.5.1/.libs/libgdal.so
-L/home/jv/thirdparty/proj/proj4.6.0/src -L/usr/lib
-L/home/jv/thirdparty/xerces/xerces-c-src_2_7_0/lib /usr/lib/libproj.so
/usr/lib/libsqlite3.so /usr/lib/libodbc.so /usr/lib/libodbcinst.so
/usr/lib/libexpat.so -lxerces-c -lpthread /usr/lib/libjasper.so
/usr/lib/libhdf5.so -logdi31 -lgif -lgeotiff /usr/lib/libtiff.so -lm -lc
/usr/lib/libjpeg.so -lpng -lnetcdf -lcfitsio -lpq -lz -lrt -ldl -Wl,-rpath
-Wl,/home/jv/thirdparty/linuxbuilds/gdal151/lib
-
Why does it look in proj4.6.0/src for linkage? All the libraries it needs
are in the (default) proj4.6.0/src/.libs ... How can I change this?
It hasn't it used the libxerces-s.so.27 that is present in
-L/home/jv/thirdparty/xerces/xerces-c-src_2_7_0/lib, presumably as the
/usr/lib path is listed first... How can I overcome this order?


When checking out the libgdal.so library using ldd, it shows dependancies
from
-
libproj.so.0 => /usr/lib/libproj.so.0
libxerces-c.so.27 => /usr/lib/libxerces-c.so.27
-
This also raises the question: why hasn't it linked proj4 statically?
(the origin of the xerces dependancy is obvious, but I don't know how to
circumvent it...)

Thanks!

Jörg
-- 
View this message in context: http://www.nabble.com/building-gdal-with-local-xerces-proj4-tp17486002p17486002.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list