You are here: OS X compile problem with GD « PHP « IT news, forums, messages
OS X compile problem with GD

Posted by Marcus Bointon on 10/17/62 11:25

I've suddenly developed a peculiar compile problem in PHP5. I'm
trying to build PHP 5.0.4, 5.0.5RC1, 5.0.5RC2 or 5.1RC1, and they
have started giving me an odd problem with GD:

gcc -I/Users/marcus/src/php-5.0.4/ext/gd/libgd -DHAVE_LIBPNG -
DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -Iext/gd/ -I/Users/marcus/src/
php-5.0.4/ext/gd/ -DPHP_ATOM_INC -I/Users/marcus/src/php-5.0.4/
include -I/Users/marcus/src/php-5.0.4/main -I/Users/marcus/src/
php-5.0.4 -I/usr/include/libxml2 -I/sw/include -I/sw/lib/freetype219/
include -I/sw/lib/freetype219/include/freetype2 -I/Users/marcus/src/
php-5.0.4/ext/mbstring/oniguruma -I/Users/marcus/src/php-5.0.4/ext/
mbstring/libmbfl -I/Users/marcus/src/php-5.0.4/ext/mbstring/libmbfl/
mbfl -I/usr/local/mysql/include -I/sw/include/libxml2 -I/Users/marcus/
src/php-5.0.4/TSRM -I/Users/marcus/src/php-5.0.4/Zend -I/sw/include -
no-cpp-precomp -DBIND_8_COMPAT=1 -DEAPI -O3 -mcpu=G4 -mtune=G4 -I/sw/
include -c /Users/marcus/src/php-5.0.4/ext/gd/gd.c -o ext/gd/gd.o
&& echo > ext/gd/gd.lo
/Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function 'zm_info_gd':
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: 'FREETYPE_MAJOR'
undeclared (first use in this function)
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: (Each undeclared
identifier is reported only once
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: for each function
it appears in.)
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: 'FREETYPE_MINOR'
undeclared (first use in this function)
/Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function 'php_imagechar':
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:2810: warning: pointer
targets in passing argument 1 of 'strlen' differ in signedness
/Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function
'php_imagettftext_common':
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:3189: warning: pointer
targets in passing argument 4 of 'gdImageStringFTEx' differ in
signedness
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:3189: warning: pointer
targets in passing argument 9 of 'gdImageStringFTEx' differ in
signedness
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:3195: warning: pointer
targets in passing argument 4 of 'gdImageStringFT' differ in signedness
/Users/marcus/src/php-5.0.4/ext/gd/gd.c:3195: warning: pointer
targets in passing argument 9 of 'gdImageStringFT' differ in signedness
make: *** [ext/gd/gd.lo] Error 1

I tried switching from the bundled GD to a version compiled from
fink, but it made no difference. My current configure is:

'./configure' \
'--with-layout=Darwin' \
'--bindir=/usr/bin' \
'--disable-ipv6' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-dba' \
'--enable-exif' \
'--enable-ftp' \
'--enable-gd-imgstrttf' \
'--enable-gd-native-ttf' \
'--enable-mbregex' \
'--enable-mbstring' \
'--enable-mcal' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-track-vars' \
'--enable-wddx' \
'--sysconfdir=/etc' \
'--with-apxs2filter=/sw/sbin/apxs' \
'--with-bz2' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc/php.d' \
'--with-curl' \
'--with-db4=/sw' \
'--with-dom=/sw' \
'--with-freetype-dir=/sw/lib/freetype219' \
'--with-gd=/sw' \
'--with-gdbm=/sw' \
'--with-iconv=/sw' \
'--with-imap-ssl=/sw' \
'--with-jpeg-dir=/sw' \
'--with-png-dir=/sw' \
'--with-ldap' \
'--with-mcrypt=/sw' \
'--with-mhash=/sw' \
'--with-mysql=/usr/local/mysql' \
'--with-mysqli=/usr/local/mysql/bin/mysql_config' \
'--with-openssl' \
'--with-pcre=/sw' \
'--with-pear' \
'--with-png' \
'--with-tidy=/sw' \
'--with-ttf' \
'--with-xml' \
'--with-xmlrpc' \
'--with-xsl' \
'--with-zlib' \
'--without-oci8'

you can see that I'm pulling in a fair number of things form fink,
but until recently it was all working fine with 5.0.4. There are only
two options that affect gd directly: --with-gd and --with-freetype-
dir. The configure script doesn't report any problems:

....
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... yes
checking for FreeType 2... /sw/lib/freetype219
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... (cached) yes
checking for floorf... (cached) yes
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
....

Any idea why this is not working?

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация