|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66259 configure fails to find freetype.h; incomplete paths checked in configure
Submitted: 2013-12-10 23:28 UTC Modified: 2013-12-11 21:07 UTC
From: pgnet dot dev+phpbugs at gmail dot com Assigned:
Status: Duplicate Package: GD related
PHP Version: 5.5Git-2013-12-10 OS: linux/64
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:
7 + 47 = ?
Subscribe to this entry?

 [2013-12-10 23:28 UTC] pgnet dot dev+phpbugs at gmail dot com
building a new pull of php 5.5,

	cd /usr/local/src/php-src
	git log | head
		commit 41cd53329871cb99799cd9a8f76151312be2e960
		Merge: bc8f776 b1b23ab
		Author: Stanislav Malyshev <>
		Date:   Tue Dec 10 11:35:26 2013 -0800

		    Merge branch 'PHP-5.4' into PHP-5.5

		    * PHP-5.4:
		      Fix CVE-2013-6420 - memory corruption in openssl_x509_parse

configure fails

	./configure ... --with-freetype-dir=/usr ...

@ a missing "freetype.h",

	checking for FreeType 2... /usr
	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
	If configure fails try --with-vpx-dir=<DIR>
	checking for jpeg_read_header in -ljpeg... yes
	checking for png_write_image in -lpng... yes
	If configure fails try --with-xpm-dir=<DIR>
	configure: error: freetype.h not found.


	vi configure

			  if test "$PHP_FREETYPE_DIR" != "no"; then

			    for i in $PHP_FREETYPE_DIR /usr/local /usr; do
			      if test -f "$i/include/freetype2/freetype/freetype.h"; then

			    if test -z "$FREETYPE2_DIR"; then
			      as_fn_error $? "freetype.h not found." "$LINENO" 5

on this system

	find /usr/include -type f -name freetype.h

	rpm -q --whatprovides /usr/include/freetype2/freetype.h

	rpm -ql freetype2-devel-2.5.1-84.1.x86_64 | grep freetype.h

the test in configure is for 


but the file exists @


that path should be correctly included in test, or use pkg-config

	pkg-config --cflags freetype2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-10 23:30 UTC] pgnet dot dev+phpbugs at gmail dot com
-Summary: Memcached compile error +Summary: configure fails to find freetype.h; incomplete paths checked in configure -Package: memcached +Package: *Compile Issues -PHP Version: 5.5Git-2013-12-10 (Git) +PHP Version: 5.5Git-2013-12-10
 [2013-12-10 23:30 UTC] pgnet dot dev+phpbugs at gmail dot com
correct bug settings
 [2013-12-11 20:53 UTC]
-Package: *Compile Issues +Package: GD related
 [2013-12-11 20:53 UTC]
If we can rely on freetype-config always existing when Freetype is installed, that's probably the way to go here.
 [2013-12-11 21:07 UTC]
-Status: Open +Status: Duplicate
 [2013-12-11 21:07 UTC]
Duplicate of bug #64405. (Sorry, didn't spot that earlier.)
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 00:03:57 2022 UTC