When running a carthage update --platform iOS ChartsRealm fails to build. I have tested this on 3 of our machines with the same result. We have cleaned the project deleted the Carthage directory tried downgrading the version. All with the same result.
Here is the output of the failure:
The following build commands failed:
Ld /Users/user/Library/Developer/Xcode/DerivedData/ChartsRealm-admcvrfsqdqvoxfzhmelrhhyzqfx/Build/Intermediates/Charts.build/Release-iphoneos/Charts-OSX.build/Objects-normal/armv7/Charts normal armv7
Ld /Users/user/Library/Developer/Xcode/DerivedData/ChartsRealm-admcvrfsqdqvoxfzhmelrhhyzqfx/Build/Intermediates/Charts.build/Release-iphoneos/Charts-OSX.build/Objects-normal/arm64/Charts normal arm64
(2 failures)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A shell task (/usr/bin/xcrun xcodebuild -project .../Carthage/Checkouts/Charts/ChartsRealm/ChartsRealm.xcodeproj -scheme ChartsRealm-iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
* BUILD FAILED *
The following build commands failed:
Ld /Users/user/Library/Developer/Xcode/DerivedData/ChartsRealm-admcvrfsqdqvoxfzhmelrhhyzqfx/Build/Intermediates/Charts.build/Release-iphoneos/Charts-OSX.build/Objects-normal/armv7/Charts normal armv7
Ld /Users/user/Library/Developer/Xcode/DerivedData/ChartsRealm-admcvrfsqdqvoxfzhmelrhhyzqfx/Build/Intermediates/Charts.build/Release-iphoneos/Charts-OSX.build/Objects-normal/arm64/Charts normal arm64
(2 failures)
same here, get the same error
If you don't need the ChartsRealm, go to Carthage\Checkouts\Charts
, delete ChartsRealm
, and run command carthage build
.
@lewissk: I have the same issue if I try to run Carthage action with Fastlane. If I run carthage update --platform iOS
or carthage update
directly in terminal, everything is ok. Do you use Fastlane or not?
@tomassliz I am not using Fastlane although I really like Fastlane. I am just doing the basic commandline carthage update --platform iOS
@lewissk After a few attempts everything works. It doesn't matter if I'm using Fastlane or not. I don't know what was the problem because everything is still the same (I removed Carthage folder and hard reset my git repo every time)
Same issue here. It fails only when building the iOS version of ChartsRealm. Seems like it wants to link Cocoa to the iOS framework which obviously won't work:
ld: framework not found Cocoa
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Same issue here. Any follow up on this issue?
Update your Carthage... It seems that it chooses wrong build arguments. As Cocoa is only imported for OSX
My carthage is up to date and I still have this problem. It should be fixed with #1119, I hope it happens soon.
@petester42 Well, it won't fix it if you want to use ChartsRealm, but a lot of people (like me) don't and carthage still builds it just because it's in the same repo.
Building all schemes in a project is a limitation of carthage. There is really nothing we can do about that. Having a different repo for each little extension becomes unmanageable really fast
Well, I wouldn't call it a "little extension", and neither would many people at #1119, but ok then, we can agree to disagree.
I would invite people having trouble with carthage builds to try using github "danielgindi/Charts" "extract-realm"
in their Cartfile.
Please report back if it fixes the problems.
@petester42 It still doesn't work here. :/
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmLineRadarDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmPieDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmLineDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmScatterDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmBarDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmBaseDataSet.swift
CompileSwift normal arm64 /Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmCandleDataSet.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(8 failures)
/Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmLineRadarDataSet.swift:41:22: error: use of undeclared type 'Fill'
/Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmPieDataSet.swift:47:20: error: use of unresolved identifier 'PieChartDataEntry'
/Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmPieDataSet.swift:51:20: error: use of unresolved identifier 'PieChartDataEntry'
/Users/daniel/Documents/Code/ios/Leio/Carthage/Checkouts/ios-charts/ChartsRealm/Classes/Data/RealmLineDataSet.swift:153:33: error: use of undeclared type 'IFillFormatter'
# And so on...
In what order did things build in?
# carthage update --platform iOS ios-charts
*** Fetching ios-charts
# ...
*** Fetching realm-cocoa
*** Downloading realm-cocoa.framework binary at "v1.0.2"
*** Checking out ios-charts at "d9d73eb072cb60f2b841eb7dd0be59b0561d9f2b"
*** xcodebuild output can be found in /var/folders/p7/7ckwbkvs0wb3q2qpn7wjn4yh0000gn/T/carthage-xcodebuild.Ybt8ep.log
*** Building scheme "Charts-iOS" in Charts.xcodeproj
*** Building scheme "ChartsRealm-iOS" in ChartsRealm.xcodeproj
And then come the errors.
I just tried it and it works just fine for me. Try deleting your derived data and then if that doesn't work delete the carthage folder as well as the cartfile.resolved.
I have the exact same issue @dbmrq encountered. I've cleaned everything, from the Derived Data to the CarthageKit cache before attempting a new build. The full log is available here, and my Cartfile looks like this:
github "realm/realm-cocoa" ~> 1.0
github "danielgindi/Charts" "extract-realm"
Nothing out of the ordinary. :)
From the logs that submitted it seems like you maybe are using a different version of xcode to build since those seem like generic syntax failures. Try running xcode-select -print-path
and see if your path is 7.3.1.
I just checked, the path points to the regular Xcode package, not the beta one.
Interestingly, building the frameworks on its own, after a failed attempt by Carthage, works flawlessly (assuming Carthage was able to build Charts and Realm).
I runned the command that Carthage _supposedly_ used:
$ /usr/bin/xcrun xcodebuild -project '<project>/Carthage/Checkouts/Charts/ChartsRealm/ChartsRealm.xcodeproj' -scheme ChartsRealm-iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build
It might actually be a weird timing issue, coming from Carthage.
I tried it with your new workspacing
branch and now it seems to be working! 馃帀
馃敟馃敟馃敟
Using workspacing
, it's working for me as well! 馃憦
My solution was removing github "danielgindi/Charts" ~> 2.2.5
from the Cartfile and run carthage update --platform iOS
to build all other frameworks, and after that run carthage update separately for Charts with carthage update Charts --platform iOS
closed by #1422
Most helpful comment
Same issue here. It fails only when building the iOS version of ChartsRealm. Seems like it wants to link Cocoa to the iOS framework which obviously won't work: