Click to See Complete Forum and Search --> : [RESOLVED] compiling php5 with gd on os x, undefined symbols


sanstenarios
05-17-2007, 06:53 AM
Hi,

i have os x 10.3.9 (and i don't intend to upgrade:)

i compiled gd with zlib libpng libjpg ok

i compiled php-5.2 without gd and it's fine

but when i compile with --with-gd=/usr/local

./configure --cache=/dev/null --with-mysql=/usr/local/mysql --with-apxs=/usr/sbin/apxs --with-zlib --with-libxml-dir=/usr/local --with-gd=/usr/local

make stops on errors

ld: Undefined symbols:
_gdImageCreateFromGif
_gdImageCreateFromGifCtx
_gdImageGifCtx
make: *** [libs/libphp5.bundle] Error 1

Where should these symbols be defined ?

I also linked the /usr/local/lib/libgd.* files in /usr/lib but... same result


thanx for any help

sanstenarios
05-18-2007, 07:23 AM
maybe i had a mix between fink libs and compiled libs. I suppressed fink (just renamed the /sw directory in case of bad surprise), updated automake and autoconf and... well it works now.

CousinCocaine
06-04-2007, 08:29 AM
sanstenarios,
thanks for comming back here with your solution, it helped me out.

PHP 5.2.3
OSX 10.4.9

my error:
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FT_New_Face in -lfreetype... yes
configure: error: GD build test failed. Please check the config.log for details.

your solution:
$ sudo mv /sw /sw-bak
after this you can do your normal ./configure.