2014-06-17 3 views
1

"건축 x86_64에 대한 정의되지 않은 기호는"10.8.4맥 OS X PHP 5.4.29 컴파일 오류가

./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info 
--sysconfdir=/private/etc --with-apxs2=/usr/sbin/apxs --enable-cli 
--with-config-file-path=/etc --with-libxml-dir=/usr --with-openssl=/usr 
--with-kerberos=/usr --with-zlib=/usr --enable-bcmath --with-bz2=/usr 
--enable-calendar --with-curl=/usr --enable-dba --enable-exif --enable-ftp 
--with-gd --enable-gd-native-ttf --with-icu-dir=/usr --with-iodbc=/usr 
--with-ldap=/usr --with-ldap-sasl=/usr --with-libedit=/usr --enable-mbstring 
--enable-mbregex --with-mysql=mysqlnd --with-mysqli=mysqlnd --without-pear 
--with-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/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-pcre-regex --with-pgsql=/usr 
--with-pdo-pgsql=/usr --with-freetype-dir=/usr/X11 --with-png-dir=/usr/X11 

다음 을하고이 오류가 맥 OS X에 PHP 5.4.29을 컴파일하려고 :

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_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 

누구나 전에 본 적이 있습니까? 어떤 아이디어로 그것을 고치는 법?

+0

작성한 명령, 접두사 등을 표시 할 수 있습니까? –

+0

"configure"옵션을 표시하기 위해 내 질문을 편집했습니다. – derekg

+1

정의되지 않은 기호는 Apache 로깅 코어에 있습니다. 아파치를 이미 설치했는지는 모르지만 문제가 될 수 있다고 생각합니다. 링커에서 참조를 찾을 수 없으며 특정 헤더 나 라이브러리를 포함해야합니다. 아마도 그냥 같은 오류가 발생하는지 확인하기 위해 일반'configure && make '를 시도해보십시오. –

답변

2

기록을 위해 나는 그것을 작동 시켰습니다. 나는 어디에도 가지 않아서 매버릭스 (10.9.3)으로 먼저 업그레이드하기로 결정했다. PHP를 컴파일하려고 할 때 오류가 발생했습니다. 원래 Mountain Lion에 있던 오류와 다릅니다.

먼저 OS 업그레이드 후에 명령 줄 도구가 설치되었는지 확인해야했습니다. 어떤 이유로 쉘에서 설치 명령 행 도구를 내 엑스 코드 5.1.1은 더 이상 나에게 "환경 설정"에서이 옵션을 제공하지 않기 때문에 내가 (다시) :

xcode-select --install 

제가 아파치와 PHP를 컴파일 할 몇 가지 환경 변수를 설정 :

MACOSX_DEPLOYMENT_TARGET=10.9 
CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" 
CCFLAGS="-arch x86_64 -g -Os -pipe" 
CXXFLAGS="-arch x86_64 -g -Os -pipe" 
LDFLAGS="-arch x86_64 -bind_at_load" 
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET 

은 그럼 컴파일 apr.apache.org에서 사용할 수있는 4월4 월 UTIL를 설치했습니다. 그런 다음 컴파일 및 아파치 2.4.9 설치 :

./configure --prefix=/usr --enable-layout=Darwin --enable-cgi --enable-ssl --enable-so --enable-rewrite --enable-mime-magic --enable-suexec --enable-modules=all --enable-mods-shared=all --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr 
make 
make install 

그리고 PHP 5.5.13을 :

./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/private/etc --with-apxs2=/usr/bin/apxs --enable-cli --with-config-file-path=/etc --with-libxml-dir=/usr --with-openssl=/usr --with-kerberos=/usr --with-zlib=/usr --enable-bcmath --with-bz2=/usr --enable-calendar --with-curl=/usr --enable-dba --enable-exif --enable-ftp --with-gd --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-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/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-pcre-regex --with-freetype-dir=/usr/X11 --with-png-dir=/usr/X11 --with-jpeg-dir=/usr 
make 
make install 

그런 다음, 예전의 php.ini과의 httpd.conf 파일을 복원 아파치를 다시 시작하고, 그것은 나를 위해 일한 . 이것들은 주요 단계이지만 라이브러리/파일 오류가 누락되어 설치하는 데 필요한 작은 것들이있었습니다. 예를 들어 PHP를 컴파일하기 전에 Libjpeg를 컴파일하고 설치해야했습니다. 나는 jpegsrc.v9a.tar.gzhttp://www.ijg.org/files/에서 다운로드했습니다.

위의 단계가 Mountain Lion에서도 똑같이 작동하는지 알 수 없습니다.