[mapserver-users] PHP mapscript compiling

Vincenzo Patruno vincenzo.patruno at istat.it
Tue Oct 29 11:11:56 EST 2002


Hi!

I've trouble compiling Mapscript (Mapserver-3.6.3) with PHP on my IBM-AIX system.
I launch the command
./configure --with-php=../php-4.2.3 --with-gd
and then I execute the command "make".

The system compiles mapserver without any problem. The problem (I think) is when the system goes to
compile mapscript.
Suddenly the system stops with the following error:

...
cd mapscript/php3; make; cd ../..
make[1]: Entering directory `/usr/lpp/apachessl/sorgenti/mapserver-3.6.3/mapscript/php3'
cc -O -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -D_ALL_SOURC
E -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I. -I..   -O2  -Wall -DCOMPIL
E_DL=1 -DPHP4 -DUSE_EPPL -DUSE_TIFF   -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -
DUSE_GD_FT -DUSE_JPEG  -I/usr/lpp/apachessl/sorgenti/mapserver-3.6.3          -I
/usr/local/include   -I/usr/lpp/apachessl/sorgenti/php-4.2.3 -I/usr/lpp/apachess
l/sorgenti/php-4.2.3/dl -I/usr/lpp/apachessl/sorgenti/php-4.2.3/main -I/usr/lpp/
apachessl/sorgenti/php-4.2.3/Zend -I/usr/lpp/apachessl/sorgenti/php-4.2.3/includ
e -I/usr/lpp/apachessl/sorgenti/php-4.2.3/TSRM  -c -o php_mapscript_util.o php_m
apscript_util.c
make[1]: cc: Command not found
make[1]: *** [php_mapscript_util.o] Error 127
make[1]: Leaving directory `/usr/lpp/apachessl/sorgenti/mapserver-3.6.3/mapscrip
t/php3'

But I don't have cc installed on my system (I use gcc).
So, I've opened the Makefile under mapscript/php3 and I've modified the first part of the file

CC =     cc -O -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -D_
ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I. -I..
LD =     ld -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noen
try -lc -bE:perl.exp
CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
RUNPATHS=

changing cc with gcc. 
Also in this case the system stops showing the following error:

ld -bhalt:4 -bM:SRE -bI:/perl.exp -bE:.exp -b noentry -lc -bE:perl.exp -o php_ma
pscript.so php_mapscript_util.o php_mapscript.o mapscript_i.o  -L/usr/lpp/apache
ssl/sorgenti/mapserver-3.6.3 -lmap         -ltiff -ljpeg -L/lib -lttf -lpng -lz 
 -lgd -L/usr/local/lib -lgd -ljpeg -L/lib -lttf -lpng -lz -ljpeg   -lm 
ld: 0706-003 Cannot find or read import file: /perl.exp
        ld:accessx(): A file or directory in the path name does not exist.
ld: 0706-004 Cannot find or read export file: .exp
        ld:accessx(): A file or directory in the path name does not exist.
ld: 0706-004 Cannot find or read export file: perl.exp
        ld:accessx(): A file or directory in the path name does not exist.
make: *** [php_mapscript.so] Error 255

....... And I don't know what's the rule of Perl ....


-----------------------

Then I changed strategy!

I installed the nightly version, and in this case I compiled everything without any problem.
The problem is that the system don't create the file php_mapscript.so.

Also in this case I opened the Makefile under mapscript/php3 and this is the first part of the file

CC =     gcc
LD =     /bin/true
CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
RUNPATHS=  -L/usr/local/lib -L/lib -L/usr/lpp/apachessl/sorgenti/mapserver_dev




Any suggestion? 

Thanks in advance
Vincenzo

















More information about the mapserver-users mailing list