Operating System - HP-UX
1828337 Members
3902 Online
109976 Solutions
New Discussion

ld errors when compliling php

 
Alex Macdonald
Advisor

ld errors when compliling php

Hello,

I'm trying to compile php with mysql and gd support, and I keep getting the following error when ld tries to link the libraries:

/usr/ccs/bin/ld: Unsatisfied symbols:
gdFreeFontCache (first referenced in ext/gd/gd.lo) (code)
collect2: ld returned 1 exit status
gmake: *** [sapi/cli/php] Error 1

Does anyone know how to fix this? Thanks.
1 REPLY 1
Steve Post
Trusted Contributor

Re: ld errors when compliling php

One problem is due to the extention expected for shared libraries.
HP has thing.sl instead of thing.so.
sl: Shared Library in HP.
so: Shared Object in everything else.

Check out the make files.
--------------------------
In "configure.pl" you need to change
from $sharedLinkHead = "ld -shared";
to $sharedLinkHead = "ld -b";
Wherever $sharedLinkHead is set.
This is because ld runs different in hpux.
THEN you can run "/opt/perl/bin/perl configure.pl".
------------------------------
When I was trying to gd installed, it kept dying because it was looking for libgd stuff already. In the notes, I found you could run "$MAKE libgd.a" to build the libgd files ahead of time. Then they could be copied to where it expected libraries to be. For me is was:
# $MAKE libdg.a
# cp -p ./libgd\.* /www_test/lib/lib/.
Then "$MAKE install" would work because it found the gd library it wanted.
--------------------------------
I see you have "/usr/ccs/bin/ld" in your error message. Perhaps you have the hpux CC running before GCC? Check the PATH.

It's been awhile since I worked on compiling GD. Hope some of these half-tips help.

Steve