php.net |  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
 [2013-12-10 23:28 UTC] pgnet dot dev+phpbugs at gmail dot com
Description:
------------
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 <stas@php.net>
		Date:   Tue Dec 10 11:35:26 2013 -0800

		    Merge branch 'PHP-5.4' into PHP-5.5

		    * PHP-5.4:
		      5.3.29-dev
		      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.
	...

checking

	vi configure

			...
		39040
			  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
			        FREETYPE2_DIR=$i
			        FREETYPE2_INC_DIR=$i/include/freetype2
			        break
			      fi
			    done

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

on this system

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

	rpm -q --whatprovides /usr/include/freetype2/freetype.h
		freetype2-devel-2.5.1-84.1.x86_64

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

the test in configure is for 

	/usr/include/freetype2/freetype/freetype.h

but the file exists @

	/usr/include/freetype2/freetype.h

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

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




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] aharvey@php.net
-Package: *Compile Issues +Package: GD related
 [2013-12-11 20:53 UTC] aharvey@php.net
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] aharvey@php.net
-Status: Open +Status: Duplicate
 [2013-12-11 21:07 UTC] aharvey@php.net
Duplicate of bug #64405. (Sorry, didn't spot that earlier.)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC