libgit2 / objective-git

Objective-C bindings to libgit2
MIT License
1.16k stars 280 forks source link

Failed to build master branch using Carthage #654

Closed mssun closed 6 years ago

mssun commented 6 years ago

I have this in my Carthage file:

github "libgit2/objective-git" "master"

When building for iOS, I got an error:

*** Checking out objective-git at "7b3348f5a9c591e86599860e9dd530c3ccffb0a0"
*** Building scheme "ObjectiveGit iOS" in ObjectiveGitFramework.xcworkspace
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -workspace /Users/user/Repos/passforios/Carthage/Checkouts/objective-git/ObjectiveGitFramework.xcworkspace -scheme ObjectiveGit\ iOS -configuration Release -derivedDataPath /Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/objective-git/7b3348f5a9c591e86599860e9dd530c3ccffb0a0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/p4/ry0l86nd70b9nfzjftxdqtcc0000gn/T/objective-git SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/user/Repos/passforios/Carthage/Checkouts/objective-git)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/p4/ry0l86nd70b9nfzjftxdqtcc0000gn/T/carthage-xcodebuild.fjlyc6.log

Here is the error message I find from the log:

ld: '/Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/objective-git/7b3348f5a9c591e86599860e9dd530c3ccffb0a0/Build/Intermediates.noindex/ArchiveIntermediates/ObjectiveGit iOS/BuildProductsPath/Release-iphoneos/Nimble.framework/Nimble' does\
 not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/user/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/objective-\
git/7b3348f5a9c591e86599860e9dd530c3ccffb0a0/Build/Intermediates.noindex/ArchiveIntermediates/ObjectiveGit iOS/BuildProductsPath/Release-iphoneos/Nimble.framework/Nimble' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
phatblat commented 6 years ago

Carthage isn't supposed to build Nimble, but apparently a dependency from the iOS target slipped in there. #655 should resolve this.