[Mapserver-users] unable to load dynamic library
frauke.trurnit at gmx.de
frauke.trurnit at gmx.de
Wed Jan 15 07:39:27 PST 2003
Hi Daniel, hi list,
I can't find a copy of GDAL on my system.
But I have two versions of GD: the SuSE-GD and the version I installed.
Could this be a problem?
I changed something in the Makefile of the MapServer, because I always
receives with the call of "make" following error messages:
mapraster.o(.text+0x4d4): undefined reference to `GDALGetRasterXSize'
...
mapraster.o(.text+0x8ba): undefined reference to `GDALGetRasterXSize'
mapraster.o(.text+0x92a): undefined reference to `GDALGetRasterYSize'
mapraster.o(.text+0x98b): undefined reference to `GDALGetRasterYSize'
...
mapresample.o(.text+0xb74): undefined reference to `GDALReadWorldFile'
mapresample.o(.text+0xb83): undefined reference to `GDALGetRasterXSize'
mapresample.o(.text+0xb95): undefined reference to `GDALGetRasterYSize'
collect2: ld returned 1 exit status
make: *** [shp2img] Fehler 1
I changed the GD_STATIC and added -ldl behind the GD_LIB in the MapServer
Makefile and than I could compile the Mapserver.
Can these changes generate the problems with the PHP/Mapscript?
How can I solve otherwise the errors?
An extract of my changed Makefile:
# GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
#
# - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
# - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz to
GD_LIB line.
#
#
GDFONT_OBJ=gd-1.2/gdfontt.o gd-1.2/gdfonts.o gd-1.2/gdfontmb.o
gd-1.2/gdfontl.o gd-1.2/gdfontg.o
GD_INC= -I/usr/frauke/bibliotheken/mapserver-3.6.3/../gd-1.8.4
GD_LIB= -L/usr/frauke/bibliotheken/mapserver-3.6.3/../gd-1.8.4 -ldl -lgd
-ljpeg -lfreetype -lpng -lz
GD= -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
-DGD_HAS_GDIMAGEGIFPTR
GD_STATIC =../gdal-1.1.7/gdal.a #I changed this line and added the -ldl
behind the GD_LIB
Frauke
frauke.trurnit at gmx.de wrote:
>
> I get the following error message:
>
> Unable to load dynamic library
> '/usr/local/lib/php/extensions/php_mapscript.so' -
/usr/local/lib/php/extensions/php_mapscript.so: undefined symbol:
> GDALGetRasterXSize in /usr/local/httpd/htdocs/releases/bundestag.php4 on
line 2
> Fatal error: Call to undefined function: ms_newmapobj() in
> /usr/local/httpd/htdocs/releases/bundestag.php4 on line 4
>
PHP seems to find your php_mapscript.so OK. The problem seems related
to your GDAL installation, php_mapscript.so would have been compiled for
a given version of GDAL but would find another version at runtime. Make
sure you don't have two copies of GDAL on your system, and that
MapServer and MapScript are compiled for this copy of GDAL.
(to be safe, recompile and reinstall GDAL from scratch: make clean;
make; make install and then recompile MapServer: make clean; make)
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
More information about the MapServer-users
mailing list