GD Library

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue May 6 12:02:05 BST 2003


--LSp5EJdfMPwZcMS1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 06, 2003 at 11:27:47AM +0100, Abdul Salam wrote:

> Thank you for that. But, I am still having trouble linking my PHP to the
> latest version of GD. By pkg_info command I am getting 2.0.1.3 as the
> installed version of gd. But, in PHP I am getting version 1.6.2. It
> sounds like PHP is not linking with the latest version of the GD on the
> server. I have re-compiled with "--without-gd --with-gd=3D/usr/local"
> option to avoid taking the default library. But, it is failing to
> compile. Looks like my Makefile is looking in a wrong location for
> libraries. I am not sure whether it is a good idea to change it manually
> in Makefile. One more thing I have noticed is my libgd.so is linked to
> libgd.so.2 rather than libgd.so.4. Manually re-linking of this to
> libgd.so.4 will do the trick..?. Or this needs to be done in some other
> way?

Yes --- if libgd.so is sym-linked to libgd.so.2 then you'll end up
building PHP against GD 1.x.  You should make the link point at
libgd.so.4 to achieve what you want:

    # cd /usr/local/lib
    # rm libgd.so
    # ln -s libgd.so.4 libgd.so

Then rebuild, reinstall PHP and restart apache as before.

Another handy command is 'ldd' which will tell you exactly what shlibs
your PHP module is linking against:

    % cd /usr/local/libexec/apache
    % ldd ./libphp4.so
    ./libphp4.so:
            libmysqlclient.so.10 =3D> /usr/local/lib/mysql/libmysqlclient.s=
o.10 (0x28245000)
            libgd.so.4 =3D> /usr/local/lib/libgd.so.4 (0x2827b000)
            libfreetype.so.9 =3D> /usr/local/lib/libfreetype.so.9 (0x282c90=
00)
            libpng.so.5 =3D> /usr/local/lib/libpng.so.5 (0x2831a000)
            libz.so.2 =3D> /usr/lib/libz.so.2 (0x2833d000)
            libjpeg.so.9 =3D> /usr/local/lib/libjpeg.so.9 (0x2834b000)
            libbz2.so.1 =3D> /usr/lib/libbz2.so.1 (0x28369000)
            libcrypt.so.2 =3D> /usr/lib/libcrypt.so.2 (0x28379000)
            libm.so.2 =3D> /usr/lib/libm.so.2 (0x28392000)
            libc.so.4 =3D> /usr/lib/libc.so.4 (0x28069000)
            libXpm.so.4 =3D> /usr/X11R6/lib/libXpm.so.4 (0x283ae000)
            libX11.so.6 =3D> /usr/X11R6/lib/libX11.so.6 (0x283bc000)
            libXext.so.6 =3D> /usr/X11R6/lib/libXext.so.6 (0x2847a000)
            libXThrStub.so.6 =3D> /usr/X11R6/lib/libXThrStub.so.6 (0x284880=
00)

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--LSp5EJdfMPwZcMS1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+t5YtdtESqEQa7a0RAviSAKCW4TNQiRL+BYn7QXDIHza7/IlCDgCgjPsh
bSHiF4gVwDqBNxGHYo69aGU=
=2GGl
-----END PGP SIGNATURE-----

--LSp5EJdfMPwZcMS1--




More information about the Ukfreebsd mailing list