Closed lah64 closed 1 year ago
Can you check that the static libraries have all of the architectures built? It should look something like this:
$ file archive/libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0/lib/MacOS/libcurl.a
archive/libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0/lib/MacOS/libcurl.a: Mach-O universal binary with 2 architectures: [x86_64:current ar archive random library] [arm64]
archive/libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0/lib/MacOS/libcurl.a (for architecture x86_64): current ar archive random library
archive/libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0/lib/MacOS/libcurl.a (for architecture arm64): current ar archive random library
Also, for multiple target builds, another option is to use the xcframework folder and copy those into your Xcode project.
The xcframework files are located in the archive
folder:
$ ls -l archive/libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0/xcframework
libcrypto.xcframework/
libcurl.xcframework/
libnghttp2.xcframework/
libssl.xcframework/
Are you able to use xcframework to compile your project on the M1?
Unfortunately not, alas. But I have identified the problem, most likely it is a problem with the libraries here because I took this and these libraries have been compiled successfully both the project. But I can not compile + libnghttp2_Mac.a..
https://github.com/carsenk/openssl10-darwin-arm (libcrypto.a + libssl.a)
That's interesting. I'm not able to duplicate your problem. You can try:
1) Building without http2 (though I assume you are wanting http2): ./build.sh -d
2) Try to use the libraries I made: libcurl-7.74.0-openssl-1.1.1i-nghttp2-1.42.0.tgz
Closing with the new update - please open if it is still an issue.
When I add all 4 static libraries to the project, I start having problems, because XCode can't find these libraries for arm64, what could be the problem?
Steps: