[mapserver-users] Still can't compile MapScript on FreeBSD 4.5

Dana Coe thesquid at FriedBaloney.com
Mon Jul 22 10:15:09 PDT 2002


Hello,

Thanks for all the suggestions last time around, but I somehow still can't
seem to compile Mapscript on my system.
The system is:
FreeBSD 4.5
Apache 1.3.26
PHP 4.2.1
Mapserver 3.6.1

PHP was configured as such:
./configure --with-mysql --with-system-regex

In php.ini: register_globals = On

Mapserver configuration:
./configure --enable-runpath --with-proj=/usr/local/
--with-php=/usr/local/src/php-4.2.1/

I've edited the mapscript makefile as suggested:

CC =    gcc   -I. -I.. -DPIC -fpic
LD =     gcc -Wl -Wl
CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
RUNPATHS=  -R/usr/local/lib -R/usr/local/src/mapserver-3.6.1
.
.
.
#CFLAGS := $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP_INC)
# became:
CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4 $(MS_DEFINE) $(MS_INC) $(PHP_INC)
.
.
.
# and:
%.o: %.c php_mapscript_util.h php_mapscript.h
        $(CC) $(CFLAGS) -c $<

To no avail. Without the "undef" flag, I get undefined calls to routines.

gcc -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-3.6.1
-L/usr/local/src/mapserver-3.6.1 -lmap        -L/usr/local//lib -lproj
-ltiff -ljpeg -lfreetype -lpng -lz -lpdf -lgd -L/usr/local/lib -lgd -ljpeg
-lfreetype -lpng -lz -ljpeg   -lm
/usr/libexec/elf/ld: warning: libfreetype.so.8, needed by
/usr/local//lib/libgd.so, may conflict with libfreetype.so.9
php_mapscript_util.o: In function `_phpms_report_mapserver_error':
php_mapscript_util.o(.text+0x33): undefined reference to `zend_error'
php_mapscript_util.o: In function `_phpms_fetch_handle2':
php_mapscript_util.o(.text+0x95): undefined reference to `zend_hash_find'
.
.
.
...and so forth

With it, it just stops with an error 1.


All of the referenced directories exist.

Is there anyone out there who has gotten php/mapscript to compile on a
FreeBSD machine?

Thanks for any help!

Dana L Coe




More information about the MapServer-users mailing list