[Gdal-dev] gdal config icluding xerces
Daniel Isenegger
disen at geo.unizh.ch
Mon Jul 12 05:27:49 EDT 2004
Frank Warmerdam schrieb:
> Daniel Isenegger wrote:
>
>> Hi
>>
>> i have installed grass57 on suse9.1 and want to use gdal for the
>> grass-commands v.in.ogr and v.out.ogr. When applying v.out.ogr xerces
>> is needed by gdal.
>>
>> when compiling gdal to use xerces i get the following errors (2
>> different tries in the following):
>>
>> - when using xerces 2.1.0 (built from source):
>>
>> ./configure --with-grass=/usr/local/grass-5.7.0
>> --with-pg=/usr/local/pgsql/bin/pg_config --with-xerces
>> --with-xerces-inc=/downloads/xerces/xerces-c-src2_1_0/include
>> --with-xerces-lib="-L/downloads/xerces/xerces-c-src2_1_0/lib
>> -lpthread" --with-odbc=/usr/local/lib
>> --with-static-proj4=/usr/lib/libproj.so | tee configure_disen.log
>
>
> Daniel,
>
> I tried this out and found I had to do things a bit differently:
>
> ./configure --with-xerces
> --with-xerces-inc=/u/pkg/xerces-c-src2_2_0/include/xercesc
> --with-xerces-lib="-L/u/pkg/xerces-c-src2_2_0/lib -lxerces-c -lpthread"
>
> Note:
> o the include directory is <base>/include/xercesc, not just
> <base>/include.
> o The lib directive needs to include the library (-lxerces-c) as well
> as the
> path and pthread.
Hi Frank,
thanks for for your advice. Unfortunately it still doesn't work. I
included your advices:
./configure --with-grass=/usr/local/grass-5.7.0
--with-pg=/usr/local/pgsql/bin/pg_config --with-xerces
--with-xerces-inc=/usr/local/xerces-c-src2_2_0/include/xercesc
--with-xerces-lib="-L/usr/local/xerces-c-src2_2_0/lib -lxerces-c
-lpthread" --with-odbc=/usr/local/lib
--with-static-proj4=/usr/lib/libproj.so | tee configure_disen.log
the error is: cannot find files, e.g. file xercesc/util/XercesDefs.hpp
(which is at that location). Does gdal search only the paths given in
the configuration or also consider environment vars?
g++ -I/usr/local/xerces-c-src2_2_0/include/xercesc
/usr/local/xerces-c-src2_2_0/include -o conftest conftest.cpp
-L/usr/local/xerces-c-src2_2_0/lib -lxerces-c -lpthread
-L/usr/local/grass-5.7.0 -L/usr/local/grass-5.7.0/lib -lgrass5 -lz -lm -ldl
In file included from conftest.cpp:1:
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:65:39:
xercesc/util/XercesDefs.hpp: No such file or directory
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:66:41:
xercesc/util/XMLException.hpp: No such file or directory
In file included from conftest.cpp:1:
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:70:
error: syntax
error before `;' token
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:82:
error: syntax
error before `{' token
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:91:
error: syntax
error before `&' token
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:91:
error: `
void operator=(...)' must be a nonstatic member function
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:91:
error: `
void operator=(...)' must take exactly two arguments
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:104:
error: syntax
error before `{' token
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:175:
error: `
XMLUni' was not declared in this scope
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:175:
error: syntax
error before `::' token
/usr/local/xerces-c-src2_2_0/include/xercesc/util/PlatformUtils.hpp:200:
error: syntax
error before `)' token
i don't know if my paths are wrong??
echo $LD_LIBRARY_PATH
/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib:/opt/lib:/usr/local/grass-5.7.0/lib:/usr/local/pgsql/lib:
/usr/local/qt/lib:/usr/local/xerces-c-src2_2_0/lib
echo $PATH
/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin:/usr/local/grass-5.7.0/bin:/usr/local/pgsql/bin:
/usr/local/qt/bin:/usr/local/xerces-c-src2_2_0/bin
>
>
> With this it worked for me. In general though I find it much easier
> to just
> "make install" xerces and use --with-xerces alone to find the library.
if i understand you right, you suggest to just install xerces-binaries
at the default place and let gdal-config script look for xerces?
My problem is, there are no xerces-binaries for suse9.1 and in the
binaries of former versions, there is no default installation path
suggested.
if i have installed xerces as i have it now and just run the gdal-config
script with --with-xerces the same error as described in the first mail
occurs (conftest.cpp:1:34: util/PlatformUtils.hpp: No such file or
directory ).
Thanks Dani
More information about the Gdal-dev
mailing list