Ticket #1249 (closed defect: fixed)
Java mapscript fails to compile
| Reported by: | unicoletti | Owned by: | sdlime |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript | Version: | 4.5 |
| Severity: | normal | Keywords: | |
| Cc: | sgillies@…, jerry.pisk@… |
Description
I have checked out mapserver from cvs and I was not able to compile Java mapscript.
These are the configure options:
/configure --with-threads --with-pdf --with-proj --without-tiff --without-wms
--with-gdal=/opt/gdal/bin/gdal-config
And this is the error I get:
unicoletti@friedrich java $ make interface all
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 -O2 -fPIC -Wall -DIGNORE_MISSING_DATA -DNEED_STRLCAT -DUSE_EPPL
-DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS
-DUSE_PDF -DUSE_GDAL -DUSE_THREAD -I/usr/include -I/opt/gdal/include
-I/opt/sun-j2sdk1.4.2_03/include -I/opt/sun-j2sdk1.4.2_03/include/linux
-fno-strict-aliasing mapscript_wrap.c
mapscript_wrap.c: In function `layerObj_applySLD':
mapscript_wrap.c:1324: warning: implicit declaration of function `msSLDApplySLD'
mapscript_wrap.c: In function `layerObj_applySLDURL':
mapscript_wrap.c:1327: warning: implicit declaration of function `msSLDApplySLDURL'
mapscript_wrap.c: In function `layerObj_generateSLD':
mapscript_wrap.c:1330: warning: implicit declaration of function `msSLDGenerateSLD'
mapscript_wrap.c: In function `mapObj_saveQueryAsGML':
mapscript_wrap.c:1525: warning: implicit declaration of function `msGMLWriteQuery'
mapscript_wrap.c: At top level:
mapscript_wrap.c:36765: error: syntax error before "if"
make: *** [mapscript_so] Error 1
It looks the problem lies in the following lines of code (from mapscript.i):
%init %{
if (msSetup() != MS_SUCCESS)
{
msSetError(MS_MISCERR, "Failed to set up threads and font cache",
"msSetup()");
}
%}
They refer to bug 1203.
Change History
Note: See
TracTickets for help on using
tickets.
