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

Nicolas Boretos nicolas at maich.gr
Thu May 20 07:08:12 EDT 2004


Nicol Hermann wrote:

>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
>--enable-shared=no 
>
>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
>--with-php=/usr/local/src/php-4.3.6
>--with-gdal=../../build/bin/gdal-config
>
>During the make process i get the error message below:
>
>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_GDAL    
>-I/home/nicol/source/mapserver-4.0.2/../../build/include 
>-I/home/nicol/source/mapserver-4.0.2/../../build/include 
>-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
>  
>
Hi,

Maybe you need to add -ldl?

regards,

nicolas





More information about the mapserver-users mailing list