Menu

#753 Cannot find openssl when specified --with-ssl

closed-fixed
5
2013-06-21
2008-07-24
No

Curl 7.17 and 7.18 cannot find openssl if it installed under a user specified directory. I tested with Curl 7.18.2 and got the same issue.

This issue was found when building a fgs module (installer for linux). See http://bugzilla.maptools.org/show_bug.cgi?id=1863

I found a similar issue in the tracker and applied the suggested fix (2008-01-15 21:39 by dfandrich) but it didn't solve this issue:
http://sourceforge.net/tracker/index.php?func=detail&aid=1871649&group_id=976&atid=100976

Discussion

  • Normand Savard

    Normand Savard - 2008-07-24

    Curl config.log file

     
  • Dan Fandrich

    Dan Fandrich - 2008-07-24

    Logged In: YES
    user_id=236775
    Originator: NO

    It looks like only static OpenSSL libraries are available, which I don't think curl supports (at least when configuring this way). Try configuring again while setting PKG_CONFIG_PATH appropriately (probably PKG_CONFIG_PATH=/home/fgs/fgs-dev/built/openssl/lib/pkgconfig). The output of the command:

    env PKG_CONFIG_PATH=/home/fgs/fgs-dev/built/openssl/lib/pkgconfig pkg-config --libs libssl

    should provide all the libraries needed to link with OpenSSL. If not, then it's an OpenSSL bug.

     
  • Normand Savard

    Normand Savard - 2008-07-28

    Logged In: YES
    user_id=2059797
    Originator: YES

    I pasted here the output of the pkg-config command and the configure script (part of):

    fgs@debian:~/fgs-dev$ export PKG_CONFIG_PATH=/home/fgs/fgs-dev/built/openssl/lib/pkgconfig/
    fgs@debian:~/fgs-dev$ pkg-config --libs libssl
    -L/home/fgs/fgs-dev/built/openssl/lib -lssl -lcrypto -ldl

    fgs@debian:~/fgs-dev$
    fgs@debian:~/fgs-dev/src/curl-7.18.2$ ./configure --prefix=/home/fgs/fgs-dev/built/curl --with-ssl=/home/fgs/fgs-dev/built/openssl --without-libidn
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for sed... /bin/sed
    checking for ar... ar
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... no

    ...

    checking whether to use libgcc... no
    checking for lber.h... no
    checking for ldap.h... no
    checking for ldapssl.h... no
    checking for ldap_ssl.h... no
    checking for LDAP libraries... cannot find LDAP libraries
    configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
    checking whether to enable ipv6... yes
    checking non-blocking sockets style... O_NONBLOCK
    checking if argv can be written to... yes
    checking if Kerberos4 support is requested... no
    checking if SPNEGO support is requested... no
    checking if GSSAPI support is requested... no
    checking for gdi32... no
    checking for CRYPTO_lock in -lcrypto... yes
    checking for SSL_connect in -lssl... no
    checking for ssl with RSAglue/rsaref libs in use... checking for SSL_connect in -lssl... (cached) no
    no
    configure: error: OpenSSL libs and/or directories were not found where specified!

     
  • Normand Savard

    Normand Savard - 2008-07-28

    Logged In: YES
    user_id=2059797
    Originator: YES

    I confirm that when openssl is built as a shared module, Curl configure script runs correctly

    ...
    checking if argv can be written to... yes
    checking if Kerberos4 support is requested... no
    checking if SPNEGO support is requested... no
    checking if GSSAPI support is requested... no
    checking for gdi32... no
    checking for CRYPTO_lock in -lcrypto... yes
    checking for SSL_connect in -lssl... yes
    checking openssl/x509.h usability... yes
    checking openssl/x509.h presence... yes
    checking for openssl/x509.h... yes
    checking openssl/rsa.h usability... yes

    ...

    configure: Configured to build curl/libcurl:

    curl version: 7.18.2
    Host setup: i686-pc-linux-gnu
    Install prefix: /home/fgs/fgs-dev/built/curl
    Compiler: gcc
    SSL support: enabled (OpenSSL)
    SSH support: no (--with-libssh2)
    zlib support: enabled
    krb4 support: no (--with-krb4*)
    GSSAPI support: no (--with-gssapi)
    SPNEGO support: no (--with-spnego)
    c-ares support: no (--enable-ares)
    ipv6 support: enabled
    IDN support: no (--with-libidn)
    Build libcurl: Shared=yes, Static=yes
    Built-in manual: enabled
    Verbose errors: enabled (--disable-verbose)
    SSPI support: no (--enable-sspi)
    ca cert bundle: no
    ca cert path: no
    LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
    LDAPS support: no (--enable-ldaps)

     
  • Dan Fandrich

    Dan Fandrich - 2008-07-28

    Logged In: YES
    user_id=236775
    Originator: NO

    Try setting PKG_CONFIG_PATH correctly but configuring with "--with-ssl" (without giving a path). The configure script ignores pkg-config if given a path to an OpenSSL directory.

     
  • Normand Savard

    Normand Savard - 2008-07-29

    Logged In: YES
    user_id=2059797
    Originator: YES

    Based on the last comment I removed the path linked with "--with-ssl" and the configure script executed to the end. Thanks.

     
  • Dan Fandrich

    Dan Fandrich - 2008-07-29

    Logged In: YES
    user_id=236775
    Originator: NO

    I've now documented the PKG_CONFIG_PATH approach to configuring OpenSSL in the INSTALL file.

     
  • Dan Fandrich

    Dan Fandrich - 2008-07-29
    • labels: 101475 --> documentation
    • status: open --> pending-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
MongoDB Logo MongoDB