|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64405 Use freetype-config for determining freetype2 dir(s)
Submitted: 2013-03-11 12:45 UTC Modified: 2013-12-11 22:04 UTC
From: Assigned: aharvey (profile)
Status: Closed Package: GD related
PHP Version: 5.4.12 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
40 - 36 = ?
Subscribe to this entry?

 [2013-03-11 12:45 UTC]
Currently PHP does not use pkg-config to determine the location of freetype2 
header files. Instead it looks for freetype.h in a set of dirs. On e.g multilib 
systems this causes ./configure to fail when using --with-freetype-dir

pkg-config --cflags freetype2                                                                                                                                                                                                           
-I/usr/lib64/freetype2/include/freetype2 -I/usr/lib64/freetype2/include 

And header files like:

Downstream bug:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-11 21:19 UTC] pgnet dot dev+phpbugs at gmail dot com
referencing my duplicate #66259, pkg-config or freetype-config are flexible options.  here, they produce different results:

	pkg-config --cflags --libs freetype2
		-I/usr/include/freetype2  -lfreetype  

	freetype-config --cflags --libs
		-lfreetype -lz -lpng15

a quick workaround @ php config-time, changing both

	perl -pi -e 's|(FREETYPE2_INC_DIR)=.*|$1=\$i/include|g'               ./configure
	perl -pi -e 's|freetype2/freetype/freetype.h|freetype2/freetype.h|g'  ./configure


	export CPPFLAGS="`pkg-config --cflags freetype2`"

which 'fixes' missing incorrect path references in GD ext, allows config & build to complete.
 [2013-12-11 22:04 UTC]
-Summary: Use pkg-config for determining freetype2 dir(s) +Summary: Use freetype-config for determining freetype2 dir(s) -Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
 [2013-12-11 22:04 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2013-12-20 03:23 UTC] vidurri at hotmail dot com
Solution in bug #66328 by Rafael Rocha Vidaurri

Let's search for the file on both directories replacing (on PHP "configure" file):
if test -f "$i/include/freetype2/freetype/freetype.h"; then

if test -f "$i/include/freetype2/freetype/freetype.h" || test -f "$i/include/freetype2/freetype.h";  then

Bye ;)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 01:01:28 2024 UTC