Xcode 13 arm64 Command CompileSwiftSources failed with a nonzero exit code

Since XCode 13, I have this error on multiple SPM dependencies. It seems like it's not the combine error.

Command CompileSwiftSources failed with a nonzero exit code

CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Kingfisher' from project 'Kingfisher')

    cd /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/SourcePackages/checkouts/Kingfisher

    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer

    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Kingfisher -Onone -enable-batch-mode -enforce-exclusivity\=checked @/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/Objects-normal/arm64/Kingfisher.SwiftFileList -DSWIFT_PACKAGE -DDEBUG -DXcode -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk -target arm64-apple-ios10.0 -g -module-cache-path /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -embed-bitcode-marker -enable-testing -index-store-path /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Index/DataStore -swift-version 5 -I /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Products/development-iphoneos -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib -F /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Products/development-iphoneos -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/Developer/Library/Frameworks -c -j12 -output-file-map /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/Objects-normal/arm64/Kingfisher-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/Objects-normal/arm64/Kingfisher.swiftmodule -Xcc -I/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/swift-overrides.hmap -Xcc -I/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Products/development-iphoneos/include -Xcc -I/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/DerivedSources-normal/arm64 -Xcc -I/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/DerivedSources/arm64 -Xcc -I/Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/Build/Intermediates.noindex/Kingfisher.build/development-iphoneos/Kingfisher.build/Objects-normal/arm64/Kingfisher-Swift.h -working-directory /Users/pierrebrisorgueil/Library/Developer/Xcode/DerivedData/waosSwift-blklsvylyurdhqcbfsxcfirghxkd/SourcePackages/checkouts/Kingfi

my repo is available in OpenSource here: https://github.com/weareopensource/Swift

after test, no problem on xcode 12.5

after test, no problem on xcode 12.5

After another test, same problem on another Mac 😕

Same problem, but only on custom configuration . Debug & Release works well, but custom config "Stage" works only on xCode 12 and lower.

Hi, did you resolve this? I think I'm having the same issue. 

I have the same problem. I'm using Macbook Pro M1 2021

Showing All Errors Only

Build target PurchasesCoreSwift of project Pods with configuration Debug

CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'PurchasesCoreSwift' from project 'Pods') Command CompileSwiftSources failed with a nonzero exit code

Destination iPhone 13 Pro Max | SDK Simulator 15.2

I'm facing the same issue. Any resolution?

Any resolution? I'm facing the same issue. Usually my project is run on XCode 12.4 I use Cocoapods to manage my dependencies

Did anyone resolve this issue?

Xcode 13 arm64 Command CompileSwiftSources failed with a nonzero exit code
 
 
Q