Mapscript compile error

Hans Wapenaar hans.wapenaar at GIS-INNOVATIONS.NL
Wed Feb 7 06:35:49 PST 2007


Hallo,
Im trying to install Mapserver with Mapscript java on a Debian Linux system. 
When making the mapscript i get an error.
I followed the instructions:
    $ cd mapscript/java
    $ make interface
    $ make

Result:
f28:/opt/mapserver-4.10.0/mapscript/java# make interface
mkdir -p edu/umn/gis/mapscript
swig -java -package edu.umn.gis.mapscript -o mapscript_wrap.c ../mapscript.i
mv *.java edu/umn/gis/mapscript/
f28:/opt/mapserver-4.10.0/mapscript/java# ls
data  examples      javamodule.i  Makefile.in  mapscript_wrap.c  tests
edu   javaextend.i  Makefile      makefile.vc  README
f28:/opt/mapserver-4.10.0/mapscript/java# make
mkdir -p edu/umn/gis/mapscript
swig -java -package edu.umn.gis.mapscript -o mapscript_wrap.c ../mapscript.i
mv *.java edu/umn/gis/mapscript/
gcc -fpic -c -g -O2 -fPIC -Wall  -DENABLE_STDERR_DEBUG  -
DHAVE_VSNPRINTF -DNEED_STRLCAT  -DUSE_EPPL -DUSE_PROJ -
DUSE_WMS_SVR          -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -
DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -
DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS    -DUSE_GDAL  -
DUSE_ICONV   -DUSE_THREAD -I/opt/FWTools-1.2.0/include  -I/opt/FWTools-
1.2.0//include      -I/include         -I/usr/local/java/jdk1.5.0_11/include -
I/usr/local/java/jdk1.5.0_11/include/linux -fno-strict-aliasing mapscript_wrap.c
mapscript_wrap.c: In function 
âJava_edu_umn_gis_mapscript_mapscriptJNI_imageObj_1getBytesâ:
mapscript_wrap.c:23773: warning: pointer targets in passing argument 2 of 
âSWIG_JavaArrayOutScharâ differ in signedness
mapscript_wrap.c: In function 
âJava_edu_umn_gis_mapscript_mapscriptJNI_msIO_1getStdoutBufferBytesâ:
mapscript_wrap.c:34723: warning: pointer targets in passing argument 2 of 
âSWIG_JavaArrayOutScharâ differ in signedness
gcc -fpic -shared mapscript_wrap.o -o libmapscript.so  -L../.. -lmap -
L/opt/FWTools-1.2.0/lib -lgd  -L/opt/FWTools-1.2.0/lib -lfreetype -
L/opt/FWTools-1.2.0/lib -lpng -L/opt/FWTools-1.2.0/lib -lz    -L/opt/FWTools-
1.2.0/lib -lfreetype -L/opt/FWTools-1.2.0/lib -lpng -L/opt/FWTools-1.2.0/lib -
lz   -L/opt/FWTools-1.2.0//lib -lproj   -L/lib -lgdal      -lpthread -lm
/usr/bin/ld: cannot find -lmap
collect2: ld returned 1 exit status
make: *** [mapscript_so] Error 1

Any idea what I am doing wrong???
Hans Wapenaar

=======================================================
Installation process that I followed:
http://mapserver.gis.umn.edu/docs/howto/javamapscript/#againstFwtools

Download:	FWTools-linux-1.2.0.tar.tar 
from: 		http://fwtools.maptools.org/

store in dir:	/opt
unpack:	tar xvjf FWTools-linux-1.2.0.tar.tar

install	cd FWTools-1.2.0
				./install.sh	

adjust file: profile (in directory: /etc/).
PATH="$PATH:/opt/FWTools-1.2.0/bin_safe"

cd into the lib subdirectory and run the following two commands: 
ln -s libpng.so.2 libpng.so
ln -s libfreetype.so.6 libfreetype.so

Download 	mapserver-4.10.0.tar.gz
from:		http://mapserver.gis.umn.edu/download/current/

store in dir:	/opt
unpack:	tar -zxvf mapserver-4.10.0.tar.gz

Compile:
cd mapserver-4.10.0  
./configure --enable-debug --with-threads --without-pdf --without-tiff \  --
with-gdal=/opt/FWTools-1.2.0/bin/gdal-config --with-proj=/opt/FWTools-
1.2.0/ \  --with-gd=/opt/FWTools-1.2.0 --with-freetype=/opt/FWTools-1.2.0 
\  --with-png=/opt/FWTools-1.2.0 --with-zlib=/opt/FWTools-1.2.0 --with-
jpeg=/opt/FWTools-1.2.0

cd mapscript/java
make interface
make



More information about the MapServer-users mailing list