From 7e6ea701b7b5e288b7bb7ee326581008648118e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=98=8E?= <7737673+caobug@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:19:58 +0800 Subject: [PATCH] fixed inability to create xcframework in Symbolic Link (#1356) Creating Clibsodium.xcframework... error: cannot compute path of binary 'Path(str: "/private/tmp/libsodium-stable/libsodium-apple/macos/lib/libsodium.a")' relative to that of '/tmp/libsodium-stable/libsodium-apple/macos/lib/libsodium.a' ls: /tmp/libsodium-stable/libsodium-apple/Clibsodium.xcframework: No such file or directory ls -l /tmp lrwxr-xr-x@ 1 root wheel 11 12 15 22:43 /tmp -> private/tmp --- dist-build/apple-xcframework.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist-build/apple-xcframework.sh b/dist-build/apple-xcframework.sh index ad94d5fe..95730d23 100755 --- a/dist-build/apple-xcframework.sh +++ b/dist-build/apple-xcframework.sh @@ -477,16 +477,16 @@ for f in macos ios watchos tvos visionos catalyst; do if [ "$VISIONOS_SUPPORTED" = false ] && [ "$f" = "visionos" ]; then continue fi - XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a" - XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include" + XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library $(readlink -f ${PREFIX}/${f}/lib/libsodium.a)" + XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers $(readlink -f ${PREFIX}/${f}/include)" done if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do if [ "$VISIONOS_SUPPORTED" = false ] && [ "$f" = "visionos-simulators" ]; then continue fi - XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a" - XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include" + XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library $(readlink -f ${PREFIX}/${f}/lib/libsodium.a)" + XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers $(readlink -f ${PREFIX}/${f}/include)" done fi xcodebuild -create-xcframework \