Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Building PHP errors on me about freetype.h

Hi,

I'm building php 5.2.3 from source with the following config string:

./configure \
--prefix=/usr/local/php52 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-id3 \
--with-mcrypt=/sw \
--with-mhash=/sw \
--with-curl=/usr/bin/curl \
--with-iconv=/sw \
--with-openssl=/sw \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-pdflib=/sw/bin \
--with-zlib=/usr \
--with-zlib-dir=/usr \
--with-imap-ssl=/usr \
--enable-calendar \
--with-mime-magic=/usr/local/apache2/conf/magic \
--with-iodbc=/usr \
--with-bz2=/usr/bin/bzip2 \
--with-curlwrappers \
--with-xmlrpc \
--with-iconv-dir=/usr \
--enable-exif \
--enable-wddx \
--enable-soap \
--with-ldap \
--enable-ftp \
--enable-sockets \
--enable-mbstring \
--enable-openbase_module \
--with-expat=/sw \
--enable-trans-sid \
--with-ming=/sw \
--enable-yp \
--with-libxml-dir=/sw \
--with-dom=/sw \
--with-dom-xslt=/sw \
--with-dom-exslt=/sw \
--with-xmlreader \
--with-xsl=/sw \
--with-libexpat-dir=/sw \
--with-kerberos \
--with-ttf=/sw \
--with-gd \
--with-jpeg-dir=/sw \
--with-png-dir=/sw \
--with-mysql=/usr/local/mysql/ \
--with-gettext=/sw \
--with-freetype-dir=/usr/X11R6/include/ \
--with-xpm-dir=/usr/X11R6/include/

I installed all dev and standard versions of everything that is needed to provide the files to make this work. The problem is that it fails to find freetype.h which I can locate at the include directories.

The extensions configuration part output by configure:

Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /sw
checking for xml2-config path... /sw/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... yes
checking for krb5-config... /usr/bin/krb5-config
checking for DSA get_defaultmethod in -lssl... no
checking for pkg-config... /sw/bin/pkg-config
checking for OpenSSL version... >= 0.9.6
checking for CRYPTO_free in -lcrypto... yes
checking for SSL CTX_set_sslversion in -lssl... yes
checking for PCRE support... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... /usr
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... no
checking for BZip2 support... yes
checking for BZip2 in default path... found in /usr
checking for BZ2_bzerror in -lbz2... yes
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking if we should use cURL for url streams... yes
checking for cURL in default path... found in /usr
checking for cURL 7.10.5 or greater... libcurl 7.13.1
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... yes
checking for gnutls support in libcurl... no
checking for curl easyperform in -lcurl... yes
checking for curl versioninfo in -lcurl... yes
checking for curl easystrerror in -lcurl... yes
checking for curl multistrerror in -lcurl... yes
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking whether to enable DBA... no
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /sw/bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... yes
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... yes
checking OpenSSL dir for FTP... no
checking for OpenSSL version... >= 0.9.6
checking for CRYPTO_free in -lcrypto... (cached) yes
checking for SSL CTX_set_sslversion in -lssl... (cached) yes
checking for GD support... yes
checking for the location of libjpeg... /sw
checking for the location of libpng... /sw
checking for the location of libXpm... /usr/X11R6/include/
checking for FreeType 1.x support... /sw
checking for FreeType 2... /usr/X11R6/include/
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg readheader in -ljpeg... yes
checking for png writeimage in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
configure: error: freetype.h not found.


I don't know how to pass this... Help.. anyone? 🙂

Power Mac G5 Dual 2.0Ghz - 1.5GB RAM - 400+320 GB HDD, Mac OS X (10.4.9), ATI Radeon 9600 - Samsung 940B LCD - iPod with Video

Posted on Jun 20, 2007 5:03 AM

Reply
7 replies

Jun 20, 2007 5:29 AM in response to jbarros

That might help... but how exactly do I add that to my path?

$PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/sw/bin:/sw/include:/usr/X1 1R6/include:/usr/X11R6/bin

at the moment.
How do I add /sw/lib/freetype2/include/freetype2/freetype/freetype.h to that?
just like

/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/sw/bin:/sw/include:/usr/X11R6/in clude:/usr/X11R6/bin:/sw/lib/freetype2/include/freetype2/freetype/freetype.h ?

or leave the filename out?

Thanks in advance.

Jun 20, 2007 5:39 AM in response to John Keates

I'm sorry, I meant to ask if it appends /include to the path you give it.

EG:
--with-freetype-dir=/usr/local/X11R6

would tell it to look in /usr/local/X11R6/include

Because you are giving it a path to a package, and not a specific file, so it will append the path it believes it is looking for within that directory structure.

-- James

Building PHP errors on me about freetype.h

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.