php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28175 compile failure with freetype
Submitted: 2004-04-27 03:53 UTC Modified: 2004-12-14 01:15 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:1 (25.0%)
From: Paul dot Gardiner at Barleychalu dot Co dot Uk Assigned: iliaa (profile)
Status: Closed Package: GD related
PHP Version: 4.3.8 OS: slackware 9.1, 2.4.25 kernel
Private report: No CVE-ID: None
 [2004-04-27 03:53 UTC] Paul dot Gardiner at Barleychalu dot Co dot Uk
Description:
------------
./configure  --prefix=/usr/php --with-apxs=/usr/sbin/apxs --with-openssl=/usr --enable-sigchild --enable-libgcc --enable-bcmath --with-bz2=/usr --enable-calendar --enable-ctype --enable-dba=shared --enable-gdbm=/usr --enable-ndbm=/usr --enable-db2=/usr --enable-db3=/usr --enable-dbase --with-zlib --enable-ftp --with-mhash=/usr/local --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=/usr/local --with-pgsql=/usr/local --enable-shmop --enable-sockets --enable-inline-optimization --enable-sysvsem --enable-sysvshm --enable-wddx --with-gnu-ld --with-gettext --with-freetype-dir=/usr --enable-gd-native-ttf

when making this is where error starts

/bin/sh /usr/local/src/servers/php-4.3.6/libtool --silent --preserve-dup-deps --mode=compile gcc -I/usr/local/src/servers/php-4.3.6/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -Iext/gd/ -I/usr/local/src/servers/php-4.3.6/ext/gd/ -DPHP_ATOM_INC -I/usr/local/src/servers/php-4.3.6/include -I/usr/local/src/servers/php-4.3.6/main -I/usr/local/src/servers/php-4.3.6 -I/usr/local/src/servers/php-4.3.6/Zend -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/include/mysql -I/usr/local/src/servers/php-4.3.6/ext/xml/expat  -I/usr/local/src/servers/php-4.3.6/TSRM  -g -O2  -prefer-pic -c /usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c -o ext/gd/libgd/gdft.lo
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c: In function `fontFetch':
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:478: `FT_ENCODING_MS_SYMBOL' undeclared (first use in this function)
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:478: (Each undeclared identifier is reported only once
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:478: for each function it appears in.)
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:479: `FT_ENCODING_ADOBE_CUSTOM' undeclared (first use in this function)
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:479: `FT_ENCODING_ADOBE_STANDARD' undeclared (first use in this function)
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c: In function `gdImageStringFTEx':
/usr/local/src/servers/php-4.3.6/ext/gd/libgd/gdft.c:974: `FT_ENCODING_MS_SYMBOL' undeclared (first use in this function)
make: *** [ext/gd/libgd/gdft.lo] Error 1

version of gd: gd-2.0.3
./configure --prefix /usr

tried going back to php-4.3.4 and compiles fine with same ./configure listed above


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-28 14:37 UTC] paul dot gardiner at barleychalu dot co dot uk
I get the same on redhat 8. Removing the --with-freetype-dir=/usr from configure results in a successful compile. It used to work on 4.3.5. I'd guess it would probably be the upgrade of the bundled gd. Not had time to take a proper look though.
 [2004-04-29 15:25 UTC] iliaa@php.net
Try the following patch: http://ilia.ws/stuff/gd.txt 
 [2004-05-04 09:21 UTC] paul dot gardiner at barleychalu dot co dot uk
Iliaa,

I looked at your patch to gdft.c and modified it as there was a ')' missing from the end of the main line and it needed repeating further down in the file. Once this was applied it compiled OK :)

I've included a basic diff below.

Thanks,
- Paul -

476c476
< #if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
---
> #if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
485c485
< #endif /* Freetype 2.1 or better */
---
> #endif /* Freetype 2.1.3 or better */
973c973
< #if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
---
> #if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
983c983
< #endif /* Freetype 2.1 or better */
---
> #endif /* Freetype 2.1.3 or better */
 [2004-05-05 22:29 UTC] sniper@php.net
Ilia, check above comment. :)

 [2004-06-09 16:50 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2004-07-13 20:49 UTC] karen at lilycreek dot net
My host just upgraded to Plesk 7 with PHP 4.3.6 from Plesk 6.0 PHP 4.1.0 (I believe) I am running a Textpng php class calling a website's logo thru an image tag like so <img src="http://205.214.89.29/text2.php?msg=Pattys Plaster Gifts&rot=0&size=32&font=/home/httpd/vhosts/ionservers.com/httpdocs/fonts/HEATHER.TTF&pad=10&clr=cccccc">

I realize this isn't the most secure but it's the only way I could get the class to work on the old server which you can see it works if you view the image thru your browser, but now with the new server <img src="http://ionservers.com/text2.php?msg=Pattys Plaster Gifts&rot=0&size=32&font=/home/httpd/vhosts/ionservers.com/httpdocs/fonts/HEATHER.TTF&pad=10&clr=cccccc">
It does'nt work, I don't know if it's not initiating the vars or can't open the font file. This is a major problem for me as I have several hundred users running this for their website's main title logo. I've tried for over 20 hours straight to get it to work on the new system to no avail. Can someone please point me in the right direction for a solution. Wether the script needs a rewrite or a different PHP version needs to be installed, I'm stuck with hundreds of users breathing down my neck.

Thanks soooo much for any help or suggestions.

Karen
 [2004-07-14 22:23 UTC] ottenhoff at longsight dot com
I received the same error with 4.3.8 on Red Hat 8.0 w/ Freetype 2.1.2.

It looks like gdft.c 1.11.2.18 did not make it in 4.3.8.

The one changed line in 1.11.2.18 fixed the problem for me.

http://cvs.php.net/php-src/ext/gd/libgd/gdft.c
 [2004-12-14 01:15 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC