I'm compiling PHP5.2.9 on Mac OS X 10.5.6. Need some help to figure this out.
I have PHP compiling and working with a basic config, and now I'm trying to compile with GD2. The problem I'm running into is that if I add the argument to build with Freetype, I get build errors. This is my minimum config to demo the problem. Also, I know that there are other requirements for libjpeg/libpng, etc. I'm not including those right now to make this simpler.
sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/conf/php \
--enable-fastcgi \
--with-freetype-dir=/usr/local \
--with-gd
Error:
checking for FT_New_Face in -lfreetype... no
configure: error: Problem with freetype.(a|so). Please check config.log for more information.
This is from the error log:
configure:36779: gcc -o conftest -gstabs -no-cpp-precomp -Wl,-rpath,/usr/loca$
Undefined symbols:
"_FT_New_Face", referenced from:
_main in ccgzHTP6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure: failed program was:
#line 36768 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
I have freelib-2.1.3 built from source and installed at /usr/local/, as I defined in the --with-freetype-dir argument. I think its telling me its trying to find a font file, but I'm not sure when or if such a font is being installed.
If I build without Freetype, GD2 will build and install but I want to have Freetype capability on my system. The following is my complete config setup with Freetype option(the one that's failing!)
sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/conf/php --enable-fastcgi \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-zlib-dir=/usr/local \
--enable-gd-native-ttf \
--with-tlib=/usr/local \
--with-freetype-dir=/usr/local \
--with-xpm-dir=/usr/X11R6 \
--with-gd