[Mapserver-users] Problems compiling mapserv with OGR support.
Sebastien Vincent
svincent at idems.fr
Tue Mar 30 06:48:32 PST 2004
Hello everybody :)
First excuse me for my english, I'm french :)
I'm trying to enable OGR support for mapserv, so I'm trying to compile
it as follow :
[root at nostalgia mapserver-4.0.1]# ./configure
--with-ogr=../gdal-1.2.0b/apps/gdal-config \
--with-gdal=../gdal-1.2.0b/apps/gdal-config
[root at nostalgia mapserver-4.0.1]# make
But i've lots of errors durring make (configure scripts works fine) :
> [root at nostalgia mapserver-4.0.1]# make
> gcc -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_TIFF
> -DUSE_JPEG -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
> -DUSE_GDAL -I/usr/include
> -I/root/applications/mapserver/gdal-1.2.0b/port
> -I/root/applications/mapserver/gdal-1.2.0b/gcore
> -I/root/applications/mapserver/gdal-1.2.0b/alg
> -I/root/applications/mapserver/gdal-1.2.0b/ogr
> -I/root/applications/mapserver/gdal-1.2.0b/ogr/ogrsf_frmts
> shp2img.o -L. -lmap -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng
> -lz -ltiff -ljpeg -lfreetype -lpng -lz -ljpeg -lm
> -lstdc++ -o shp2img
> ./libmap.a(mapgdal.o)(.text+0x11): In function `msGDALInitialize':
> : undefined reference to `GDALAllRegister'
> ./libmap.a(mapgdal.o)(.text+0x19): In function `msGDALInitialize':
> : undefined reference to `CPLQuietErrorHandler'
> ./libmap.a(mapgdal.o)(.text+0x1e): In function `msGDALInitialize':
> : undefined reference to `CPLPushErrorHandler'
<snip> lot's of others
> ./libmap.a(mapdrawgdal.o)(.text+0x26b9): In function `Dither24to8':
> : undefined reference to `GDALDestroyColorTable'
> ./libmap.a(mapdrawgdal.o)(.text+0x26c6): In function `Dither24to8':
> : undefined reference to `GDALClose'
> collect2: ld returned 1 exit status
> make: *** [shp2img] Erreur 1
I've tried to update to gdal 1.2.0b but no results :(
Here is some additionals informatitions that could help I hope.
[root at nostalgia mapserver-4.0.1]# locate libgdal.so.1.2.0
/root/applications/mapserver/gdal-1.2.0/.libs/libgdal.so.1.2.0
/root/applications/mapserver/gdal-1.2.0b/.libs/libgdal.so.1.2.0
/usr/local/lib/libgdal.so.1.2.0
I've heard that there where some problems with gcc 3 and mapserv, so
here is my output :
[root at nostalgia mapserver-4.0.1]# gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-long-long --enable-__cxa_atexit
--enable-languages=c,c++,ada,f77,objc,java,pascal
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
I don't know how to proceed to solve this problem, cause I am Linux
newbie :(
Searching the mailing list archives I've found that the "ldd" program
must be use, I don't know how it works, but I've understand that it
register system librairies, here is the output :
> [root at nostalgia mapserver-4.0.1]# ldd /usr/local/lib/libgdal.so.1.2.0
> libungif.so.4 => /usr/lib/libungif.so.4 (0x402fe000)
> libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40306000)
> libpng.so.3 => /usr/lib/libpng.so.3 (0x40325000)
> libz.so.1 => /lib/libz.so.1 (0x4034b000)
> libdl.so.2 => /lib/libdl.so.2 (0x4035a000)
> libpq.so.3 => /usr/lib/libpq.so.3 (0x4035d000)
> libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40372000)
> libm.so.6 => /lib/i686/libm.so.6 (0x4042b000)
> libc.so.6 => /lib/i686/libc.so.6 (0x4044e000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4057e000)
> libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40588000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x4066b000)
> libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4069d000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x4079f000)
> libresolv.so.2 => /lib/libresolv.so.2 (0x407cc000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x407dd000)
> [root at nostalgia mapserver-4.0.1]# ldd libgdal.so.1.2.0
> ldd: ./libgdal.so.1.2.0: No such file or directory
Seems to be a problem ?
I've also read an answer for a problem similar to mine, where *Daniel
Morissette *said to try the following command :
> [root at nostalgia mapserver-4.0.1]# nm /usr/local/lib/libgdal.so.1.2.0 |
> grep OGRPolygon
> 0015bbf0 T _Z14OGRGetCentroidP10OGRPolygonP8OGRPoint
> 0015b4e0 T _Z20OGRPolygonLabelPointP10OGRPolygonP8OGRPoint
> 0015b460 T _Z24OGRIntersectPointPolygonP8OGRPointP10OGRPolygon
> 001be0a0 T _ZN10OGRPolygon11flattenTo2DEv
> 001be320 T _ZN10OGRPolygon13importFromWkbEPhi
> 001be6e0 T _ZN10OGRPolygon13importFromWktEPPc
> 001be250 T _ZN10OGRPolygon15addRingDirectlyEP13OGRLinearRing
> 001be100 T _ZN10OGRPolygon15getExteriorRingEv
> 001be160 T _ZN10OGRPolygon15getInteriorRingEi
> 001bdfa0 T _ZN10OGRPolygon5emptyEv
> 001be1c0 T _ZN10OGRPolygon7addRingEP13OGRLinearRing
> 001bed80 T _ZN10OGRPolygon9transformEP27OGRCoordinateTransformation
> 001bdd90 T _ZN10OGRPolygonC1Ev
> 001bdd50 T _ZN10OGRPolygonC2Ev
> 001bdeb0 T _ZN10OGRPolygonD0Ev
> 001bde40 T _ZN10OGRPolygonD1Ev
> 001bddd0 T _ZN10OGRPolygonD2Ev
> 00150ff0 T
> _ZN9TABRegion13AppendSecHdrsEP10OGRPolygonRP19TABMAPCoordSecHdr_tP10TABMAPFileRi
> 001be5a0 T _ZNK10OGRPolygon11exportToWkbE15OGRwkbByteOrderPh
> 001be9a0 T _ZNK10OGRPolygon11exportToWktEPPc
> 001beb50 T _ZNK10OGRPolygon11getEnvelopeEP11OGREnvelope
> 001be050 T _ZNK10OGRPolygon12getDimensionEv
> 001beb40 T _ZNK10OGRPolygon14PointOnSurfaceEP8OGRPoint
> 001be120 T _ZNK10OGRPolygon15getExteriorRingEv
> 001be0e0 T _ZNK10OGRPolygon15getGeometryNameEv
> 001be020 T _ZNK10OGRPolygon15getGeometryTypeEv
> 001be190 T _ZNK10OGRPolygon15getInteriorRingEi
> 001be140 T _ZNK10OGRPolygon19getNumInteriorRingsEv
> 001be060 T _ZNK10OGRPolygon22getCoordinateDimensionEv
> 001bdf20 T _ZNK10OGRPolygon5cloneEv
> 001bec80 T _ZNK10OGRPolygon5EqualEP11OGRGeometry
> 001be2a0 T _ZNK10OGRPolygon7WkbSizeEv
> 001beb30 T _ZNK10OGRPolygon8CentroidEP8OGRPoint
> 001beb10 T _ZNK10OGRPolygon8get_AreaEv
> 002cf658 V _ZTI10OGRPolygon
> 0024d276 V _ZTS10OGRPolygon
> 002cf560 V _ZTV10OGRPolygon
So here is my output.
I don't know what is the problem, and where it is.
I hope you know this problem and how to solve it :/
Thanks in advance,
seb :)
More information about the MapServer-users
mailing list