Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage build issue with SwiftCharts package #156

Open
weschilders opened this issue Nov 12, 2020 · 6 comments
Open

Carthage build issue with SwiftCharts package #156

weschilders opened this issue Nov 12, 2020 · 6 comments

Comments

@weschilders
Copy link

I've previously been able to build and run the app but I'm getting errors when trying to update carthage. Any tips?

Build Failed Task failed with exit code 1: /usr/bin/xcrun lipo -create /Users/wes/Library/Caches/org.carthage.CarthageKit/DerivedData/12.1_12A7403/SwiftCharts/0.6.5/Build/Intermediates.noindex/ArchiveIntermediates/SwiftCharts/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SwiftCharts.framework/SwiftCharts /Users/wes/Library/Caches/org.carthage.CarthageKit/DerivedData/12.1_12A7403/SwiftCharts/0.6.5/Build/Products/Release-iphonesimulator/SwiftCharts.framework/SwiftCharts -output /Users/wes/Downloads/CGMBLEKit-dev/Carthage/Build/iOS/SwiftCharts.framework/SwiftCharts

@esha1701
Copy link

I am getting the same error...I tried downgrading to Xcode 11 but that didn't work either
I think this is the problem - Carthage/Carthage#3019

@david-gonzalez-pnw
Copy link

I was running into this issue, specifically the error below

*** xcodebuild output can be found in /var/folders/02/k9c3235n4rgbqm8m78tx2hkh0000gn/T/carthage-xcodebuild.koMK2j.log
*** Building scheme "SwiftCharts" in SwiftCharts.xcodeproj
A shell task (/usr/bin/xcrun lipo -create /Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5_12E262/SwiftCharts/0.6.5/Build/Intermediates.noindex/ArchiveIntermediates/SwiftCharts/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SwiftCharts.framework/SwiftCharts /Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5_12E262/SwiftCharts/0.6.5/Build/Products/Release-iphonesimulator/SwiftCharts.framework/SwiftCharts -output /Users/user/Downloads/CGMBLEKit-dev/Carthage/Build/iOS/SwiftCharts.framework/SwiftCharts) failed with exit code 1:
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5_12E262/SwiftCharts/0.6.5/Build/Intermediates.noindex/ArchiveIntermediates/SwiftCharts/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SwiftCharts.framework/SwiftCharts and /Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5_12E262/SwiftCharts/0.6.5/Build/Products/Release-iphonesimulator/SwiftCharts.framework/SwiftCharts have the same architectures (arm64) and can't be in the same fat output file

Building universal frameworks with common architectures is not possible. The device and simulator slices for "SwiftCharts" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.

I'm on Big Sur, Xcode 12, building to a iOS14 target and the workaround specified in Carthage/Carthage#3019 (comment) helped me solve this issue.

I had been trying to build this for two days and had originally found this post that you referenced @esha1701 but missed that specific comment, I was doing some of the other workarounds. Great find!!

PS: don't use use --use-xcframeworks, that'll send you down a rabbit hole that will lead to other errors that are harder to get to the bottom of. I spent hours on this and it wasn't till I read more about what xcframeworks are and their backstory that I knew I shouldn't be spending time on it.

@mrengy
Copy link

mrengy commented Oct 20, 2021

I'm having the same error. Here's how I ended up with it.

I followed instructions at https://seemycgm.com/2018/05/03/reset-g5-transmitter/ .

In Xcode, I got the build error the post mentions: Swift Compiler Error > No such module 'LoopKit'

I tried the solution the post suggested: in Terminal, cd downloads/cgmblekit-dev && carthage update .

I then got

Mike-Engs-MacBook-Pro-5:~ mikeeng$ cd downloads/cgmblekit-dev && carthage update
*** Fetching dexcom-share-client-swift
*** Fetching LoopKit
*** Fetching SwiftCharts
*** Checking out LoopKit at "acd1212467ff7f7a3da6ff695f83764bbd0779a4"
*** Checking out dexcom-share-client-swift at "e3eb1b2baee97d95144c3f3f40c77ded42226604"
*** Checking out SwiftCharts at "0.6.5"
*** xcodebuild output can be found in /var/folders/9l/1slnl4q56pz_lc8krfnbdb000000gq/T/carthage-xcodebuild.qUSfBw.log
*** Building scheme "SwiftCharts tvOS" in SwiftCharts.xcodeproj
A shell task (/usr/bin/xcrun lipo -create /Users/mikeeng/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/SwiftCharts/0.6.5/Build/Intermediates.noindex/ArchiveIntermediates/SwiftCharts\ tvOS/IntermediateBuildFilesPath/UninstalledProducts/appletvos/SwiftCharts.framework/SwiftCharts /Users/mikeeng/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/SwiftCharts/0.6.5/Build/Products/Release-appletvsimulator/SwiftCharts.framework/SwiftCharts -output /Users/mikeeng/Downloads/CGMBLEKit-dev/Carthage/Build/tvOS/SwiftCharts.framework/SwiftCharts) failed with exit code 1:
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/mikeeng/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/SwiftCharts/0.6.5/Build/Intermediates.noindex/ArchiveIntermediates/SwiftCharts tvOS/IntermediateBuildFilesPath/UninstalledProducts/appletvos/SwiftCharts.framework/SwiftCharts and /Users/mikeeng/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/SwiftCharts/0.6.5/Build/Products/Release-appletvsimulator/SwiftCharts.framework/SwiftCharts have the same architectures (arm64) and can't be in the same fat output file

Building universal frameworks with common architectures is not possible. The device and simulator slices for "SwiftCharts" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.
Mike-Engs-AdHoc-MacBook-Pro-5:cgmblekit-dev mikeeng$ brew upgrade carthage
Updating Homebrew...
Warning: carthage 0.38.0 already installed
Mike-Engs-MacBook-Pro-5:cgmblekit-dev mikeeng$

I tried the workaround @david-gonzalez-pnw linked: Carthage/Carthage#3019 (comment) , which got me a bit farther but ended up with a different error:

Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/mikeeng/Downloads/CGMBLEKit-dev/Carthage/Checkouts/LoopKit/LoopKit.xcodeproj -scheme Shared-watchOS -configuration Release -derivedDataPath /Users/mikeeng/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/LoopKit/acd1212467ff7f7a3da6ff695f83764bbd0779a4 -sdk watchos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/9l/1slnl4q56pz_lc8krfnbdb000000gq/T/LoopKit SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/mikeeng/Downloads/CGMBLEKit-dev/Carthage/Checkouts/LoopKit)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/9l/1slnl4q56pz_lc8krfnbdb000000gq/T/carthage-xcodebuild.mID03E.log

I'm using Xcode 12.4 on Mac OS 10.15.7, building for iOS 12.1

@CAMOBAP
Copy link

CAMOBAP commented Dec 15, 2021

@mrengy have you tried to use Scripts/carthage.sh update --platform iOS instead carthage update?

Also, I have found that the same problem exists for Xcode 13, so make sense to update Scripts/carthage.sh accordingly ably/ably-cocoa@7506465

Also at this moment Cartfile.resolved looks outdated so make sure to update it with Scripts/carthage.sh update --platform iOS

@mrengy
Copy link

mrengy commented Dec 15, 2021 via email

@snackattas
Copy link

snackattas commented Jan 1, 2022

@CAMOBAP, I'm chiming in here

@mrengy have you tried to use Scripts/carthage.sh update --platform iOS instead carthage update?

Also, I have found that the same problem exists for Xcode 13, so make sense to update Scripts/carthage.sh accordingly ably/ably-cocoa@7506465

Also at this moment Cartfile.resolved looks outdated so make sure to update it with Scripts/carthage.sh update --platform iOS

Just curious, after running all these carthage commands, is the idea, then you click the play button in xcode and the build issues will have resolved themselves, with the carthage commands?

Also, I made that update to Scripts/carthage.sh, but got another error that the build target was incorrect (my phone is on iOS 14.1). Then I updated it and got another error, described here: #165. Any help you have with this is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants