[Mapserver-users] Compiling PHP MapScript on Solaris 9
Don Wolski
dcw2 at humboldt.edu
Thu Feb 19 18:21:18 PST 2004
--=====================_289422281==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Hi
I'm having trouble building MapScript on a Solaris 9 system. I'm getting
about 10,000 of what appear to be unresolved symbols when it attempts to make
php_mapscript.so, including some (all?) really basic stuff that should be
found in the standard math lib. Here is the output of the mapscript
portion of "make" in the top level mapserver source directory with much
repetition removed. Anything come to mind?
For anyone who cares to look at the gory details, the complete output of
the scripts, with command echoing turned on, I use to run "env | sort",
"configure", "make". for building mapserver, php, postgresql, proj4, gd and
bison are available at http://asaf-srv1.humboldt.edu/build-ms/.
This is on a complete Solaris 9, 12/03 system, plus the complete Companion
CD (lots of GNU and other F/OSS stuff compiled by Sun using their compilers
which I do not have) and the defaults from the Supplement CD and the latest
patches as of Feb 9th. The versions of the packages I built from source
and the dates on which I built them are encoded in the names of the output
files at the above URL. /usr/local is a symlink to /opt/local. I use gcc
to compile.
thanks,
/don
Since preparing the rest of this email and the *-build.out files at the
above URL, I tried the suggestions in
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?Solaris8Build and they did not
seem to change anything (at least not at this stage of not being able to
build the shared library.)
touch mapscriptvars
pwd > mapscriptvars
echo -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ
-DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP
-DUSE_GD_FT >> mapscriptvars
echo -I. -I/usr/local/include -I/usr/local/include >> mapscriptvars
echo -L. -lmap -L/usr/local/lib -lgd -L/lib -lz -L/lib -lXpm
-lX11 -L/lib -lz -L/lib -lXpm -lX11 -L/usr/local/lib
-lproj -L/usr/local/pgsql/lib -lpq -lm -lstdc++ >> mapscriptvars
echo >> mapscriptvars
gcc -c -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ
-DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP
-DUSE_GD_FT -DUSE_POSTGIS -I/usr/local/include
-I/usr/local/include -I/usr/local/pgsql/include tile4ms.c -o
tile4ms.o
gcc -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ
-DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP
-DUSE_GD_FT -DUSE_POSTGIS -I/usr/local/include
-I/usr/local/include -I/usr/local/pgsql/include tile4ms.o
-L. -lmap -L/usr/local/lib -lgd -L/lib -lz -L/lib -lXpm -lX11 -L/lib
-lz -L/lib -lXpm -lX11 -L/usr/local/lib
-lproj -L/usr/local/pgsql/lib -lpq -lm -lstdc++ -o tile4ms
cd mapscript/php3; make; cd ../..
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4
-DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H
-DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
-I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include
-I/usr/local/include -I/usr/local/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o
php_mapscript_util.o php_mapscript_util.c
php_mapscript_util.c: In function `_phpms_fetch_handle2':
php_mapscript_util.c:147: warning: dereferencing type-punned pointer will
break strict-aliasing rules
. . . 8 more pairs of such lines . . .
php_mapscript_util.c: In function `_php_extract_associative_array':
php_mapscript_util.c:511: warning: dereferencing type-punned pointer will
break strict-aliasing rules
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4
-DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H
-DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
-I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include
-I/usr/local/include -I/usr/local/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o php_mapscript.o
php_mapscript.c
php_mapscript.c: In function `php3_ms_map_setExtent':
php_mapscript.c:1692: warning: dereferencing type-punned pointer will break
strict-aliasing rules
. . . 14 more pairs of such lines . . .
php_mapscript.c: In function `php3_ms_rect_free':
php_mapscript.c:10095: warning: dereferencing type-punned pointer will
break strict-aliasing rules
php_mapscript.c: In function `php3_ms_shapefile_getshape':
php_mapscript.c:10463: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_getpoint':
php_mapscript.c:10522: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_gettransformed':
php_mapscript.c:10587: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_free':
php_mapscript.c:10693: warning: dereferencing type-punned pointer will
break strict-aliasing rules
php_mapscript.c: In function `php3_ms_projection_free':
php_mapscript.c:10842: warning: dereferencing type-punned pointer will
break strict-aliasing rules
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4
-DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H
-DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
-I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include
-I/usr/local/include -I/usr/local/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include
-I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o mapscript_i.o
mapscript_i.c
c++ -shared -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)
<unknown> 0x4b8
/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4bc
/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4c0
/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0xb64
/opt/local/src/mapserver-4.0.1/libmap.a(mapsymbol.o)
. . . about 10,000 (!) more such lines . . .
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
*** Error code 1
make: Fatal error: Command failed for target `php_mapscript.so'
Current working directory /opt/local/src/mapserver-4.0.1/mapscript/php3
*** Error code 1
make: Fatal error: Command failed for target `php3_mapscript'
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
--=====================_289422281==.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<body>
Hi<br><br>
I'm having trouble building MapScript on a Solaris 9 system. I'm
getting about 10,000 of what appear to be unresolved symbols when it
attempts to make <br>
<pre>php_mapscript.so, including some (all?) really basic stuff that
should be found in the standard math lib. Here is the output of the
mapscript portion of "make" in the top level mapserver source
directory with much repetition removed. Anything come to mind?
For anyone who cares to look at the gory details, the complete output of
the scripts, with command echoing turned on, I use to run "env |
sort", "configure", "make". for building
mapserver, php, postgresql, proj4, gd and bison are available at
<a href="http://asaf-srv1.humboldt.edu/build-ms/" eudora="autourl">http://asaf-srv1.humboldt.edu/build-ms/</a>.
</pre>This is on a complete Solaris 9, 12/03 system, plus the complete
Companion CD (lots of GNU and other F/OSS stuff compiled by Sun using
their compilers which I do not have) and the defaults from the Supplement
CD and the latest patches as of Feb 9th. The versions of the
packages I built from source and the dates on which I built them are
encoded in the names of the output files at the above URL.
/usr/local is a symlink to /opt/local. I use gcc to
compile.<br><br>
thanks,<br>
/don<br><br>
Since preparing the rest of this email and the *-build.out files at the
above URL, I tried the suggestions in
<a href="http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?Solaris8Build" eudora="autourl">http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?Solaris8Build</a>
and they did not seem to change anything (at least not at this stage of not being able to build the shared library.)<br><br>
<br>
<pre>touch mapscriptvars
pwd > mapscriptvars
echo -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT >> mapscriptvars
echo -I. -I/usr/local/include -I/usr/local/include >> mapscriptvars
echo -L. -lmap -L/usr/local/lib -lgd -L/lib -lz -L/lib -lXpm -lX11 -L/lib -lz -L/lib -lXpm -lX11 -L/usr/local/lib -lproj -L/usr/local/pgsql/lib -lpq -lm -lstdc++ >> mapscriptvars
echo >> mapscriptvars
gcc -c -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_POSTGIS -I/usr/local/include -I/usr/local/include -I/usr/local/pgsql/include tile4ms.c -o tile4ms.o
gcc -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_POSTGIS -I/usr/local/include -I/usr/local/include -I/usr/local/pgsql/include tile4ms.o -L. -lmap -L/usr/local/lib -lgd -L/lib -lz -L/lib -lXpm -lX11 -L/lib -lz -L/lib -lXpm -lX11 -L/usr/local/lib -lproj -L/usr/local/pgsql/lib -lpq -lm -lstdc++ -o tile4ms
cd mapscript/php3; make; cd ../..
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4 -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o php_mapscript_util.o php_mapscript_util.c
php_mapscript_util.c: In function `_phpms_fetch_handle2':
php_mapscript_util.c:147: warning: dereferencing type-punned pointer will break strict-aliasing rules
. . . 8 more pairs of such lines . . .
php_mapscript_util.c: In function `_php_extract_associative_array':
php_mapscript_util.c:511: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4 -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o php_mapscript.o php_mapscript.c
php_mapscript.c: In function `php3_ms_map_setExtent':
php_mapscript.c:1692: warning: dereferencing type-punned pointer will break strict-aliasing rules
. . . 14 more pairs of such lines . . .
php_mapscript.c: In function `php3_ms_rect_free':
php_mapscript.c:10095: warning: dereferencing type-punned pointer will break strict-aliasing rules
php_mapscript.c: In function `php3_ms_shapefile_getshape':
php_mapscript.c:10463: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_getpoint':
php_mapscript.c:10522: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_gettransformed':
php_mapscript.c:10587: warning: int format, long int arg (arg 3)
php_mapscript.c: In function `php3_ms_shapefile_free':
php_mapscript.c:10693: warning: dereferencing type-punned pointer will break strict-aliasing rules
php_mapscript.c: In function `php3_ms_projection_free':
php_mapscript.c:10842: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc -fPIC -O2 -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_EPPL -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -I/opt/local/src/mapserver-4.0.1 -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4 -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/dl -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/main -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/Zend -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/include -I/opt/local/src/mapserver-4.0.1/../php-4.3.4/TSRM -c -o mapscript_i.o mapscript_i.c
c++ -shared -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 <x-tab> </x-tab>referenced
against symbol<x-tab> </x-tab><x-tab> </x-tab> offset<x-tab> </x-tab>in file
<unknown> 0x49c <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a0 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a4 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4a8 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4ac <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4b0 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4b4 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4b8 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4bc <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0x4c0 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(maptemplate.o)
<unknown> 0xb64 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(mapsymbol.o)
</pre><font face="Courier New, Courier"> . . . about 10,000 (!) more such lines . . .<br><br>
<br><br>
</font><pre>ceil 0x111c <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(mapgraticule.o)
atan 0x7a4 <x-tab> </x-tab>/opt/local/src/mapserver-4.0.1/libmap.a(mapgd.o)
log10 0x1110 <x-tab> </x-tab>/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
*** Error code 1
make: Fatal error: Command failed for target `php_mapscript.so'
Current working directory /opt/local/src/mapserver-4.0.1/mapscript/php3
*** Error code 1
make: Fatal error: Command failed for target `php3_mapscript'
</pre><x-sigsep><p></x-sigsep>
<tt>Don Wolski mailstop ENRS, Natural Resources 211c<br>
Unix System Administrator Information Technology Unit<br>
dcw2 at humboldt.edu College of NR and Sciences<br>
707-826-3536 (voice) Humboldt State University<br>
707-826-3501 (fax) Arcata, CA 95521-8299 </body>
</html>
--=====================_289422281==.ALT--
More information about the MapServer-users
mailing list