[swift-users] stuck in Getting Started: swift-build missing on Mac OS X? And invalid signature?

Jean-Denis Muys jdmuys at gmail.com
Thu Feb 11 05:15:03 CST 2016


Hi,

I am following the Getting Started page at https://swift.org/getting-started <https://swift.org/getting-started> and I have a problem when arriving at “Using the build system”.

When I type the “swift build —help” command, I get the following error:

> $ swift build --help
> error: unable to invoke subcommand: /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swift-build (No such file or directory)


And indeed the diagnostic is right: there is no binary named swift-build there.

Here is what I did:

- I downloaded from https://swift.org/download/: <https://swift.org/download/:>

• the Xcode Swift Development Snapshot (dated February 8, 2016)
• its Debugging symbols
• the Xcode Swift 2.2 Snapshot (dated February 8, 2016)
• its Debugging symbols

- I installed all four packages for all users.

- I changed my PATH as suggested:

> $ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"


- I ran Xcode 7.3B3, and selected the toolchain named "Xcode Swift Development Snapshot 2016-02-08 (a)”

Xcode restarted and seems OK with it, with the new button in the toolbar as expect

- I checked the /Library/Developer/Content:

> $ cd /Library/Developer/Toolchains/
> $ ls -la
> total 8
> drwxr-xr-x  5 root  wheel  170 Feb 11 11:34 .
> drwxr-xr-x  5 root  admin  170 Feb 11 11:14 ..
> drwxr-xr-x  6 root  wheel  204 Feb 11 11:34 swift-2.2-SNAPSHOT-2016-02-08-a.xctoolchain
> drwxr-xr-x  6 root  wheel  204 Feb 11 11:27 swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a.xctoolchain
> lrwxr-xr-x  1 root  wheel   73 Feb 11 11:34 swift-latest.xctoolchain -> /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2016-02-08-a.xctoolchain


- I checked the current swift:

> $ which swift
> /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift
> $ swift --version
> Apple Swift version 2.2-dev (LLVM ee6c2618e5, Clang 9b95f4af98, Swift d45cca1dc1)
> Target: x86_64-apple-macosx10.9

(So it seems the selected toolchain in Xcode doesn’t correspond to the toolchain pointed to by the swift-latest.xctoolchain symbolic link. Fine)

- I went back to Xcode and noticed a button in the toolchain preference pane that appears when hovering over it. Clicking it shows a pop-up with the option to “Verify code signature…”. Doing it yielded the following error:


> “Xcode Swift DEVELOPMENT Snapshot 2016-02-08 (a)” does not have a valid signature: a sealed resource is missing or invalid

This for both installed toolchains

> “Xcode Swift 2.2 Snapshot 2016-02-08 (a)” does not have a valid signature: a sealed resource is missing or invalid


- I tried to prefix swift with xcrun, which shows xcrun doesn’t respect the selected toolchain:

> $ xcrun swift --version
> Apple Swift version 2.2 (swiftlang-703.0.6.5 clang-703.0.21)
> Target: x86_64-apple-macosx10.9
> $ swift --version
> Apple Swift version 2.2-dev (LLVM ee6c2618e5, Clang 9b95f4af98, Swift d45cca1dc1)
> Target: x86_64-apple-macosx10.9


So are the snapshots really broken? Or is it Xcode signature check that is broken?\
Where is my swift-build?

Thanks,

Jean-Denis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160211/7f9a5e2e/attachment.html>


More information about the swift-users mailing list