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

Carthage fails to build: "Swift Language Version" issue #492

Closed
Dschee opened this Issue Sep 18, 2017 · 4 comments

Comments

3 participants
@Dschee

Dschee commented Sep 18, 2017

Here's the problem with current version 0.7.1:

=== CLEAN TARGET CryptoSwift OF PROJECT CryptoSwift 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.
“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 CryptoSwift OF PROJECT CryptoSwift 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.
“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)
@krzyzanowskim

This comment has been minimized.

Owner

krzyzanowskim commented Sep 18, 2017

?
screen shot 2017-09-18 at 16 29 44

@Dschee

This comment has been minimized.

Dschee commented Sep 18, 2017

It's being built with Xcode 9 GM, so Swift 4 shouldn't be the problem. Actually it works for me on my local machine but it doesn't on our release-build machine, which also has Xcode 9 installed. Any ideas what could be wrong? Other frameworks – also with Swift 4 as targets – build correctly. Only this isn't.

@krzyzanowskim

This comment has been minimized.

Owner

krzyzanowskim commented Sep 18, 2017

I bet Carthage could go wrong.

@emaloney

This comment has been minimized.

Contributor

emaloney commented Sep 20, 2017

Three suggestions:

  1. If you have more than one Xcode installed, double-check to make sure that the command-line tools are using the right one. You can check this with xcode-select -p which will print out the path of the toolset that will be used for command-line builds. If the wrong one is being used, change it with sudo xcode-select -s <Xcode-9-path>. Once you do, you will likely need to open up a new terminal window to see the changes.

  2. I had an issue where the Carthage cache was referencing old things when Xcode 9 came out. This was a bug in Carthage, which they've addressed by including the Xcode version number in the cache path. You may want to be sure you're on the latest Carthage (0.25.0, released 16 days ago).

  3. Even if you install the latest Carthage, you may need to remove the Carthage cache if old stuff is still in there. Try rm -rf ~/Library/Caches/org.carthage.CarthageKit.

@Dschee, I'd be willing to bet that doing some or all of these things will fix your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment