[Mapserver-users] trouble compiling mapserver with ogr

Moritz Lennert mlennert at club.worldonline.be
Wed Apr 28 06:28:20 PDT 2004


Hello,

I have trouble compiling mapserver-4.0.2 with ogr support on my Debian
testing/unstable system. I have browsed around and have seen two possible
answers:

1) a mix of different gdal versions: I have wiped out all the gdal
packages and compiled the current CVS version (using dpkg-buildpackage).
All I have now is:

ls -l /usr/lib/*gdal*
-rw-r--r--    1 root     root      4734256 2004-04-28 14:58
/usr/lib/libgdal.a
-rw-r--r--    1 root     root          982 2004-04-28 14:58
/usr/lib/libgdal.la
lrwxrwxrwx    1 root     root           16 2004-04-28 15:01
/usr/lib/libgdal.so -> libgdal.so.1.2.0
lrwxrwxrwx    1 root     root           16 2004-04-28 15:01
/usr/lib/libgdal.so.1 -> libgdal.so.1.2.0
-rw-r--r--    1 root     root      3229920 2004-04-28 14:58
/usr/lib/libgdal.so.1.2.0

OGR is enabled:
$ gdal-config --ogr-enabled
yes

2) a specific way of formulating the configure options. I have tried:

./configure --with-ogr --with-gdal
./configure --with-ogr=/usr/bin/gdal-config --with-gdal
./configure --with-ogr --with-gdal=/usr/bin/gdal-config
./configure --with-ogr

All of them resulting in the same compile error:

gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ
-DUSE_PROJ_API_H -DUSE_WMS_SVR       -DUSE_JPEG -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP -DUSE_GD_FT -DUSE_PDF  -DUSE_OGR -DUSE_GDAL -DUSE_POSTGIS   
-I/usr//include         -I/usr/include -I/usr/include
-I/usr/include/postgresql     shp2img.o  -L. -lmap -L/usr//lib -lgd -ljpeg
-lfreetype -lpng -lz   -lpdf -ljpeg -lfreetype -lpng -lz   -lproj -ljpeg 
-L/usr/lib -lgdal   -L/usr/lib -lpq      -lm -lstdc++   -o shp2img
./libmap.a(mapogr.o)(.text+0x15b): dans la fonction «
ogrGeomPoints(OGRGeometry*, shapeObj*)    »:
: undefined reference to `OGRGeometryCollection::getNumGeometries()'
./libmap.a(mapogr.o)(.text+0x2b7): dans la fonction «
ogrGeomPoints(OGRGeometry*, shapeObj*)    »:
: undefined reference to `OGRPolygon::getNumInteriorRings()'
./libmap.a(mapogr.o)(.text+0x457): dans la fonction «
ogrGeomPoints(OGRGeometry*, shapeObj*)    »:
: undefined reference to `OGRPolygon::getNumInteriorRings()'
./libmap.a(mapogr.o)(.text+0x764): dans la fonction «
ogrGeomLine(OGRGeometry*, shapeObj*, int)»:
: undefined reference to `OGRGeometryCollection::getNumGeometries()'
./libmap.a(mapogr.o)(.text+0x7b4): dans la fonction «
ogrGeomLine(OGRGeometry*, shapeObj*, int)»:
: undefined reference to `OGRPolygon::getNumInteriorRings()'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [shp2img] Erreur 1

The config.log shows the following concerning OGR:

configure:7757: checking for OGRRegisterAll in -lgdal
configure:7788: gcc -o conftest -g -O2   conftest.c -lgdal   -lm -lstdc++ 
-L/us
r/lib -lgdal >&5
configure:7791: $? = 0
configure:7794: test -s conftest
configure:7797: $? = 0
configure:7809: result: yes
configure:7882: result:         using OGR from system libs.

I just can't find what's wrong. Can someone help me ?

Moritz



More information about the MapServer-users mailing list