我在Mac OS X 10.5.6上编译PHP5.2.9。需要一些帮助来解决这个问题。在Mac上使用GD2和Freetype编译PHP的错误Leopard 10.5.6
我有PHP编译和基本配置工作,现在我试图用GD2编译。我遇到的问题是,如果我添加参数与Freetype构建,我得到生成错误。这是我最小的配置来演示问题。另外,我知道libjpeg/libpng还有其他一些要求,我现在不包括那些让这个更简单的东西。
sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/conf/php \
--enable-fastcgi \
--with-freetype-dir=/usr/local \
--with-gd
错误:
checking for FT_New_Face in -lfreetype... no
configure: error: Problem with freetype.(a|so). Please check config.log for more information.
这是从错误日志:
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. */
我已经freelib-2.1.3从源代码编译并安装位于/ usr /本地/,如我在--with-freetype-dir参数中定义。我想它告诉我它试图找到一个字体文件,但我不知道何时或如果这样的字体正在安装。
如果我没有使用Freetype构建,GD2将构建并安装,但我想在我的系统上具有Freetype功能。下面是我的完整配置的设置对于FreeType选项(这是失败的一个!)
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