Carthage update - Task failed with exit code 65

Maor picture Maor · May 7, 2017 · Viewed 11.4k times · Source

I have 2 versions of Xcode installed, 8.3.2 and 8.2.1.

I'm working on a project that was written in Swift 2 and installed few third-party's via Carthage. After pulling branch I did carthage update : then I got this error:

$ carthage update
*** Fetching SwiftyJSON
*** Fetching Alamofire
*** Fetching Reachability.swift
*** Fetching AlamofireImage
*** Checking out Alamofire at "3.5.1"
*** Checking out AlamofireImage at "2.5.0"
*** Checking out Reachability.swift at "v2.4"
*** Checking out SwiftyJSON at "54017d514a87b2b855b407131292c510cdeb65f8"
*** xcodebuild output can be found in /var/folders/6s/5fm277hs03qb526nqykyplk40000gn/T/carthage-xcodebuild.JxFgDC.log
*** Building scheme "Alamofire watchOS" in Alamofire.xcworkspace
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -workspace /Users/maor/myProj/myProj/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace -scheme Alamofire\ watchOS -configuration Release -derivedDataPath /Users/maor/Library/Caches/org.carthage.CarthageKit/DerivedData/Alamofire/3.5.1 -sdk watchos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/6s/5fm277hs03qb526nqykyplk40000gn/T/carthage-xcodebuild.JxFgDC.log

part of carthage-xcodebuild.JxFgDC.log

=== CLEAN TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

** CLEAN FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
=== BUILD TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

Answer

CodeSteger picture CodeSteger · Dec 6, 2019

I had the same issue while updating the carthage.

Build Failed
Task failed with exit code 65: ..... This usually indicates that the project itself failed to compile. Please check the xcode build log for more details: /var/folders/np/1zqyzhbn4ljcb8fmdkz5y90h0000gq/T/carthage-xcodebuild.WE9DXB.log

This was due to the incorrect Xcode version pointed to the command-line tool. I updated the version and the issue is fixed. You can change it from the Xcode preference This way you can keep multiple Xcode with your machine. Xcode Preference