[Mapserver-users] Too hard, too easy or too boring?

Martin Weinelt mweinelt at planiglobe.com
Wed Feb 4 10:11:26 EST 2004


On Wednesday 04 February 2004 00:14, Keith Campbell wrote:
> OK, just trying to get your attention. I posted this yesterday under a
> different title and got no responses.
>
> Here's the problem. I'm trying to compila an install a WFS Server
> enabled Mapserver on a Solaris (this is proving to be a very frustrating
> experience, no doubt partly due to my lack of knowledge of UNIX). I
> think I've got all the libraries installed that I need, even though they
> are in non-standard locations (it's not my server). The configure script
> runs to completion and only seems to complain once:-
>
> checking for httpd... /export/home/local/apache2/bin/httpd
> awk: syntax error near line 1
> awk: bailing out near line 1
> awk: syntax error near line 1
> awk: bailing out near line 1
>         /export/home/local/apache2/bin/httpd version is Apache/2.0.45 ().
>
> Not sure what this means or what the implications are.
>
> Anyway, this is what I fed into the configure:-
>
> bash$ ./configure --with-jpeg=/export/home/local/util/jpeg
> --with-freetype=/exp
> ort/home/local/util/freetype --with-zlib=/export/home/local/util/zlib
> --with-pn
> g=/export/home/local/util/libpng
> --with-libiconv=/export/home/local/util/libico
> nv --with-gd=/export/home/local/util/gd-2.0.15
> --with-proj=/export/home/local/u
> til/proj --with-ogr=/export/home/local/util/gdal/apps/gdal-config
> --with-gdal=
> /export/home/local/util/gdal/apps/gdal-config --with-wfs --with-postgis
>
> The make process ran for some time before spitting this out:-
>
> ld: fatal: relocation error: R_SPARC_32: file ./libmap.a(mapogr.o):
> symbol <unkn
> own>: offset 0xfd6609c9 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file ./libmap.a(mapogr.o):
> symbol <unkn
> own>: offset 0xfd660a09 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file ./libmap.a(mapogr.o):
> symbol <unkn
> own>: offset 0xfd660a69 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file ./libmap.a(mapogr.o):
> symbol <unkn
> own>: offset 0xfd660c29 is non-aligned
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1
>
> I can't find anything in the archives that points to the cause of this.
> Can anybody help?


Been through a similar nightmare three month ago. Did not put it in the 
archives or wiki because I am still not sure what went on ...

Some of the newer versions of the supporting packages (libpng, gdal,..) have 
their own '*-config' script under /somewhere/local/bin. I gave the path to 
these scripts as an argument for the mapserver configure options instaed of 
the paths to the actual libraries.

Moreover I was told by somebody that the linker (was it the compiler ...?) 
looks under /usr and /usr/local in the first place anyways and might pick the 
wrong libs if it finds them there, despite your environment during build time  
... (I tried to exclude /usr and /usr/local during 'make') . This caused 
problems with an older version of PNG at the usual place and the really 
needed version at my 'private' place. It was Solaris 9 and mapserver and the 
proper libs in non-standard directories. 

Besides the measures laid down in the docs for solaris build I finally ended 
up editing the Makefile after 'configure' wiht explicit paths for every 
package that reported problems during run-time of mapserver.  For instance: 
GD_LIB=  -L/my/path/local/lib -lgd     or
TIFF_LIB= -L/my/path/local/lib -ltiff  or 

PROJ_INC= -I/my/path/local/include
PROJ_LIB= -L/my/path/local/lib -lproj

Dunno if this is of any value, but might provoke more usefull comments from 
talented people ...

Martin

PS: Then  I found out that my mapfile missed the NAME keyword for some LAYERs 
(which are referenced by the GROUP keyword). Thsi worked perfectly with my 
linux box but NOT AT ALL with the solaris installation . Ceterum censeo: 
check your mapfile carefully when running into problems with 'premature end 
of script ' errors (mapser cgi).






More information about the mapserver-users mailing list