curl-library
static link: how to eliminate some undefined symbols?
Date: Tue, 23 Feb 2016 01:50:15 +0000
Dear CURLers,
Now that I know how to LINK my Mac OS X libcurl.a ("myStatic-libcurl.a",
below) I've run into two link / build issues:
First, there are (probably not unexpected) some undefined references for
protocols I'm not using (ZLIB, LDAP). Setting —without-glib and
-disable-ldap eliminated 25 of those undefined symbols:
export MACOSX_DEPLOYMENT_TARGET="10.8"
./configure --disable-share --with-darwinssl --without-zlib
--disable-ldap
make clean
make
sudo make install
But with the remaining 10 undefined symbols, I'm not sure which features
to disable — or if it's safe to disable them:
Undefined symbols for architecture x86_64:
"_tld_strerror", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_idna_to_unicode_lzlz", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_tld_check_lz", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_stringprep_locale_charset", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_idn_free", referenced from:
_Curl_disconnect in myStatic_libcurl.a(libcurl_la-url.o)
_create_conn in myStatic_libcurl.a(libcurl_la-url.o)
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_stringprep_check_version", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_idna_to_ascii_lz", referenced from:
_fix_hostname in myStatic_libcurl.a(libcurl_la-url.o)
"_idna_strerror", referenced from:
_Curl_idn_strerror in myStatic_libcurl.a(libcurl_la-strerror.o)
ld: symbol(s) not found for architecture x86_64
The second issue is that although I export MACOSX_DEPLOYMENT_TARGET="10.8"
before I do my make, the linker is STILL warning that I have built for the
wrong deployment target:
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-easy.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-strerror.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-slist.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-select.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-sendf.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-url.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-cookie.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-multi.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-connect.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-getinfo.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-hostip.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-vtls.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-mprintf.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-timeval.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-socks.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-pipeline.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-base64.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-conncache.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-darwinssl.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-dotdot.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-http_digest.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-transfer.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_addrinfo.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-hostip6.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-dict.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-file.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-ftp.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-gopher.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-http.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-imap.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-pop3.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-rtsp.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-smb.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-smtp.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-telnet.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-tftp.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-hash.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_ntlm.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-if2ip.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-llist.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-strdup.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_memrchr.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_ntlm_wb.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-netrc.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-progress.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-http_proxy.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-rawstr.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-hostsyn.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-share.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-speedcheck.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-splay.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-wildcard.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-escape.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-parsedate.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-getenv.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-strequal.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-nonblock.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-warnless.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-md5.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-formdata.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-http_chunks.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-fileinfo.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-ftplistparser.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_gethostname.o)) was
built for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_ntlm_core.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-pingpong.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_endian.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_sasl.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_ntlm_msgs.o)) was built
for newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-hmac.o)) was built for newer
OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_des.o)) was built for
newer OSX version (10.11) than being linked (10.8)
ld: warning: object file
(/usr/local/lib/myStatic_libcurl.a(libcurl_la-curl_fnmatch.o)) was built
for newer OSX version (10.11) than being linked (10.8)
Shouldn't those have been taken care of by setting that deployment target?
Stephen
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-02-23