一直好好的,macos升级后突然出现
Undefined symbols for architecture x86_64:
“_ber_free”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_err2string”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_first_attribute”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_first_entry”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_free_urldesc”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_get_dn”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_get_values_len”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_init”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_memfree”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_msgfree”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_next_attribute”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_next_entry”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_search_s”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_set_option”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_simple_bind_s”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_unbind_s”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_url_parse”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
“_ldap_value_free_len”, referenced from:
_Curl_ldap in libcurl.a(libcurl_la-ldap.o)
ld: symbol(s) not found for architecture x86_64
解决方法
重新编译curl,添加如下:
–disable-ldap --disable-ldaps
所有选项如下:
./configure --disable-shared --without-zlib --disable-ldap --disable-ldaps --with-ssl=/Users/xxx/libs/build/openssl/openssl-OpenSSL_1_0_2l-build/x86_64 --prefix=/Users/xxx/libs/macos-build/out