Closed ghazel closed 2 years ago
apple-cxframcework.sh makes reference to ABIs arm64-apple-ios13.0-macabi/x86_64-apple-ios13.0-macabi specifically: https://github.com/jedisct1/libsodium/blob/75bde190554b14d60439abfdd8df3d34b32e36eb/dist-build/apple-xcframework.sh#L259
apple-cxframcework.sh
arm64-apple-ios13.0-macabi
x86_64-apple-ios13.0-macabi
However on modern clang this gives the error clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi'.
clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi'
Apple clang version 13.1.6 (clang-1316.0.21.2) Target: x86_64-apple-darwin21.4.0
It is sufficient to remove the 13 from the abi to successfully build the xcframework.
13
diff --git a/dist-build/apple-xcframework.sh b/dist-build/apple-xcframework.sh index cf86e088..7f1b1217 100755 --- a/dist-build/apple-xcframework.sh +++ b/dist-build/apple-xcframework.sh @@ -256,8 +256,8 @@ build_catalyst() { ## arm64 catalyst if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -target arm64-apple-ios13.0-macabi -isysroot ${SDK}" - export LDFLAGS="-arch arm64 -target arm64-apple-ios13.0-macabi -isysroot ${SDK}" + export CFLAGS="-O2 -arch arm64 -target arm64-apple-ios-macabi -isysroot ${SDK}" + export LDFLAGS="-arch arm64 -target arm64-apple-ios-macabi -isysroot ${SDK}" make distclean >/dev/null 2>&1 ./configure --host=arm-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \ @@ -266,8 +266,8 @@ build_catalyst() { fi ## x86_64 catalyst - export CFLAGS="-O2 -arch x86_64 -target x86_64-apple-ios13.0-macabi -isysroot ${SDK}" - export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.0-macabi -isysroot ${SDK}" + export CFLAGS="-O2 -arch x86_64 -target x86_64-apple-ios-macabi -isysroot ${SDK}" + export LDFLAGS="-arch x86_64 -target x86_64-apple-ios-macabi -isysroot ${SDK}" make distclean >/dev/null 2>&1 ./configure --host=x86_64-apple-ios --prefix="$CATALYST_X86_64_PREFIX" \
Thank you!
apple-cxframcework.sh
makes reference to ABIsarm64-apple-ios13.0-macabi
/x86_64-apple-ios13.0-macabi
specifically: https://github.com/jedisct1/libsodium/blob/75bde190554b14d60439abfdd8df3d34b32e36eb/dist-build/apple-xcframework.sh#L259However on modern clang this gives the error
clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi'
.It is sufficient to remove the
13
from the abi to successfully build the xcframework.