SwiftLint: Build fails on macOS 10.12 Sierra GM

I’m a maintainer of Homebrew, and we’re in the process of testing and packaging things for Sierra, which will be out in a few days.

When we build the latest release, or even the master branch with

make prefix_install PREFIX=<prefix> TEMPORARY_FOLDER=<buildpath>SwiftLint.dst

Here’s what we get:

xcodebuild -workspace 'SwiftLint.xcworkspace' -scheme 'swiftlint' DSTROOT=/private/tmp/swiftlint-20160915-55561-13o1han/SwiftLint.dst OTHER_LDFLAGS=-Wl,-headerpad_max_install_names -configuration Debug clean
*** Updating submodules...
Build settings from command line:
    DSTROOT = /private/tmp/swiftlint-20160915-55561-13o1han/SwiftLint.dst
    OTHER_LDFLAGS = -Wl,-headerpad_max_install_names

=== CLEAN TARGET SWXMLHash OSX OF PROJECT SWXMLHash WITH CONFIGURATION Debug ===

Check dependencies
“Use Legacy 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 TARGET Yaml OSX OF PROJECT Yaml WITH CONFIGURATION Debug ===

Check dependencies
“Use Legacy 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
    Check dependencies
(2 failures)

Full log is here (it might get purged after a while though).

Looks like your project hasn’t been configured for Xcode 8 so that you can still compile Swift 2?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 15
  • Comments: 16

Most upvoted comments

I merged https://github.com/realm/SwiftLint/pull/771 to master. Now, brew install --HEAD swiftlint works on Sierra:

➜  17:58:05 git:(master) ✗ brew install --HEAD swiftlint
==> Auto-updated Homebrew!
Updated Homebrew from d624627 to 41b2df8.
Updated 1 tap (homebrew/core).
No changes to formulae.

==> Using the sandbox
==> Cloning https://github.com/realm/SwiftLint.git
Cloning into '/Users/norio/Library/Caches/Homebrew/swiftlint--git'...
remote: Counting objects: 177, done.
remote: Compressing objects: 100% (167/167), done.
remote: Total 177 (delta 23), reused 48 (delta 0), pack-reused 0
Receiving objects: 100% (177/177), 361.63 KiB | 151.00 KiB/s, done.
Resolving deltas: 100% (23/23), done.
==> Checking out branch master
==> make prefix_install PREFIX=/usr/local/Cellar/swiftlint/HEAD-2380cdd TEMPORARY_FOLDER=/private/tmp/swiftlint-20160930-82158-1vsdko5/SwiftLint.dst
🍺  /usr/local/Cellar/swiftlint/HEAD-2380cdd: 33 files, 9.7M, built in 4 minutes 11 seconds
brew install --HEAD swiftlint  184.45s user 30.29s system 83% cpu 4:17.59 total

@zmwangx Do we need new release to avoid migrating the swiftlint formula to boneyard in Homebrew?

I confirmed that brew install swiftlint success on Sierra.

➜  18:34:08  brew install swiftlint
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Warning: You are using a pre-release version of Xcode.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Downloading https://homebrew.bintray.com/bottles/swiftlint-0.13.0.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring swiftlint-0.13.0.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/swiftlint/0.13.0: 34 files, 9.9M
brew install swiftlint  3.28s user 3.66s system 39% cpu 17.644 total

@norio-nomura Any news on the release?

@hashier here’s the log of the installation: https://gist.github.com/matteocrippa/5874fbd2b12bb2c56c4037db7caa6859

Seems a mix of permission and missing directories, but it’s a fresh install of 10.12.1.

@norio-nomura I tested brew install --HEAD swiftlint but won’t work for me on 10.12.1

Any update on this? It’s been more than a week since Xcode 8’s release and Sierra has officially landed too. If we don’t get a proper response in the next few days we may have to consider migrating the formula to boneyard, at least temporarily.

(You probably should care because brew install swiftlint seems to be your preferred method of installation.)