我正在尝试在 Mac OS X Mavericks 上自己编译 PHP。
这是配置命令:
./configure --prefix=/opt/local/php --with-config-file-path=/opt/local/php/conf
--with-apxs2=/opt/local/apache/bin/apxs --with-mysql=/opt/local/mysql
--with-mysql-sock=/tmp --with-libedit --with-pcre-dir=/opt/local
--enable-bcmath --enable-mbstring --enable-sockets --enable-zip --with-bz2
--with-curl --with-jpeg-dir=/opt/local --with-png-dir=/opt/local
--with-freetype-dir=/opt/local --with-gd=/opt/local
当我尝试 dsudo make
时,我收到此错误:
Undefined symbols for architecture x86_64:
"_XpmLibraryVersion", referenced from:
_zm_info_gd in gd.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
PHP 版本是 5.5.5,libgd是用这个配置编译的:
./configure --prefix=/opt/local --with-png=/opt/local --with-jpeg=/opt/local
--with-tiff=/opt/local --with-freetype=/opt/local
没有--with-gd
标志,PHP 编译得很好。
这个错误是什么意思,我该如何解决?