[mapserver-users] PHP/Mapscript on FreeBSD

Rob Martinson cathode at nichebox.com
Sun Jul 1 09:51:39 EDT 2001


First off, cheers to the contributors of Mapserver, Mapscript and the
PHP module. You're providing an excellent resource for users that wish
to get into web mapping and don't have the budgets to go out and buy
MapXtreme or ArcIMS. Through Directions Magazine I've had the
opportunity to use many of the commercial solutions available and some
of the demos built with Mapserver are far more impressive. I have also
built several map server systems on the Windows platform using various
GIS objects and if I can get Mapserver to do what I want it to, I may
abandon my own favorite server.

Now for my problems....

I am running FreeBSD 4.2-RELEASE. I can reliably compile and use
Mapserver 3.3 and 3.4 or the nightly build as a CGI binary with no
problems but I have had no luck building any version with PHP 4.0.5 or
4.0.6 as a dynamic module. Configuration goes fine using:

./configure --with-gd=/usr/local --with-jpeg=/usr/local --without-ttf
--with-php=../php-4.0.6 --with-apxs=/usr/local/www/bin/apxs
--enable-runpath

>From what I've read, configuration on FreeBSD is a bit goofy... I end up
with the following in my mapscript/php3/Makefile:

CC =     cc undef  -I. -I.. -DPIC -fpic
LD =     cc -Wl -Wl
CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
RUNPATHS=  -R/usr/local/lib -R/usr/local/src/mapserver

>From here I remove undef from CC options and try for a build.

It attempts to link with:

cc -Wl -Wl -o php_mapscript.so php_mapscript_util.o php_mapscript.o
mapscript_i.o -R/usr/local/lib -R/usr/local/src/mapserver
-L/usr/local/src/mapserver -lmap      -L/usr/local/lib -ljpeg
-L/usr/local/lib -lgd -lpng -lz   -lm

And I end up with a bunch of undefined references in
php_mapscript_util.o (zend_error, zend_list_find and so on and so on).

The last line is:

/usr/local/src/mapserver/libmap.a(maplabel.o)(.text+0x1096): more
undefined references to `imageStringTTF' follow
*** Error code 1

And I get no farther.

Does anyone have Mapscript/PHP running under FreeBSD 4.0 or higher with
a recent release of PHP 4? Any suggestions to push me in the right
direction?

Thanks in advance.

Rob Martinson
Nichebox - http://www.nichebox.com
Development - http://dev.nichebox.com 




More information about the mapserver-users mailing list