I'm trying to use the latest Swift Trunk Development toolchain builds (from December 4th and 5th), but it seems like lib_SwiftSyntaxMacros.dylib
was only built for x86 and not arm64. This causes every swift
invocation to fail immediately as shown below:
> export PATH=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/bin:"${PATH}"
> swift --version
dyld[44267]: Library not loaded: @rpath/lib_SwiftSyntaxMacros.dylib
Referenced from: <E62B365F-9F56-39E1-8A1E-F9D7D71DE3F9> /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/bin/swift-frontend
Reason: tried: '/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file), '/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/lib/swift/host/lib_SwiftSyntaxMacros.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file), '/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/lib/swift/host/lib_SwiftSyntaxMacros.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS@rpath/lib_SwiftSyntaxMacros.dylib' (no such file), '/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file), '/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/lib/swift/host/lib_SwiftSyntaxMacros.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/lib_SwiftSyntaxMacros.dylib' (no such file), '/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-12-05-a.xctoolchain/usr/lib/swift/host/lib_SwiftSyntaxMacros.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/lib_SwiftSyntaxMacros.dylib' (no such file, not in dyld cache)
[1] 44267 abort swift --version
I am on macOS Version 13.0.1 (22A400) on an M1 Pro MacBook Pro.
Am I using it wrong, or will this be fixed again with the next toolchain builds? Is there a simple fix I could apply in the meantime?
Thanks for your help!