Mapscript & GD on FC3

Morten Hulden morten at UNTAMO.NET
Wed Feb 16 07:09:40 PST 2005


I have tried to install Mapserver and Mapscript on Fedora Core 3, using
the FC3 provided PHP SRPMS (4.3.10). In earlier FC versions compiling
Mapserver & Mapscript without recompiling PHP was not a problem because
PHP used the system GD. Now compilation of Mapscript fails because:

- FC3 PHP uses a bundled GD version
- the namespace for GD functions in PHP has changed: php_compat.h
redefines the function names with a prefix php_gd_ (e.g. gdImageCreate()
becomes php_gd_gdImageCreate())

So without specifying a --with-gd= path Mapscript compilation ends up
with an .so that contains undefined symbols and thus fails at dl-load.
(Besides that, the PHP-GD version is different from the system
GD-version so it would probably create runtime problems anyway).

If I on the other hand try to point to PHP's GD version by using
--with-gd=, then the configure script fails to detect GD capabilities
because of the function name changes.

So it looks like compiling a special PHP-cgi for Mapscript on FC3 is the
most feasible solution now. The other solution would be to hack the
Mapserver configuration scripts, add something similar to the
--with-php-regex-dir=, in order to base everything on PHP's bundled
GD-version and recognize the php_gd_ function prefixes.

Comments, experiences, suggestions anyone?



More information about the MapServer-users mailing list