Xcode 13. Argument list too long while using SPM(Swift Package Manager)

I am using spm in my project. When I build via Xcode 13, I get error "Argument list too long". After some research I found multiple repeat of flags -F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks. Have you any idea how to fix this?

full log:

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'TryToReproduce' from project 'MyProject')
    cd /Users/renat/Sources/MyProject
    export DEVELOPER_DIR\=/Applications/Xcode-13.0.0.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode-13.0.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk
    /Applications/Xcode-13.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc

...
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxCocoa
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxRelay
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxSwift
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/TensorFlowLiteSwift
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxCocoa
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxRelay
-I /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/RxSwift
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator/PackageFrameworks
-F /Users/renat/DerrivedData/Build/Products/Debug-iphonesimulator
-F /Users/renat/Sources/release-ios/ios/Pods/TensorFlowLiteC/Frameworks
-F /Users/renat/Sources/release-ios/ios/Pods/YandexMapKit
-F /Users/renat/Sources/release-ios/ios/Pods/YandexRuntime
-F /Users/renat/Sources/release-ios/ios/lib
-F /Users/renat/Sources/release-ios/iOS
...

I already created an empty project and checked adding packages to an empty project, the problem is reproducible

3 Likes

So then post a link to the project with the reproducible example.

Terms of Service

Privacy Policy

Cookie Policy