Ошибка компиляции php5.5.18 на MacOSX 10.10 (yosemite)

Я пытаюсь скомпилировать php (5.5.18, версия не имеет особого значения imho) на yosemite, но он не работает во время фазы соединения. Похоже, некоторые символы Apache ушли?

(Следующее отлично сработало на Mountain Lion, но не работает на Yosemite.)

cc -bundle -bundle_loader /usr/sbin/httpd -L/usr/lib -laprutil-1 -lldap -llber -lexpat -liconv -lsqlite3 -lldap -llber -L/usr/lib -lapr-1 -lpthread -I/usr/include -g -O2 -fvisibility=hidden  -arch x86_64 -bind_at_load
<SNIP>
sapi/apache2handler/php_functions.o main/internal_functions.o  -lcrypto -lssl -lcrypto -lz -lexslt -ltidy -lresolv -ledit -lncurses -lltdl -lldap -llber -lstdc++ -liconv -liconv -lz -lcrypto -lssl -lcrypto -lcurl -lbz2 -lz -lcrypto -lssl -lcrypto -lm -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lxml2 -lz -lbz2 -lxml2 -lnetsnmp -lcrypto -lxml2 -lxml2 -lxml2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt  -o libs/libphp5.bundle && cp libs/libphp5.bundle libs/libphp5.so
Undefined symbols for architecture x86_64:
"_ap_get_server_version", referenced from:
_zif_apache_get_version in php_functions.o
_zm_info_apache in php_functions.o
"_ap_log_error", referenced from:
_php_pre_config in sapi_apache2.o
_php_handler in sapi_apache2.o
_php_apache_sapi_log_message in sapi_apache2.o
"_ap_log_rerror", referenced from:
_php_handler in sapi_apache2.o
_php_apache_sapi_log_message in sapi_apache2.o
"_unixd_config", referenced from:
_zm_info_apache in php_functions.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: *** [libs/libphp5.bundle] Error 1

Есть идеи? Я проверил /usr/lib/libapr-1.dylib (с nm -g) и символов нет. Где я должен обычно найти эти символы? Это пропускает библиотеку? Что действительно странно, так это то, что мой собственный скрипт сборки работал нормально на 10.9, но не работает на 10.10

Спасибо за помощь!
никола

2

Решение

Оказалось, что он использовал следующий путь включения:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/apache2/

Вместо нормального:

/usr/include/apache2/

Еще немного информации:

$ xcodebuild -version -sdk macosx

MacOSX10.9.sdk - OS X 10.9 (macosx10.9)
SDKVersion: 10.9
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 13F26
ProductCopyright: 1983-2014 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.9.5
ProductVersion: 10.9.5

Странно, я надеюсь, что это помогает другим людям.

Лучший,
никола

2

Другие решения

Сначала установите Xcode 6.1, затем:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include
0

Я использовал MacPorts для установки некоторых библиотек (например, mcrypt), а затем скомпилировал исходный код 5.5.18 (с командной строкой Xcode), используя следующую команду ./configure -command:

./ configure —prefix = / usr —mandir = / usr / share / man —infodir = / usr / share / info —sysconfdir = / private / etc —enable-gd-native-ttf —with-icu -dir = / usr —with-ldap = / usr —with-ldap-sasl = / usr —with-libedit = / usr —enable-mbstring —enable-mbregex —with-mysql = mysqlnd — with-mysqli = mysqlnd —without-pear —with-pear = no —with-pdo-mysql = mysqlnd —with-mysql-sock = / tmp / mysql.sock —with-readline = / usr — enable-shmop —with-snmp = / usr —enable-soap —enable-sockets —enable-sysvmsg —enable-sysvsem —enable-sysvshm —with-tidy —enable-wddx —with- xmlrpc —with-iconv-dir = / usr —with-xsl = / usr —enable-zip —with-mcrypt = / opt / local / include —without-iconv —with-freetype-dir = / opt / local —with-apxs2 = / usr / sbin / apxs —with-openssl = / usr —with-curl = / usr —with-zlib = / usr —with-bz2 = / usr

0
По вопросам рекламы ammmcru@yandex.ru
Adblock
detector