Mapserver Install: undefined symbol: php_gd_gdImageCopy
Daniel Morissette
dmorissette at MAPGEARS.COM
Thu Sep 28 06:12:08 PDT 2006
Frank Warmerdam wrote:
>
> Strangely I ran into the very same thing a couple days ago. It turned
> out (as I recall) that I needed to install the PHP extension for GD. In
> my case, on a fedora core system, this amounted to something like
> "yum install php-gd" I believe.
>
Actually, doing this solves the undefined symbol, but you end up with
two *different* copies of the GD functions in your executable space: the
core of MapServer where most of the GD usage happens is built and linked
with the system GD, and the php_mapscript-specific functions (such as
imageObj.pasteImage() are built and linked with the PHP bundled GD.
At runtime you are likely going to run into problems if you use
functions such as imageObj.pasteImage() because the gdImage struct used
by both copies of GD is different.
As I was writing this, I just realized that removing any calls to
gd-specific functions from php_mapscript.c and moving those calls down
to wrappers in the mapserver core might be enough to solve the issue,
but I am hesitant to change this for 4.10.0.
The other workaround for this issue is to rebuild your PHP using the
system GD (i.e. --with-gd=/path/to/gd-prefix).
FYI, there is already bug 1879 about this:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1879
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list