|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-04-22 16:20 UTC] paulgao at yeah dot net
Description: ------------ When i try static compile, display: -- /usr/bin/ld: cannot find -lSSL collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 make: *** Waiting for unfinished jobs.... /usr/bin/ld: cannot find -lSSL collect2: ld returned 1 exit status make: *** [sapi/fpm/php-fpm] Error 1 -- OS: Centos 6.5 x64 [root]# curl-config --features SSL IPv6 libz IDN NTLM plz check & fix it... Test script: --------------- command: ./configure --prefix=/usr/local/php --without-pear --with-mysqli=mysqlnd --disable-phar --with-iconv --with-zlib --enable-exif --enable-sockets --enable-mbstring=all --enable-inline-optimization --disable-debug --enable-static --disable-ipv6 --enable-bcmath --enable-zip --with-bz2 --with-curl --with-openssl --enable-memcached --disable-memcached-session --with-libmemcached-dir=/usr/local/libmemcached --enable-memcached-igbinary --enable-apc --enable-apc-spinlocks --enable-igbinary --enable-fpm --enable-mongo --enable-raphf --enable-propro --with-http --enable-xhprof --enable-redis --enable-redis-igbinary PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
[root@centos tmp]# curl-config --features SSL IPv6 libz IDN NTLM [root@centos tmp]# curl-config --static-libs unknown option: --static-libs Usage: curl-config [OPTION] [root@centos tmp]# ldd $(curl-config --prefix)/lib/libcurl.so ldd: /usr/lib/libcurl.so: No such file or directory [root@centos usr]# ldd /usr/lib64/libcurl.so linux-vdso.so.1 => (0x00007fff747f7000) libidn.so.11 => /lib64/libidn.so.11 (0x00007ff37047d000) libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007ff370230000) librt.so.1 => /lib64/librt.so.1 (0x00007ff370027000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ff36fde3000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ff36fafd000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ff36f8d0000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ff36f6cc000) libz.so.1 => /lib64/libz.so.1 (0x00007ff36f4b6000) libssl3.so => /usr/lib64/libssl3.so (0x00007ff36f277000) libsmime3.so => /usr/lib64/libsmime3.so (0x00007ff36f04b000) libnss3.so => /usr/lib64/libnss3.so (0x00007ff36ed0d000) libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007ff36eae0000) libplds4.so => /lib64/libplds4.so (0x00007ff36e8dc000) libplc4.so => /lib64/libplc4.so (0x00007ff36e6d7000) libnspr4.so => /lib64/libnspr4.so (0x00007ff36e499000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff36e27c000) libdl.so.2 => /lib64/libdl.so.2 (0x00007ff36e078000) libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007ff36de4f000) libc.so.6 => /lib64/libc.so.6 (0x00007ff36dabb000) liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007ff36d8ac000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff36d691000) libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007ff36d477000) /lib64/ld-linux-x86-64.so.2 (0x00007ff370914000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ff36d26c000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff36d068000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007ff36cdfc000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007ff36ca1b000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff36c7e4000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ff36c5c5000) libfreebl3.so => /lib64/libfreebl3.so (0x00007ff36c34d000)I'm sorry to ask that, but could you compile & run the following program, like: $ cat >/tmp/curlv.c <<'EOF #include <curl/curl.h> int main(int argc, char *argv[]) { curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); if (data && data->ssl_version && *data->ssl_version) { printf("%s\n", data->ssl_version); return 0; } return 1; } EOF $ gcc -o /tmp/curlv -lcurl /tmp/curlv.c It should print "OpenSSL/1.0.1e"Could you please try the following patch: ------------------8<-------------------- diff --git a/config9.m4 b/config9.m4 index ce63132..24d0fd0 100644 --- a/config9.m4 +++ b/config9.m4 @@ -273,9 +273,12 @@ dnl ---- PHP_ADD_INCLUDE($CURL_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD) PHP_EVAL_LIBLINE(`$CURL_CONFIG --libs`, HTTP_SHARED_LIBADD) - if test "x$CURL_SSL" != "x"; then + case "$CURL_SSL" + in + crypto|gcrypt) PHP_ADD_LIBRARY_WITH_PATH([$CURL_SSL], $CURL_DIR/$PHP_LIBDIR, PHP_HTTP_SHARED_LIBADD) - fi + ;; + esac AC_DEFINE([PHP_HTTP_HAVE_CURL], [1], [Have libcurl support]) HTTP_HAVE_A_REQUEST_LIB=true fi ------------------>8--------------------