-
-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hi,
I'm trying to compile for Catalyst, and the way I try doing that is through making an .xcframework. So I tried the following:
sh iSSH2.sh --platform=macosx --archs="x86_64" # i386 no longer supported on 10.15
sh iSSH2.sh --platform=iphoneos --min-version=13.0
xcodebuild -create-xcframework \
-library libssh2_macosx/lib/libssh2.a -headers libssh2_macosx/include \
-library libssh2_iphoneos/lib/libssh2.a -headers libssh2_iphoneos/include \
-output libssh2.xcframework
But that gave me:
"error: binaries with multiple platforms are not supported 'libssh2_iphoneos/lib/libssh2.a'"
So I compiled x86_64 and arm64+arm64e separately
sh iSSH2.sh --platform=macosx --archs="x86_64"
sh iSSH2.sh --platform=iphoneos --min-version=13.0 --archs="arm64 arm64e"
mv libssh2_iphoneos libssh2_iphoneos_arm64_arm64e
sh iSSH2.sh --platform=iphoneos --min-version=13.0 --archs="x86_64"
mv libssh2_iphoneos libssh2_iphoneos_x86_64
xcodebuild -create-xcframework \
-library libssh2_macosx/lib/libssh2.a -headers libssh2_macosx/include \
-library libssh2_iphoneos_x86_64/lib/libssh2.a -headers libssh2_iphoneos_x86_64/include \
-library libssh2_iphoneos_arm64_arm64e/lib/libssh2.a -headers libssh2_iphoneos_arm64_arm64e/include \
-output libssh2.xcframework
but that gave me a new error:
"error: unable to find any architecture information in the binary at 'libssh2_iphoneos_arm64_arm64e/lib/libssh2.a'"
Even splitting arm64 and arm64e into binaries for just them, or only include arm64 or arm64e themselves, gave me the same error. Why won't it find architecture information?
Not including arm64 and arm64e at all, however, gave me success:
"xcframework successfully written out to: libssh2.xcframework"
But obviously, I'd like a framework with arm64 and arm64e support. :-)
Any input on how to proceed from here? Would be really good to be able to build this for Mac Catalyst