curl-users
Problems linking ssl when cross-compiling curl
Date: Mon, 25 Aug 2014 20:04:01 +0200
Hello curl-users!
I'm trying to cross-compile curl 7.37.0 with openssl for an arm target.
Openssl is correctly build for the target with a custom prefix. It is
installed in its collected usr/local/ssl fashion.
./configure --host=arm-none-linux --with-ssl=${ARM_TOOLS_DIR}/usr/local/ssl
Correctly identifies where openssl is:
checking whether to enable Windows native SSL/TLS (Windows native builds
only)... no
checking whether to enable iOS/Mac OS X native SSL/TLS... no
configure: PKG_CONFIG_LIBDIR will be set to
"/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/usr/local/ssl/lib/pkgconfig"
checking for arm-none-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto -ldl "
configure: pkg-config: SSL_LDFLAGS:
"-L/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/usr/local/ssl/lib
"
configure: pkg-config: SSL_CPPFLAGS:
"-I/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/usr/local/ssl/include
"
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
checking openssl/rsa.h presence... yes
checking for openssl/rsa.h... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking openssl/pem.h usability... yes
checking openssl/pem.h presence... yes
checking for openssl/pem.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/pkcs12.h usability... yes
checking openssl/pkcs12.h presence... yes
checking for openssl/pkcs12.h... yes
checking for ENGINE_init... yes
checking openssl/engine.h usability... yes
checking openssl/engine.h presence... yes
checking for openssl/engine.h... yes
checking for ENGINE_load_builtin_engines... yes
checking for RAND_status... yes
checking for RAND_screen... no
checking for RAND_egd... yes
checking for ENGINE_cleanup... yes
checking for CRYPTO_cleanup_all_ex_data... yes
checking for SSL_get_shutdown... yes
checking for SSLv2_client_method... yes
checking for SSL_CTX_set_next_proto_select_cb... no
checking for SSL_CTX_set_alpn_protos... no
checking for SSL_CTX_set_alpn_select_cb... no
checking for yaSSL using OpenSSL compatibility mode... no
checking for OpenSSL headers version... 0.9.8 - 0x009080bfL
checking for OpenSSL library version... 0.9.8
checking for OpenSSL headers and library versions matching... yes
But when running make, i get the following errors:
/bin/bash ../libtool --tag=CC --mode=link arm-none-linux-gnueabi-gcc
-march=armv4t -O2 -Wno-system-headers
-L/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/usr/local/ssl/lib
-o 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 ../lib/libcurl.la -lrt
libtool: link: arm-none-linux-gnueabi-gcc -march=armv4t -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/palm/projects/build_tools/build/sys-roots/install-arm-dir/usr/local/ssl/lib
../lib/.libs/libcurl.so -lrt
/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/packages/arm_toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libssl.so.0.9.8, needed by ../lib/.libs/libcurl.so, not found
(try using -rpath or -rpath-link)
/home/palm/projects/build_tools/build/sys-roots/install-arm-dir/packages/arm_toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libcrypto.so.0.9.8, needed by ../lib/.libs/libcurl.so, not
found (try using -rpath or -rpath-link)
../lib/.libs/libcurl.so: undefined reference to `SSL_connect'
../lib/.libs/libcurl.so: undefined reference to `X509_check_issued'
../lib/.libs/libcurl.so: undefined reference to `BIO_free'
../lib/.libs/libcurl.so: undefined reference to `BIO_s_mem'
../lib/.libs/libcurl.so: undefined reference to `UI_method_get_reader'
../lib/.libs/libcurl.so: undefined reference to `SSL_get_session'
../lib/.libs/libcurl.so: undefined reference to `UI_get_string_type'
../lib/.libs/libcurl.so: undefined reference to `sk_pop_free'
../lib/.libs/libcurl.so: undefined reference to `BIO_ctrl'
....
I've tried searching the mailing list for similar problems, but not
found anyone with this exact issue. Any help is very much appreciated
// Anders Palm
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-25