jasonacox / Build-OpenSSL-cURL

Scripts to build OpenSSL, HTTP/2 (nghttp2) and cURL (libcurl) for MacOS, iOS and tvOS devices (x86_64, armv7, armv7s, arm64, arm64e). Now Supporting Apple Silicon, OpenSSL 3.0.x with TLS 1.3 and Mac Catalyst builds.
MIT License
419 stars 125 forks source link

Release lib error on my m1 imac #69

Closed iPermanent closed 3 months ago

iPermanent commented 3 months ago

I download the release package and then drag it to my xcode directly, it's cocoa app, then show these errors below, I think some --disable-ldap and --disable --ldaps should add before the build action.

Undefined symbols for architecture arm64: "_ber_free", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_inflate", referenced from: _inflate_stream in libcurl.a[arm64]18 "_inflateEnd", referenced from: _inflate_stream in libcurl.a[arm64]18 _exit_zlib in libcurl.a[arm64]18 "inflateInit2", referenced from: _inflate_stream in libcurl.a[arm64]18 _gzip_init_writer in libcurl.a[arm64]18 _gzip_init_writer in libcurl.a[arm64]18 "inflateInit", referenced from: _deflate_init_writer in libcurl.a[arm64]18 "_ldap_err2string", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_ldap_first_attribute", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_first_entry", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_free_urldesc", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_get_dn", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_get_values_len", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_init", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_ldap_memfree", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_ldap_msgfree", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_next_attribute", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_next_entry", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_search_s", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_set_option", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_ldap_simple_bind_s", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_ldap_unbind_s", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_url_parse", referenced from: _ldap_do in libcurl.a[arm64]79 "_ldap_value_free_len", referenced from: _ldap_do in libcurl.a[arm64]79 _ldap_do in libcurl.a[arm64]79 "_zlibVersion", referenced from: _gzip_init_writer in libcurl.a[arm64]18 ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

jasonacox commented 3 months ago

Hi @iPermanent which package did you use? I should flag that. I'll upload a new release soon.

jasonacox commented 3 months ago

Try latest: https://github.com/jasonacox/Build-OpenSSL-cURL/releases/tag/v8.6.0

I assume you are importing the xcframework folders into your project in Xcode?

iPermanent commented 3 months ago

Thanks very much. I just build it myself by modify your shell and resolve it, with —disable-ldap and —disable-zlib.

jasonacox commented 3 months ago

Thanks Henry! One thought, I seem to recall that without zlib you might run into issue with Content-Encoding: gzip content. If that is out of scope for your project you are fine. Otherwise you can add the zlib library in to your Xcode project.

image