cli*_*mbd 5 php macos openssl symbols undefined
我已经安装了OpenSSL 1.0.1j /usr/local/ssl,现在我正在尝试使用这个版本的OpenSSL编译PHP 5.5.19.这是我配置的程序...
export CFLAGS="-arch x86_64"
export CXXFLAGS="-arch x86_64"
export LDFLAGS="-L/usr/local/ssl/lib"
export CPPFLAGS="-I/usr/local/ssl/include"
./configure \
--prefix=/usr/local/php5 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc \
--with-config-file-path=/etc \
--with-zlib \
--with-zlib-dir=/usr \
--with-apxs2=/usr/sbin/apxs \
--with-openssl=/usr/local/ssl \
--without-iconv \
--enable-cli \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--with-mysql=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-gd \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/X11R6 \
--with-freetype-dir=/usr/X11R6 \
--with-xpm-dir=/usr/X11R6 \
--with-mcrypt \
--with-curl
Run Code Online (Sandbox Code Playgroud)
配置过程似乎工作正常,但是当我运行make时,我得到了这个:
Undefined symbols for architecture x86_64:
"_PKCS5_PBKDF2_HMAC", referenced from:
_zif_openssl_pbkdf2 in openssl.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
Run Code Online (Sandbox Code Playgroud)
如果我运行相同的配置选项,但将openssl指向系统版本/ usr
...
--with-openssl=/usr
...
Run Code Online (Sandbox Code Playgroud)
然后运行没有问题和PHP安装很好,但使用旧版本的OpenSSL.如何才能使用我的新版OpenSSL?
Makefile 有一行EXTRA_LIBS,类似于:
EXTRA_LIBS = -lresolv -lmcrypt -lltdl -liconv-lm -lxml2 -lcurl -lssl -lcrypto
Run Code Online (Sandbox Code Playgroud)
删除所有出现的-lssland-lcrypto并添加完整路径libssl.dylibandlibcrypto.dylib
EXTRA_LIBS = -lresolv -lmcrypt /usr/local/ssl/lib/libssl.dylib /usr/local/ssl/lib/libcrypto.dylib -lltdl -liconv-lm -lxml2 -lcurl
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1439 次 |
| 最近记录: |