[Mapserver-users] Building MapScript under Solaris
Don Wolski
wolski at basin.humboldt.edu
Fri Mar 5 13:58:54 PST 2004
Hi. I'm trying to build and install Mapserver w/ MapScript. The main Mapserver build seems to go OK, and MapScript seems to compile OK (but with some warnings like
php_mapscript_util.c: In function `_phpms_fetch_handle2':
php_mapscript_util.c:147: warning: dereferencing type-punned pointer will break strict-aliasing rules
and
php_mapscript.c: In function `php3_ms_shapefile_getshape':
php_mapscript.c:10463: warning: int format, long int arg (arg 3)
), but when it tries to build the shared library, it seems (to me) to be unable to resolve a bunch (13,000) symbols, including ones that should be in the std libs. I've forced the c++ command to look every lib directory I could think of, but the results are the same. The symptom of my problem is that I get the message
ld: fatal: relocations remain against allocatable but non-writable sections
when the package's Makefile uses c++ to build a shared library after compiling the .o's, details below.
Should I be specifying /usr/lib before /opt/sfw/gcc-3/lib? Should I be using gcc 2.95.3? Do I need to install a libc in addition to /usr/lib/libc*? Am I completly off-base about what the error msg means?
The system I am using is complete Solaris 9 (12/03 update, w/ recommended patches as of Feb 9) plus the Companion Disk (a bunch of GNU and other F/OSS which get installed in /usr/sfw and /opt/sfw, and which Sun compiles with its proprietary compilers).
I do not have the Sun proprietary compilers, and am using gcc 3.3 instead.
/usr/local is a symlink to /opt/local.
Thanks for taking the time to look at this.
/don
The builds of php_mapscript_util.o, php_mapscript.o, and mapscript_i.o seem to go OK. The building of php_mapscript.so is where it fails:
c++ -shared -R/usr/local/lib:/usr/local/pgsql/lib -L/usr/local/lib -L/opt/sfw/gcc-3/lib -L/lib -L/usr/lib -L/usr/ccs/lib -L/usr/xpg4/lib -L/usr/dt/lib -L/usr/openwin/lib -L/usr/X/lib -L/usr/local/pgsql/lib -o php_mapscript.so php_mapscript_util.o php_mapscript.o mapscript_i.o -L/opt/local/src/mapserver-4.0.1 -lmap -L/usr/local/pgsql/lib -lpq -L/usr/local/lib -lproj -L/lib -lz -L/lib -lXpm -lX11 -L/usr/local/lib -lgd -L/lib -lz -L/lib -lXpm -lX11 -lm -lstdc++
Text relocation remains referenced
against symbol offset in file
<unknown> 0x49c /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a0 /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a4 /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a8 /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4ac /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4b0 /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4b4 /opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
. . . Skipping nearly 13,000 such lines . . .
cos 0x9bb0 /opt/local/src/mapserver-4.0.1/libmap.a(mapgd.o)
cos 0x1828 /opt/local/src/mapserver-4.0.1/libmap.a(mapimagemap.o)
asin 0x180c /opt/local/src/mapserver-4.0.1/libmap.a(maplabel.o)
asin 0x180c /opt/local/src/mapserver-4.0.1/libmap.a(mapprimitive.o)
asin 0x1a10 /opt/local/src/mapserver-4.0.1/libmap.a(mapprimitive.o)
asin 0x2684 /opt/local/src/mapserver-4.0.1/libmap.a(mapprimitive.o)
ceil 0x4e4 /opt/local/src/mapserver-4.0.1/libmap.a(maperror.o)
ceil 0x10dc /opt/local/src/mapserver-4.0.1/libmap.a(mapgraticule.o)
ceil 0x111c /opt/local/src/mapserver-4.0.1/libmap.a(mapgraticule.o)
atan 0x7a4 /opt/local/src/mapserver-4.0.1/libmap.a(mapgd.o)
log10 0x1110 /opt/local/src/mapserver-4.0.1/libmap.a(mapgraticule.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
Don Wolski mailstop ENRS, Natural Resources 211c
Unix System Administrator Information Technology Unit
dcw2 at humboldt.edu College of NR and Sciences
707-826-3536 (voice) Humboldt State University
707-826-3501 (fax) Arcata, CA 95521-8299
More information about the MapServer-users
mailing list