这是我收到的消息:
Undefined symbols for architecture x86_64:
"_iconv_close", referenced from:
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
__php_iconv_mime_decode in iconv.o
_php_iconv_stream_filter_cleanup in iconv.o
...
"_iconv_open", referenced from:
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
__php_iconv_mime_decode in iconv.o
_php_iconv_stream_filter_factory_create in iconv.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
在使用 Make 进行编译时,我也收到了很多警告。
例如:
zend_operators.c:2171:34: warning:
'finite' is deprecated: first deprecated in OS X 10.9
[-Wdeprecated-declarations]
} else if (dval1 == dval2 && !zend_finite(dval1)) {
zend_compile.c:4010:9: warning: assigning
to 'char *' from 'const char *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
lcname = hash_key->arKey;
^ ~~~~~~~~~~~~~~~
'unsigned char *' converts between pointers to integer types with
different sign [-Wpointer-sign]
sc = YYCURSOR;
^
Zend/zend_ini_scanner.l:479:12: warning: assigning to 'unsigned char *' from
'char *' converts between pointers to integer types with different sign
[-Wpointer-sign]
YYCURSOR = sc;
他们还有很多。
这是我的命令:
./configure --enable-fpm --with-pdo-mysql --with-mcrypt --with-zlib --with-openssl --with-curl
make
我以root身份登录。
以下是更多详细信息:
PHP-5.5.13 Mac OS X 10.9.3
看起来 PHP 找不到符号,因为 iconv 重命名了它们。
有关详细信息,请参阅以下链接:
菲德尔的超级用户回答
报价: