curl-users
Re: configure: error: OpenSSL libs and/or directories were not found where specified!
Date: Sat, 3 Nov 2007 03:11:02 -0400
On Fri, 2 Nov 2007, Gary Yang wrote:
-> configure:25624: result: no -> configure:25634: checking for CRYPTO_lock in
-lcrypto -> configure:25669: gcc -o conftest -g -O2 -L/usr/local/ssl/lib
conftest.c -lcrypto >&5 -> configure:25675: $? = 0 -> configure:25693: result:
yes -> configure:25785: checking for SSL_connect in -lssl -> configure:25820:
gcc -o conftest -g -O2 -L/usr/local/ssl/lib conftest.c -lssl -lcrypto >&5 ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x38): In function
`dlfcn_load': -> : undefined reference to `dlopen' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xa0): In function
`dlfcn_load': -> : undefined reference to `dlclose' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xc9): In function
`dlfcn_load': -> : undefined reference to `dlerror' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x13e): In function
`dlfcn_unload': -> : undefined reference to `dlclose' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x1f5): In function
`dlfcn_bind_var': -> : undefined reference to `dlsym' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x241): In function
`dlfcn_bind_var': -> : undefined reference to `dlerror' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x2d5): In function
`dlfcn_bind_func': -> : undefined reference to `dlsym' ->
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x321): In function
`dlfcn_bind_func': -> : undefined reference to `dlerror' -> collect2: ld
returned 1 exit status
Your linker is wanting to grab the static version of the library, in which
case it needs libdl specified by hand. This is odd, because whenever I've
built it, the linker defaults to libcrypto.so, which is linked against libdl,
so there's no problem. There's also a pkgconfig file that gets installed
with Openssl that should take care of what needs to be linking and where:
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 0.9.8g
Requires:
Libs: -L${libdir} -lssl -lcrypto -ldl
Cflags: -I${includedir}
My guess is a botched Openssl install and/or possibly something throwing off
the linker. libcrypto.so should be linked with libdl on Linux as far as I can
tell.
Also, as specified, it's doubtful the cc or cpp would have found the Openssl
includes in /usr/local/ssl/include/openssl/* (I saw no
-I/usr/local/ssl/include). Openssl is a main component, and is usually
prefixxed at /usr, or bad/weird things happen (I'm wondering what your
PKG_CONFIG_PATH is set to if Openssl is making its own teir under local/). I'd
rebuild it, but you might be able to work around it by holding the
compiler & linker's hand and specifically setting PKG_CONFIG_PATH to include
wherever openssl.pc landed at, CFLAGS/CPPFLAGS to -I/usr/local/ssl/include,
LDFLAGS to -L/usr/local/ssl/lib, and linking in -ldl with anything that
is using ssl libs from now on. You'll also need to tell the dynamic linker
where libcryto.so/libssl.so are (ld.so.cache, rpath, LD_*) if linking
dynamically, or make sure the *.a static versions are compiled in statically.
-- [** America, the police state **] Whoooose! What's that noise? Why, it's US citizen's rights, going down the toilet with Bush flushing. http://www.wired.com/politics/security/news/2007/08/wiretap http://www.hermes-press.com/police_state.htmReceived on 2007-11-03