[Mapserver-users] mapserver compiling error with static linked proj4 and gdal libs

Nicol Hermann mapserver at geochem.de
Thu May 20 06:16:49 EDT 2004

Hi List

i have a problem compiling mapserver against a static linked proj4
(4.4.7) and gdal (1.2.0) library in a none standard location on my
Debian 3.0r2 box.

I used the following configure statements for:
proj: ./configure --prefix=/home/nicol/build --enable-shared=no
gdal: ./configure --prefix=/home/nicol/build
--with-static-proj4=../../build --without-ld-shared --without-python

Both libs compiled fine and i do a make install after the make process

After that i tried to compile mapserver (4.0.2 and 4.2b3)

./configure --with-gd=/usr  --with-jpeg=/usr --with-zlib=/usr
--with-freetype=/usr/lib --with-png=/usr --with-proj=../../build
--without-tiff  --with-libiconv=/usr/local

During the make process i get the error message below:

-I/usr/include      -I/home/nicol/build/include      shp2img.o  -L.
-lmap -L/usr/lib -lgd -L/usr/lib -ljpeg -L/usr/lib -lfreetype -L/usr/lib
-lpng -L/usr/lib -lz    -L/usr/lib -ljpeg -L/usr/lib -lfreetype
-L/usr/lib -lpng -L/usr/lib -lz  
-L/home/nicol/source/mapserver-4.0.2/../../build/lib -lproj -L/usr/lib
-ljpeg   -L/home/nicol/build/lib -lgdal        -lm   -o shp2img
/home/nicol/source/mapserver-4.0.2/../../build/lib/libgdal.a(cplgetsymbol.o): In function `CPLGetSymbol':
cplgetsymbol.o(.text+0x2b): undefined reference to `dlopen'
cplgetsymbol.o(.text+0x3e): undefined reference to `dlsym'
cplgetsymbol.o(.text+0x4a): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1

gcc/g++ --version is 2.95.4

Any clues how to fix this?

Many thanks
Nicol Hermann <mapserver at geochem.de>

More information about the mapserver-users mailing list