Carthage: DVTToolchain: Failed to load toolchain

Created on 17 Jun 2016  路  15Comments  路  Source: Carthage/Carthage

  • carthage version: 0.16.2
  • xcodebuild -version: Xcode 7.3.1 Build version 7D1014
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No

Cartfile

github "PureLayout/PureLayout" == 3.0.1

Carthage Output

$ carthage update --platform iOS
*** Fetching PureLayout
*** Checking out PureLayout at "v3.0.1"
*** xcodebuild output can be found in /var/folders/rw/gbr9wvs91cz91mcpgdxv4q340000gn/T/carthage-xcodebuild.MK8m9m.log
*** Building scheme "PureLayout_iOS" in PureLayout.xcodeproj
2016-06-17 16:56:15.243 xcodebuild[18717:2053856] [MT] DVTToolchain: Failed to load toolchain: <DVTFilePath:0x7fb49d003260:'/Library/Developer/Toolchains/swift-latest.xctoolchain'>: Error Domain=DVTToolchainErrorDomain Code=4 "alleged toolchain directory doesn't contain ToolchainInfo.plist or Info.plist" UserInfo={NSFilePath=/Library/Developer/Toolchains/swift-latest.xctoolchain, NSLocalizedDescription=alleged toolchain directory doesn't contain ToolchainInfo.plist or Info.plist}
2016-06-17 16:56:18.387 xcodebuild[18788:2054057] [MT] DVTToolchain: Failed to load toolchain: <DVTFilePath:0x7fa3d6300940:'/Library/Developer/Toolchains/swift-latest.xctoolchain'>: Error Domain=DVTToolchainErrorDomain Code=4 "alleged toolchain directory doesn't contain ToolchainInfo.plist or Info.plist" UserInfo={NSFilePath=/Library/Developer/Toolchains/swift-latest.xctoolchain, NSLocalizedDescription=alleged toolchain directory doesn't contain ToolchainInfo.plist or Info.plist}

Just for information: I installed Xcode 8 Beta in the same Mac

Does anyone have an idea to fix this error? I feel that installing Xcode 8 created this problem. With time we will probably be required to have multiple versions of the tool chaine on a same mac. I don't know if Carthage is ready to manage this case.

Update: All my projects using Carthage have this error 馃槹

question

Most helpful comment

I was able to fix this issue by removing each toolchain that I had installed before Xcode 8 and then removing (manually) the symbolic link for the latest toolchain, /Library/Developer/Toolchains/swift-latest.xctoolchain. Without removing the symbolic link I was still observing the same error.

Meanwhile I installed a more recent toolchain (master) and everything seems continuing to be working.

All 15 comments

When I check the log the build of "PureLayout" finished with ** BUILD SUCCEEDED **
xcodebuild generate the error DVTToolchain: Failed to load toolchain but the build is done successfully 馃槼

I'm not sure. You might want to try reinstall Xcode. 馃槙

You might want to try reinstall Xcode. 馃槙

Xcode 7 or Xcode 8 Beta?

Both? 馃槙

I'm seeing this with --use-submodules on update as well, using the same build of Carthage.

@TofPlay Did you try reinstalling Xcode, and if so did it help?

I was able to fix this issue by removing each toolchain that I had installed before Xcode 8 and then removing (manually) the symbolic link for the latest toolchain, /Library/Developer/Toolchains/swift-latest.xctoolchain. Without removing the symbolic link I was still observing the same error.

Meanwhile I installed a more recent toolchain (master) and everything seems continuing to be working.

@Baza207 I reinstall Xcode 8 but it doesn't change anything
I checked on /Library/Developer/Toolchains and here's what I had:

$ cd /Library/Developer/Toolchains/
$ ll
total 8
lrwxr-xr-x  1 root  wheel    83B Jun  1 08:10 swift-latest.xctoolchain -> /Library/Developer/Toolchains/swift-3.0-preview-1-SNAPSHOT-2016-05-31-a.xctoolchain

Like @dmcrodrigues I have a swift-latest.xctoolchain that points to a directory that no longer exists. Remove this link solves the problem. (thanks to David Rodrigues 馃憤 馃檪 )

@mdiep just some quick questions: If I have a project develop with Swift 3 but this project need some frameworks written in Swift 2.3 and others written in Swift 3 how Carthage know what tool chain it must take for each framework? Or more simple I install a new tool chain and I want to test if my Carthage framework is compatible with this tool chain. How I can do that? Can we specify the tool chain in a Cartfile?

Thanks @TofPlay, same thing here and removing that sys link seems to have fixed it.

Seems to be a remnant of manually installing a Swift snapshot, rather than waiting for the Xcode 8 beta. 馃槢 When deleting the toolchain in Xcode 7, it doesn't seem to remove the sys link.

I'm not sure where we should report this, should it be a Radar or a Swift issue on JIRA?

If I have a project develop with Swift 3 but this project need some frameworks written in Swift 2.3 and others written in Swift 3 how Carthage know what tool chain it must take for each framework?

I'm not sure that's supported by Swift/Xcode.

Or more simple I install a new tool chain and I want to test if my Carthage framework is compatible with this tool chain. How I can do that? Can we specify the tool chain in a Cartfile?

TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 carthage build

Hi @mdiep

I'm not sure that's supported by Swift/Xcode.

Me either I don't know. But for sure all frameworks used on our projects will not migrate to Swift 3 simultaneously. The question is: Do we have to wait until all frameworks have switched to Swift 3 before migrate our project on Swift 3 too?

TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 carthage build

Ok thanks :)

@mdiep @TofPlay

If I have a project develop with Swift 3 but this project need some frameworks written in Swift 2.3 and others written in Swift 3 how Carthage know what tool chain it must take for each framework?

I'm not sure that's supported by Swift/Xcode.

I have a feeling that's not supported at the moment, but will be in the future, when the ABI is brought out after Swift 3 (though don't quote me, I may have completely misunderstood that).

IIUC we can't link a framework built with Swift 2.3 to Swift 3 codes and vice versa since there is no binary comparibility (ABI stability) yet.

It sounds like the underlying issue here was resolved.

@dmcrodrigues I am seeing this issue, how did you remove the system link to the old toolchains?

Was this page helpful?
0 / 5 - 0 ratings