php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17130 PHP won't find the freetype 1.3 headers on RH7.2
Submitted: 2002-05-09 17:40 UTC Modified: 2002-06-18 21:11 UTC
From: morissette at dmsolutions dot ca Assigned:
Status: Closed Package: GD related
PHP Version: 4.2.0 OS: Linux RH 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: morissette at dmsolutions dot ca
New email:
PHP Version: OS:

 

 [2002-05-09 17:40 UTC] morissette at dmsolutions dot ca
I am trying to compile PHP with GD and TTF support with a custom version of the GD-1.8.4 library compiled with Freetype 1.3 on a RH 7.2 system which came with both freetype 1.3 and freetype 2.0 rpms preinstalled by default. I removed the gd-devel rpm which came preinstalled on the system in order to use my own custom GD which is installed under /usr/local/lib.

I configure PHP with  '--with-ttf=/usr --with-gd=/usr/local --enable-gd-native-ttf' and PHP configure detects the right GD, but it doesn't detect freetype 1.3.

Looking in ext/config.m4, I find that the script looks for freetype1 headers in
  /usr/include/freetype.h
  /usr/include/freetype/freetype.h
  /usr/local/include/freetype.h
  /usr/local/include/freetype/freetype.h
  $TTF_DIR/include/freetype.h
  $TTF_DIR/include/freetype/freetype.h

But RH7.2 comes with the freetype1 headers installed in 
  /usr/include/freetype1/freetype/freetype.h

A workaround is to create a logical link from /usr/include/freetype -> /usr/include/freetype1/freetype ... and that works... with that logical link my PHP builds with TTF support...

... but I think a better fix would be to modify ext/gd/config.m4 to look for freetype1 headers under $TTF_DIR/include/freetype1/freetype/freetype.h as well.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-18 04:37 UTC] derick@php.net
Can you please try the latest cvs snapshot from snaps.php.net and report back if it works for you now?
 [2002-06-18 18:29 UTC] morissette at dmsolutions dot ca
I tried with php4-200206181200 from snaps.php.net and the problem is still present.

The following change to ext/gd/config.m4 fixes it (after re-running autoconf of course):

--- ext/gd/config.m4.original   Tue Jun 18 18:11:32 2002
+++ ext/gd/config.m4    Tue Jun 18 18:12:39 2002
@@ -129,6 +129,10 @@
             TTF_DIR=$i
             TTF_INC_DIR=$i/include/freetype
           fi
+          if test -f "$i/include/freetype1/freetype/freetype.h"; then
+            TTF_DIR=$i
+            TTF_INC_DIR=$i/include/freetype1/freetype
+          fi
         done
       fi
       if test -n "$TTF_DIR" ; then
 [2002-06-18 21:11 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 [2002-06-18 21:11 UTC] sniper@php.net
Forgot to add: I applied your patch there..so it should work now for real. :)


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 19:01:36 2025 UTC