Subject: Re: graphics/php-gd on OS X
To: John Klos <john@ziaspace.com>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 05/09/2006 21:54:08
On May 9, 2006, at 5:50 PM, John Klos wrote:

> Latest OS X 10.4 on Intel, latest pkgsrc, php 4 already installed:
>
>
> gcc -pipe -dynamic -flat_namespace -bundle -undefined suppress - 
> DPHP_ATOM_INC -I/Volumes/sys/pkgsrc/graphics/php-gd/work/php-4.4.2/ 
> ext/gd/include -I/Volumes/sys/pkgsrc/graphics/php-gd/work/php-4.4.2/ 
> ext/gd/main -I/Volumes/sys/pkgsrc/graphics/php-gd/work/php-4.4.2/ 
> ext/gd -I/usr/local/include/php -I/usr/local/include/php/main -I/ 
> usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/Volumes/ 
> sys/pkgsrc/graphics/php-gd/work/.buildlink/include -I/Volumes/sys/ 
> pkgsrc/graphics/php-gd/work/.buildlink/include/freetype2 -no-cpp- 
> precomp -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/ 
> include -DHAVE_CONFIG_H  -O2 -I/usr/local/include/freetype2 -I/usr/ 
> local/include -I/usr/include  -L/usr/local/lib -L/usr/lib -o ./ 
> gd.so  gd.lo gdttf.lo libgd/gd.lo libgd/gd_gd.lo libgd/gd_gd2.lo  
> libgd/gd_io.lo libgd/gd_io_dp.lo libgd/gd_io_file.lo libgd/gd_ss.lo  
> libgd/gd_io_ss.lo libgd/gd_png.lo libgd/gd_jpeg.lo libgd/gdxpm.lo  
> libgd/gdfontt.lo libgd/gdfonts.lo libgd/gdfontmb.lo libgd/ 
> gdfontl.lo libgd/gdfontg.lo libgd/gdtables.lo libgd/gdft.lo libgd/ 
> gdcache.lo libgd/gdkanji.lo libgd/wbmp.lo libgd/gd_wbmp.lo libgd/ 
> gdhelpers.lo libgd/gd_topal.lo libgd/gd_gif_in.lo libgd/xbm.lo  
> libgd/gd_gif_out.lo -R/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -L/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -lfreetype -R/Volumes/sys/pkgsrc/graphics/php- 
> gd/work/.buildlink/lib -L/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -lpng -R/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -L/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -lz -R/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -L/Volumes/sys/pkgsrc/graphics/php-gd/ 
> work/.buildlink/lib -ljpeg
> /usr/bin/ld: gd.lo bad magic number (not a Mach-O file)
> [more errors]
>
> Ideas?

It is using libtool to compile, but gcc to link.  Replace the link  
command with libtool.

Regards,
Min