Compiling PHP with freetype2 on MacOS X

From: Date: Fri, 24 Feb 2006 14:09:16 +0000
Subject: Compiling PHP with freetype2 on MacOS X
Groups: php.general 
Request: Send a blank email to php-general+get-231020@lists.php.net to get a copy of this message
Recently I've not been able to compile PHP 5.1.2 on OS X 10.4 with gd and freetype2 support. I've found various threads on this, but none of the proposed fixes work. My configure line includes: --with-gd=/sw --with-freetype-dir=/sw/lib/freetype2 --with-t1lib=/sw It doesn't report any problems when configuring: ... checking for GD support... yes checking for the location of libjpeg... /sw checking for the location of libpng... /sw checking for the location of libXpm... no checking for FreeType 1.x support... /sw checking for FreeType 2... /sw/lib/freetype2 checking for T1lib support... /sw checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for jpeg_read_header in -ljpeg... (cached) yes checking for png_write_image in -lpng... (cached) yes If configure fails try --with-xpm-dir=<DIR> checking for FreeType 1 support... no - FreeType 2.x is to be used instead checking for T1_StrError in -lt1... (cached) yes checking for gdImageString16 in -lgd... (cached) yes checking for gdImagePaletteCopy in -lgd... (cached) yes checking for gdImageCreateFromPng in -lgd... (cached) yes checking for gdImageCreateFromGif in -lgd... (cached) yes checking for gdImageGif in -lgd... (cached) yes checking for gdImageWBMP in -lgd... (cached) yes checking for gdImageCreateFromJpeg in -lgd... (cached) yes checking for gdImageCreateFromXpm in -lgd... (cached) yes checking for gdImageCreateFromGd2 in -lgd... (cached) yes checking for gdImageCreateTrueColor in -lgd... (cached) yes checking for gdImageSetTile in -lgd... (cached) yes checking for gdImageEllipse in -lgd... no checking for gdImageSetBrush in -lgd... (cached) yes checking for gdImageStringTTF in -lgd... (cached) yes checking for gdImageStringFT in -lgd... (cached) yes checking for gdImageStringFTEx in -lgd... (cached) yes checking for gdImageColorClosestHWB in -lgd... (cached) yes checking for gdImageColorResolve in -lgd... (cached) yes checking for gdImageGifCtx in -lgd... (cached) yes checking for gdCacheCreate in -lgd... (cached) yes checking for gdFontCacheShutdown in -lgd... (cached) yes checking for gdFreeFontCache in -lgd... (cached) yes checking for gdNewDynamicCtxEx in -lgd... (cached) yes checking for gdImageCreate in -lgd... (cached) yes but when I make: /Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function 'zm_info_gd': /Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: 'FREETYPE_MAJOR' undeclared (first use in this function) /Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: (Each undeclared identifier is reported only once /Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: for each function it appears in.) /Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: 'FREETYPE_MINOR' undeclared (first use in this function) /Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function 'php_imagechar': /Users/marcus/src/php-5.1.2/ext/gd/gd.c:2817: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function 'php_imagettftext_common': /Users/marcus/src/php-5.1.2/ext/gd/gd.c:3197: warning: pointer targets in passing argument 4 of 'gdImageStringFTEx' differ in signedness /Users/marcus/src/php-5.1.2/ext/gd/gd.c:3197: warning: pointer targets in passing argument 9 of 'gdImageStringFTEx' differ in signedness /Users/marcus/src/php-5.1.2/ext/gd/gd.c:3203: warning: pointer targets in passing argument 4 of 'gdImageStringFT' differ in signedness /Users/marcus/src/php-5.1.2/ext/gd/gd.c:3203: warning: pointer targets in passing argument 9 of 'gdImageStringFT' differ in signedness make: *** [ext/gd/gd.lo] Error 1 Those undefined constants sound like it's missing a header file somewhere. I've also tried using the built-in freetype2 lib using --with-freetype-dir=/usr/X11R6 but that gives me the same error. I've also tried using the bundled gd lib, again I get the same error. I've cut my configure line down to just the options for the environment, gd and freetype. I've looked in /sw/lib/freetype2/include/freetype2/freetype/freetype.h and the missing constants are correctly defined in there, and also in /usr/X11R6/include/freetype2/freetype/freetype.h Those files should be found using the paths I gave in configure. Anyone got any idea how I can fix this? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

« previous php.general (#231020) next »