Compiling Mapserver on Solaris
Frank Warmerdam
warmerdam at POBOX.COM
Wed May 3 05:59:53 PDT 2006
H. Porath wrote:
> Hello community,
>
> we are trying to compile Mapserver 4.8.3 on Solaris 8/Sparc. We used the following configure-options:
> ./configure \
> --with-gd=/usr/local/gd-2.0.33 \
> --with-gdal=/usr/local/gdal-1.3.1/bin/gdal-config
>
> The make aborts with the following symbol referencing error:
> ...
>
> ar rc libmap.a maptemplate.o mapbits.o maphash.o mapshape.o mapxbase.o mapparser.o maplexer.o maptree.o mapsearch.o mapstring.o mapsymbol.o mapfile.o maplegend.o maputil.o mapscale.o mapquery.o maplabel.o maperror.o mapprimitive.o mapproject.o mapraster.o mapsde.o mapogr.o mappostgis.o mapmygis.o maplayer.o mapresample.o mapwms.o mapwmslayer.o maporaclespatial.o mapgml.o mapprojhack.o mapthread.o mapdraw.o mapgd.o mapoutput.o mapgdal.o mapswf.o mapimagemap.o mapows.o mapwfs.o mapwfslayer.o mapcontext.o maphttp.o mapdrawgdal.o mappdf.o mapjoin.o mapgraticule.o mapcopy.o mapogcfilter.o mapogcsld.o maptime.o mapwcs.o mapcpl.o cgiutil.o maprasterquery.o mapobject.o mapgeos.o classobject.o layerobject.o mapio.o mappool.o mapsvg.o mapregex.o mappluginlayer.o epplib.o
> ranlib libmap.a
> gcc -c -O2 -fPIC -Wall -DIGNORE_MISSING_DATA -DHAVE_VSNPRINTF -DUSE_EPPL -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_GDAL -DUSE_ICONV -DUSE_ZLIB -I/usr/local/gd-2.0.33/include -I/usr/local/gdal-1.3.1/include shp2img.c -o shp2img.o
> gcc -O2 -fPIC -Wall -DIGNORE_MISSING_DATA -DHAVE_VSNPRINTF -DUSE_EPPL -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_GDAL -DUSE_ICONV -DUSE_ZLIB -I/usr/local/gd-2.0.33/include -I/usr/local/gdal-1.3.1/include shp2img.o -L. -lmap -L/usr/local/gd-2.0.33/lib -lgd -ljpeg -lpng -lz -ljpeg -lpng -lz -ljpeg -L/usr/local/gdal-1.3.1/lib -lgdal -lc -lz -lm -o shp2img
> ld: warning: global symbol `_GLOBAL_OFFSET_TABLE_' has non-global binding:
> (file /usr/local/lib/libgcc_s.so.1 value=LOCL);
> Undefined first referenced
> symbol in file
> endl(ostream &) ./libmap.a(mapogr.o)
...
> It would be nice if anyone had an idea. We are working on this for weeks now. Thanks in advance.
Holger,
The problem is that you are using gcc to link instead of g++, so no
C++ support libraries are getting linked in. On linux I believe linking
in the shared GDAL library would bring the c++ support library with it
but that appears not to be happening in your Solaris build. Perhaps
static libs ended up being used for some reason?
Try modifying "LD = gcc" to "LD = g++" in the MapServer Makefile.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the MapServer-users
mailing list