cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: configure: error: OpenSSL libs and/or directories were not found where specified!

From: Weston C <westonc_at_gmail.com>
Date: Sun, 1 Jun 2008 11:59:32 -0700

On Sun, Jun 1, 2008 at 3:00 AM, <curl-users-request_at_cool.haxx.se> wrote:
> That looks fine. Now you need to open the config.log file that was produced in
> the same directory you ran curl's configure script in, and inside that file
> you need to search for the openssl detection and based on the tests in there
> and how they failed, you should get some clues on how to proceed. If you
> don't, then it would be good if you either posted *the relevant parts*:

      [...]
      configure:26113: checking for CRYPTO_lock in -lcrypto
      configure:26148: gcc -o conftest -I/usr/local/ssl/include
            -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include
            -L/usr/local/ssl/lib -L/usr/local/ssl/lib conftest.c
            -lcrypto >&5
      configure:26154: $? = 0
      configure:26172: result: yes

OK, interesting. It would seem it can *find* libcrypto.

But:

      [...]
      configure:26264: checking for SSL_connect in -lssl
      configure:26299: gcc -o conftest -I/usr/local/ssl/include
            -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include
            -L/usr/local/ssl/lib -L/usr/local/ssl/lib conftest.c -lssl
            -lcrypto >&5
            /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x38,0xa0,0xc9):
            In function `dlfcn_load': undefined reference to
`dlopen','dlclose','dlerror'

Abbreviating somewhat on that last line, but the bottom line seems to
be that it's not finding several functions. I poked inside the header
file dlfcn.h and didn't see a definition for it.... but 'cat
libcrypto.a | strings | grep dlopen' seems to reveal the symbol's in
the .a file somewhere.

And then we have:

     collect2: ld returned 1 exit status
      configure:26305: $? = 1
      configure: failed program was:
      | /* confdefs.h. */
      | #define PACKAGE_NAME "curl"
      [...]
      | char SSL_connect ();
      | int
      | main ()
      | {
      | return SSL_connect ();
      | ;
      | return 0;
      | }
      configure:26323: result: no
      configure:26336: checking for ssl with RSAglue/rsaref libs in use
      configure:26341: checking for SSL_connect in -lssl
      configure:26400: result: no

The string SSL_connect does seem to be present in libssl.a, though....

I wish I understood more of what this tells me, but it mostly leaves
me puzzled as to why the compiler/linker can't see those things.

If there might be any important clues I may have overlooked, the full
config.log is at http://weston.canncentral.org/misc/config.log . The
lines I referenced kick in about line 1680.

Thanks,

Weston
Received on 2008-06-01