You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not able to archive my standalone swift package supporting only iOS platform when I have swift-atomics in the SPM transitive dependencies of my swift package SPM dependencies.
Information
Package version: 1.0.2
Platform version: 12.4
Swift version: swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
Target: x86_64-apple-macosx12.0
Checklist
If possible, I've reproduced the issue using the main branch of this package.
Try to archive swift package for iOS and iOS Simulator platforms
Expected behavior
Archive my swift package for generic/platform=iOS and generic/platform=iOS Simulator destinations in order to generate a .xcframework
Actual behavior
I have a standalone swift package that targets only iOS (v13+).
My swift package has as dependency google-auth-library-swift which has as dependency swift-nio which has as dependency swift-atomics.
When I try to generate the .xcframework from my swift package, I have this error while archiving for iOS and iOS Simulator destinations:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/SafeRider.xcodeproj -configuration Release -archivePath /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build/SafeRider/iphoneos.xcarchive -destination generic/platform=iOS BUILD_DIR=/Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build SKIP_INSTALL=NO IPHONEOS_DEPLOYMENT_TARGET=13.0 BUILD_LIBRARIES_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO -scheme SafeRider archive
User defaults from command line:
IDEArchivePathOverride = /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build/SafeRider/iphoneos.xcarchive
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
BUILD_DIR = /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build
BUILD_LIBRARIES_FOR_DISTRIBUTION = YES
IPHONEOS_DEPLOYMENT_TARGET = 13.0
SKIP_INSTALL = NO
Ld /Users/sebastienbalard/Library/Developer/Xcode/DerivedData/SafeRider-gryczvykejxqntfoykjzxkaooaoi/Build/Intermediates.noindex/ArchiveIntermediates/SafeRider/InstallationBuildProductsLocation/Library/Frameworks/_AtomicsShims.framework/_AtomicsShims normal (in target '_AtomicsShims' from project 'SafeRider')
cd /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios13.0 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -L/Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build/Release-iphoneos -F/Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build/Release-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -filelist /Users/sebastienbalard/Library/Developer/Xcode/DerivedData/SafeRider-gryczvykejxqntfoykjzxkaooaoi/Build/Intermediates.noindex/ArchiveIntermediates/SafeRider/IntermediateBuildFilesPath/SafeRider.build/Release-iphoneos/_AtomicsShims.build/Objects-normal/arm64/_AtomicsShims.LinkFileList -install_name @rpath/_AtomicsShims.framework/_AtomicsShims -Xlinker -rpath -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sebastienbalard/Library/Developer/Xcode/DerivedData/SafeRider-gryczvykejxqntfoykjzxkaooaoi/Build/Intermediates.noindex/ArchiveIntermediates/SafeRider/IntermediateBuildFilesPath/SafeRider.build/Release-iphoneos/_AtomicsShims.build/Objects-normal/arm64/_AtomicsShims_lto.o -Xlinker -export_dynamic -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/sebastienbalard/Workspace/LibertyRider/saferider-ios/.build/swift-create-xcframework/build/Release-iphoneos -Xlinker -final_output -Xlinker /Library/Frameworks/_AtomicsShims.framework/_AtomicsShims -Xlinker -dependency_info -Xlinker /Users/sebastienbalard/Library/Developer/Xcode/DerivedData/SafeRider-gryczvykejxqntfoykjzxkaooaoi/Build/Intermediates.noindex/ArchiveIntermediates/SafeRider/IntermediateBuildFilesPath/SafeRider.build/Release-iphoneos/_AtomicsShims.build/Objects-normal/arm64/_AtomicsShims_dependency_info.dat -o /Users/sebastienbalard/Library/Developer/Xcode/DerivedData/SafeRider-gryczvykejxqntfoykjzxkaooaoi/Build/Intermediates.noindex/ArchiveIntermediates/SafeRider/InstallationBuildProductsLocation/Library/Frameworks/_AtomicsShims.framework/_AtomicsShims
Undefined symbols for architecture arm64:
"_swift_release_n", referenced from:
__sa_release_n in _AtomicsShims.o
"_swift_retain_n", referenced from:
__sa_retain_n in _AtomicsShims.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Narayane
changed the title
Standalone Swift Package archiving failed when swift-atomics is a SPM transitive dependency
Standalone Swift Package archive failed when swift-atomics is a SPM transitive dependency
Sep 29, 2022
The upcoming 1.1 release is scheduled to bump the minimum toolchain version to Swift 5.6, allowing double wide atomics to be unconditionally enabled. This will obsolete the ENABLE_DOUBLEWIDE_ATOMICS condition, resolving this problem.
Correction: Apologies, I commented on the wrong bug -- unfortunately fixing this will likely need us to remove these two functions, which requires us to first fix swiftlang/swift#56105.
Hi,
I'm not able to archive my standalone swift package supporting only iOS platform when I have swift-atomics in the SPM transitive dependencies of my swift package SPM dependencies.
Information
Target: x86_64-apple-macosx12.0
Checklist
main
branch of this package.Steps to Reproduce
Expected behavior
Archive my swift package for
generic/platform=iOS
andgeneric/platform=iOS Simulator
destinations in order to generate a .xcframeworkActual behavior
I have a standalone swift package that targets only iOS (v13+).
My swift package has as dependency google-auth-library-swift which has as dependency swift-nio which has as dependency swift-atomics.
When I try to generate the .xcframework from my swift package, I have this error while archiving for iOS and iOS Simulator destinations:
My problem seems to be related to https://github.com/apple/swift-atomics#portability-concerns, it is the same part of code which causes a problem but your "manual workaround" fails in my SP "iOS only" case.
Any help would be greatly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: