cURL / Mailing Lists / curl-library / Single Mail

curl-library

problem linking openssl libs

From: Michael Mueller <abaci.mjm_at_gmail.com>
Date: Mon, 29 Sep 2014 17:17:33 -0400

I get link failure using either....

PKG_CONFIG_PATH=/home/amqadmin/wrk/openssl_build/i/lib/pkgconfig \
./configure \
--with-ssl \
--prefix=$HOME/wrk/curl-https

..or...

./configure \
--with-ssl=/home/amqadmin/wrk/openssl_build/i \
--prefix=$HOME/wrk/curl-https

The config summary:

curl version: 7.38.0
  Host setup: x86_64-unknown-linux-gnu
  Install prefix: /home/amqadmin/wrk/curl-https
  Compiler: gcc
  SSL support: enabled (OpenSSL)
  SSH support: no (--with-libssh2)
  zlib support: enabled
  GSS-API support: no (--with-gssapi)
  TLS-SRP support: enabled
  resolver: default (--enable-ares / --enable-threaded-resolver)
  ipv6 support: enabled
  IDN support: no (--with-{libidn,winidn})
  Build libcurl: Shared=yes, Static=yes
  Built-in manual: enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: no
  ca cert path: /etc/ssl/certs/
  LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support: no (--enable-ldaps)
  RTSP support: enabled
  RTMP support: no (--with-librtmp)
  metalink support: no (--with-libmetalink)
  HTTP2 support: disabled (--with-nghttp2)
  Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS
POP3 POP3S RTSP SMTP SMTPS TELNET TFTP

libtool: link: gcc -O2 -Wno-system-headers -o .libs/curl
curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o
curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o
curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o
curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o
curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o
curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o
curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o
curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o
curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o
curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o
curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o
curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o
curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o
../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o
../lib/curl-warnless.o -L/home/amqadmin/wrk/openssl_build/i/lib
../lib/.libs/libcurl.so -lz -lrt -Wl,-rpath
-Wl,/home/amqadmin/wrk/AFT-9.1.0.X-Windows-GWS-GWC/TPMGW/src/SSLproto/proto_2_9/curl-https/lib
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
warning: libcrypto.so.1.0.0, needed by ../lib/.libs/libcurl.so, not
found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found
(try using -rpath or -rpath-link)
../lib/.libs/libcurl.so: undefined reference to `RAND_load_file'
../lib/.libs/libcurl.so: undefined reference to `UI_method_set_closer'
../lib/.libs/libcurl.so: undefined reference to `SSL_CTX_use_certificate'

The link error:

libtool: link: gcc -O2 -Wno-system-headers -o .libs/curl
curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o
curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o
curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o
curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o
curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o
curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o
curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o
curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o
curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o
curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o
curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o
curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o
curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o
../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o
../lib/curl-warnless.o -L/home/amqadmin/wrk/openssl_build/i/lib
../lib/.libs/libcurl.so -lz -lrt -Wl,-rpath
-Wl,/home/amqadmin/wrk/AFT-9.1.0.X-Windows-GWS-GWC/TPMGW/src/SSLproto/proto_2_9/curl-https/lib
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
warning: libcrypto.so.1.0.0, needed by ../lib/.libs/libcurl.so, not
found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found
(try using -rpath or -rpath-link)
../lib/.libs/libcurl.so: undefined reference to `RAND_load_file'
../lib/.libs/libcurl.so: undefined reference to `UI_method_set_closer'
../lib/.libs/libcurl.so: undefined reference to `SSL_CTX_use_certificate'

Seems like -lcrypto and -lssl should be in the link parms.

The openssl link libs:

> l /home/amqadmin/wrk/openssl_build/i/lib
total 6956
drwxr-xr-x 4 amqadmin aft 4096 2014-09-29 16:27 ./
drwxr-xr-x 10 amqadmin aft 4096 2014-09-29 16:27 ../
drwxr-xr-x 2 amqadmin aft 4096 2014-09-29 16:27 engines/
-rw-r--r-- 1 amqadmin aft 3830362 2014-09-29 16:27 libcrypto.a
lrwxrwxrwx 1 amqadmin aft 18 2014-09-29 16:27 libcrypto.so ->
libcrypto.so.1.0.0*
-r-xr-xr-x 1 amqadmin aft 2133419 2014-09-29 16:27 libcrypto.so.1.0.0*
-rw-r--r-- 1 amqadmin aft 676690 2014-09-29 16:27 libssl.a
lrwxrwxrwx 1 amqadmin aft 15 2014-09-29 16:27 libssl.so ->
libssl.so.1.0.0*
-r-xr-xr-x 1 amqadmin aft 439971 2014-09-29 16:27 libssl.so.1.0.0*
-rw-r--r-- 1 amqadmin aft 0 2014-09-29 16:23 openssl
drwxr-xr-x 2 amqadmin aft 4096 2014-09-29 15:04 pkgconfig/

The openssl version I compiled:

> /home/amqadmin/wrk/openssl_build/i/bin/openssl version
OpenSSL 1.0.1i 6 Aug 2014

Any help appreciated.

Thanks,
Mike
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-29