cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Not able to compile curl with ssl support in a diferent than default folder

From: Guiu Rocafort <neandertalspeople_at_gmail.com>
Date: Fri, 25 May 2012 03:43:57 +0200

Thanks Daniel for asking so fast

I've been browsing the log file and I found these lines related to the
issue:

configure:20282: checking for openssl options with pkg-config
configure:20296: result: found
configure:20324: pkg-config: SSL_LIBS: "-lssl -lcrypto "
configure:20326: pkg-config: SSL_LDFLAGS:
"-L/home/guiu/SecureEnvironment/INSTALL/lib "
configure:20328: pkg-config: SSL_CPPFLAGS:
"-I/home/guiu/SecureEnvironment/INSTALL/include "
configure:20371: checking for CRYPTO_lock in -lcrypto
configure:20393: gcc -o conftest -g0 -O2 -Wno-system-headers
 -I/home/guiu/SecureEnvironment/INSTALL/include
 -L/home/guiu/SecureEnvironment/INSTALL/lib conftest.c -lcrypto -lrt
-lssl -lcrypto >&5
configure:20393: $? = 0
configure:20402: result: yes
configure:20465: checking for SSL_connect in -lssl
configure:20487: gcc -o conftest -g0 -O2 -Wno-system-headers
 -I/home/guiu/SecureEnvironment/INSTALL/include
 -L/home/guiu/SecureEnvironment/INSTALL/lib conftest.c -lssl -lcrypto
-lrt -lssl -lcrypto >&5
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x1d): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x33): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x3d): undefined reference to `dlclose'
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x3b1): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x490): undefined reference to `dlerror'
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x511): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x5f0): undefined reference to `dlerror'
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_load':
dso_dlfcn.c:(.text+0x667): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x6de): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x715): undefined reference to `dlerror'
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x7b1): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x819): undefined reference to `dlerror'
/home/guiu/SecureEnvironment/INSTALL/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_unload':
dso_dlfcn.c:(.text+0x87a): undefined reference to `dlclose'
collect2: ld returned 1 exit status

As far as I understand, the configure script tries to compile two test
programs to check out if openssl is working properly. The first one
compiles correctly but the second one throws some linking errors. The code
which is failing to compile is this:

/* end confdefs.h. */

#ifdef __cplusplus
extern "C"
#endif
char SSL_connect ();
int main (void)
{
return SSL_connect ();
 return 0;
}

It seems that the problem is in my openSSL installation. But strangely my
openssl install passes all the tests... odd... I'm going to try a few more
tests and try to dig deeper into the configure script.

Guiu Rocafort

On Thu, May 24, 2012 at 10:37 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 24 May 2012, Guiu Rocafort wrote:
>
> Then I set the environment variables:
>>
>> export PATH=$PREFIX/bin:$PATH
>> export PKG_CONFIG_PATH=$PREFIX/lib/**pkconfig/:$PKG_CONFIG_PATH
>> export LD_LIBRARY_PATH=$PREFIX/lib:$**LD_LIBRARY_PATH
>>
>
> None of those should be necessary.
>
>
> It didn't detect openssl from environment variables, so I then tryed:
>> ./configure --prefix=$PREFIX --with-ssl=$PREFIX
>>
>
> If $PREFIX is the same prefix you used with the OpenSSL install then I
> figure it should work. You should check out your config.log after that
> configure ran and check what failures you can spot there.
>
> --
>
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-25