1

I an experiencing a Carthage exit code 65 error trying to update Mapbox to work with the latest version of XCode 12.5 that Apple is now requiring to publish to the App Store. I am aware that exit code 65 is a relatively common error going back many years for different repositories and the fix seems to vary by package. It often happens when you have two versions of XCode on your Mac which I have (the new 12.5 and the older 11.6). I'd prefer not to delete the old version of Xcode if at all possible but otherwise have have tried all the possible fixes I can think of. Would appreciate it if anyone can suggest something I am missing or spot something in the Terminal output or the cartfile.

Here are the steps I have taken.

  • Install the latest Carthage 0.38
  • Clean the project using the normal Product-Clean Build Folder option (XCode seems to have eliminated the old Deep Clean of Command Option Shift K in 12.5 as when I tried that nothing happened)
  • Delete contents of Derived Data Folder by going to Xcode-Preferences-Locations-Derived Data and deleting all the sub-folders
  • Ensure that X-code is running the Xcode-tools for 12.5 by running xcode-select -s /Applications/Xcode.app/Contents/Developer in terminal and then checking in Preferences - Locations--see image below
  • Verify contents of Cartfile. The cartfile looks like: github "mapbox/mapbox-navigation-ios" ~> 0.40.0
  • In Terminal, run carthage update --platform iOS --use-xcframeworks

In terminal all the usual libraries seem to be successfully fetched, checked out and built. Here is what Terminal shows up to the failure:

*** Fetching mapbox-navigation-ios
*** Fetching mapbox-speech-swift
*** Fetching mapbox-events-ios
*** Downloading binary-only framework Mapbox-iOS-SDK at "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json"
*** Fetching turf-swift
*** Fetching Solar
*** Downloading binary-only framework MapboxNavigationNative at "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json"
*** Downloading binary-only framework MapboxAccounts at "https://www.mapbox.com/ios-sdk/MapboxAccounts.json"
*** Fetching mapbox-directions-swift
*** Fetching Polyline
*** Checking out Polyline at "v4.2.1"
*** Checking out mapbox-directions-swift at "v0.31.1"
*** Checking out Solar at "2.2.0"
*** Checking out mapbox-navigation-ios at "v0.40.0"
*** Checking out turf-swift at "v0.3.0"
*** Checking out mapbox-events-ios at "v0.10.8"
*** Checking out mapbox-speech-swift at "v0.3.1"
*** xcodebuild output can be found in /var/folders/0h/pw1tqvms5l7_37h9ljl4vn1h0000gn/T/carthage-xcodebuild.iVQJPj.log
*** Downloading binary-only framework Mapbox-iOS-SDK at "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json"
*** Downloading binary-only framework MapboxAccounts at "https://www.mapbox.com/ios-sdk/MapboxAccounts.json"
*** Downloading binary-only framework MapboxNavigationNative at "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json"
*** Building scheme "MapboxMobileEvents" in MapboxMobileEvents.xcodeproj
*** Building scheme "MapboxSpeech iOS" in MapboxSpeech.xcodeproj
*** Building scheme "Polyline" in Polyline.xcodeproj
*** Building scheme "Solar iOS" in Solar.xcodeproj
*** Building scheme "Turf iOS" in Turf.xcodeproj
*** Building scheme "MapboxDirections iOS" in MapboxDirections.xcodeproj
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -project /Users/tester/Desktop/myprojects/myapp/Carthage/Checkouts/mapbox-directions-swift/MapboxDirections.xcodeproj -scheme MapboxDirections\ iOS -configuration Release -derivedDataPath /Users/tester/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5.1_12E507/mapbox-directions-swift/v0.31.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/0h/pw1tqvms5l7_37h9ljl4vn1h0000gn/T/mapbox-directions-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO FRAMEWORK_SEARCH_PATHS=$(inherited)\ /var/folders/0h/pw1tqvms5l7_37h9ljl4vn1h0000gn/T/carthage-xcframework-fADZ (launched in /Users/tester/Desktop/myprojects/myapp/Carthage/Checkouts/mapbox-directions-swift)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/0h/pw1tqvms5l7_37h9ljl4vn1h0000gn/T/carthage-xcodebuild.iVQJPj.log

When I try to run the project after this error, it shows the following error:

/Users/tester/Desktop/myprojects/myapp/Errands.swift:16:8: 
Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.4.2 compiler

:

/Users/tester/Desktop/myprojects/myapp/Carthage/Build/iOS/MapboxDirections.framework/Modules/MapboxDirections.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

Is there an issue with the Cartfile as in the 0.40.0.

Is there anything else I ought to be doing? Thanks in advance for any suggestions.

enter image description here

user6631314
  • 1,751
  • 1
  • 13
  • 44
  • There seems to be multiple issue with latest carthage 0.38.0. I also face issues as dependency mentioned inside a podspec is never build by carthage latest version. raised a issue here https://github.com/Carthage/Carthage/issues/3218 – Dinesh Jul 16 '21 at 05:21

0 Answers0