Closed
Description
- carthage install method: [ ] .pkg, [x] homebrew, [x] source
which carthage
: /usr/local/bin/carthagecarthage version
: 0.35.0xcodebuild -version
: 12A8169g- Are you using
--no-build
? No - Are you using
--no-use-binaries
? No - Are you using
--use-submodules
? No - Are you using
--cache-builds
? No - Are you using
--new-resolver
? No
Cartfile
github "LoungeBuddy/Auth0.swift" "feature/decouple-keychain-manager"
binary "https://raw.githubusercontent.com/Instabug/Instabug-iOS/master/Instabug.json"
Carthage Output
> carthage build --platform iOS
*** xcodebuild output can be found in /var/folders/jm/pyy6p95j177_btm91tj0mkdm0000gn/T/carthage-xcodebuild.WPi9jL.log
*** Downloading binary-only framework Instabug at "https://raw.githubusercontent.com/Instabug/Instabug-iOS/master/Instabug.json"
*** Building scheme "JWTDecode-iOS" in JWTDecode.xcodeproj
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Intermediates.noindex/ArchiveIntermediates/JWTDecode-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/JWTDecode.framework/JWTDecode /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Products/Release-iphonesimulator/JWTDecode.framework/JWTDecode -output /Volumes/Shared/LoungeBuddy/consumer-ios-app/Carthage/Build/iOS/JWTDecode.framework/JWTDecode
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/jm/pyy6p95j177_btm91tj0mkdm0000gn/T/carthage-xcodebuild.WPi9jL.log
Running the problem command:
> /usr/bin/xcrun lipo -create /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Intermediates.noindex/ArchiveIntermediates/JWTDecode-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/JWTDecode.framework/JWTDecode /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Products/Release-iphonesimulator/JWTDecode.framework/JWTDecode -output /Volumes/Shared/LoungeBuddy/consumer-ios-app/Carthage/Build/iOS/JWTDecode.framework/JWTDecode
fatal error: /Applications/Xcode-12-beta-3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Intermediates.noindex/ArchiveIntermediates/JWTDecode-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/JWTDecode.framework/JWTDecode and /Users/swarn1/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/JWTDecode.swift/2.4.1/Build/Products/Release-iphonesimulator/JWTDecode.framework/JWTDecode have the same architectures (arm64) and can't be in the same fat output file
Actual outcome
- Carthage fails to build any dependencies.
- Carthage advises to look at a build log which ends with
** BUILD SUCCEEDED **
Expected outcome
- Carthage should not fail to build.
- On failures outside of
xcodebuild
, Carthage should not direct you to the build log.
Workaround
I guess the architecture for iphonesimulator
has changed such that it now collides with iphoneos
? Not sure how this stuff works. Either way, I've been able to work around the problem by changing Sources/CarthageKit/Xcode.swift:742 to argsForBuilding.onlyActiveArchitecture = true
. Obviously, this is not a great solution.
Activity
tmspzz commentedon Jul 23, 2020
this is the problematic bit
There are two arm64 slices in both binaries. Not sure why this is, but it's not good news.
EDIT: Latest workaround version: #3019 (comment)
sam-w commentedon Jul 23, 2020
tmspzz commentedon Jul 23, 2020
Yes, I don't think it's unique to your case. Waiting for more feedback.
DavidBrunow commentedon Jul 23, 2020
I wonder if a temporary workaround could be to exclude the arm64 architecture for simulators in the project file settings or in a custom XCConfig? I'm fighting my own challenges with the latest Xcode beta so I can't verify myself immediately.
I think the long-term solution is to start using XCFrameworks instead of fat frameworks.
tmspzz commentedon Jul 23, 2020
I think this could work.
If @sam-w is comfortable with the coding another approach, it would make sense to remove the arm64 slice with lipo from the simulator platform.
patrickhartling commentedon Jul 23, 2020
karapurakesh commentedon Jul 24, 2020
tmspzz commentedon Jul 24, 2020
sebskuse commentedon Jul 24, 2020
@tmspzz this appears to work for me - no longer getting the duplicate architecture error mentioned above
tmspzz commentedon Jul 24, 2020
If possible someone with the Apple Silicon DTK should also try.
DavidBrunow commentedon Jul 24, 2020
565 remaining items