Mac OS X 10.5.6でPHP5.2.9をコンパイルしています。これを理解するには何か助けが必要です。Mac Leopard 10.5.6でGD2とFreetypeを使ってPHPをコンパイルする際のエラー
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/local /、などのソースから構築してインストール私は--with-freetype-dir引数で定義しました。私はフォントファイルを見つけようとしていると言いますが、フォントがいつ、いつインストールされているのか分かりません。
Freetypeなしでビルドすると、GD2がビルドされインストールされますが、自分のシステムでFreetype機能を使用したいと考えています。以下はFreetypeのオプション(障害が発生しています1!)
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