Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVTToolchain: Failed to load toolchain #1352

Closed
TofPlay opened this issue Jun 17, 2016 · 15 comments
Closed

DVTToolchain: Failed to load toolchain #1352

TofPlay opened this issue Jun 17, 2016 · 15 comments
Labels

Comments

@TofPlay
Copy link

TofPlay commented Jun 17, 2016

  • 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 😰

@TofPlay
Copy link
Author

TofPlay commented Jun 20, 2016

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 😳

@mdiep mdiep added the question label Jun 20, 2016
@mdiep
Copy link
Member

mdiep commented Jun 20, 2016

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

@TofPlay
Copy link
Author

TofPlay commented Jun 20, 2016

You might want to try reinstall Xcode. 😕

Xcode 7 or Xcode 8 Beta?

@mdiep
Copy link
Member

mdiep commented Jun 20, 2016

Both? 😕

@Baza207
Copy link

Baza207 commented Jun 20, 2016

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?

@dmcrodrigues
Copy link

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.

@TofPlay
Copy link
Author

TofPlay commented Jun 21, 2016

@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 👍 🙂 )

@TofPlay
Copy link
Author

TofPlay commented Jun 21, 2016

@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?

@Baza207
Copy link

Baza207 commented Jun 21, 2016

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?

@mdiep
Copy link
Member

mdiep commented Jun 22, 2016

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

@TofPlay
Copy link
Author

TofPlay commented Jun 23, 2016

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 :)

@Baza207
Copy link

Baza207 commented Jun 23, 2016

@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).

@ikesyo
Copy link
Member

ikesyo commented Jun 23, 2016

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.

@mdiep
Copy link
Member

mdiep commented Jun 24, 2016

It sounds like the underlying issue here was resolved.

@mdiep mdiep closed this as completed Jun 24, 2016
@Chandlerdea
Copy link

Chandlerdea commented Sep 14, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants