swift binary in /usr/bin

Hi,

I recently installed a Swift Development snapshot of the package manager on
my system and added
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift
to my path. However when I do 'which swift' in my terminal it points to a
binary in /usr/bin. When I run 'swift build --help' I get '<unknown>:0:
error: no such file or directory: 'build'' so clearly it is not the right
swift binary. I am not sure where the binary came from in /usr/bin but I
cant delete it because OSX is telling me that it is needed by the operating
system. Has anyone encountered this before?

-Ryan

OS X puts forwarding stubs for various developer tools into /usr/bin that launch the corresponding tools from the active Xcode or Command Line Tools installation. IIRC you're supposed to use xcode-select, or change the toolchain within Xcode itself, instead of putting the toolchain directly in your path. You can then use `xcrun swift` to run swift with the correct environment set up.

-Joe

···

On Feb 25, 2016, at 7:54 AM, Ryan Baxter via swift-users <swift-users@swift.org> wrote:

Hi,

I recently installed a Swift Development snapshot of the package manager on my system and added /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift to my path. However when I do 'which swift' in my terminal it points to a binary in /usr/bin. When I run 'swift build --help' I get '<unknown>:0: error: no such file or directory: 'build'' so clearly it is not the right swift binary. I am not sure where the binary came from in /usr/bin but I cant delete it because OSX is telling me that it is needed by the operating system. Has anyone encountered this before?

That is correct.

Ryan, did you install the 2.2 stable snapshot? It is expected that that snapshot doesn't include the Swift package manager (swift-build). If you want it, you should install the development snapshots.

- Daniel

···

On Feb 25, 2016, at 9:31 AM, Joe Groff via swift-users <swift-users@swift.org> wrote:

On Feb 25, 2016, at 7:54 AM, Ryan Baxter via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

Hi,

I recently installed a Swift Development snapshot of the package manager on my system and added /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift to my path. However when I do 'which swift' in my terminal it points to a binary in /usr/bin. When I run 'swift build --help' I get '<unknown>:0: error: no such file or directory: 'build'' so clearly it is not the right swift binary. I am not sure where the binary came from in /usr/bin but I cant delete it because OSX is telling me that it is needed by the operating system. Has anyone encountered this before?

OS X puts forwarding stubs for various developer tools into /usr/bin that launch the corresponding tools from the active Xcode or Command Line Tools installation. IIRC you're supposed to use xcode-select, or change the toolchain within Xcode itself, instead of putting the toolchain directly in your path. You can then use `xcrun swift` to run swift with the correct environment set up.

-Joe

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

That is correct.

Ryan, did you install the 2.2 stable snapshot? It is expected that that snapshot doesn't include the Swift package manager (swift-build). If you want it, you should install the development snapshots.

I encountered this as well as I was definitely using the most recent development snapshot - swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-osx.

The installer said it was successful but I don’t see anything at /Library/Developer/Toolchains.

- Daniel

Hi,

I recently installed a Swift Development snapshot of the package manager on my system and added /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift to my path. However when I do 'which swift' in my terminal it points to a binary in /usr/bin. When I run 'swift build --help' I get '<unknown>:0: error: no such file or directory: 'build'' so clearly it is not the right swift binary. I am not sure where the binary came from in /usr/bin but I cant delete it because OSX is telling me that it is needed by the operating system. Has anyone encountered this before?

OS X puts forwarding stubs for various developer tools into /usr/bin that launch the corresponding tools from the active Xcode or Command Line Tools installation. IIRC you're supposed to use xcode-select, or change the toolchain within Xcode itself, instead of putting the toolchain directly in your path. You can then use `xcrun swift` to run swift with the correct environment set up.

-Joe

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

-Simon

···

On 25 Feb 2016, at 9:34 AM, Daniel Dunbar via swift-users <swift-users@swift.org> wrote:

On Feb 25, 2016, at 9:31 AM, Joe Groff via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

On Feb 25, 2016, at 7:54 AM, Ryan Baxter via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

Yes I installed the development snapshot and the swift binary was installed in /Library/Developer/... But there was already an existing binary in /usr/bin that I can't seem to replace or remove.

-Ryan

···

On Feb 27, 2016, at 2:21 PM, Simon Pilkington <simonmpilkington@icloud.com> wrote:

On 25 Feb 2016, at 9:34 AM, Daniel Dunbar via swift-users <swift-users@swift.org> wrote:

That is correct.

Ryan, did you install the 2.2 stable snapshot? It is expected that that snapshot doesn't include the Swift package manager (swift-build). If you want it, you should install the development snapshots.

I encountered this as well as I was definitely using the most recent development snapshot - swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-osx.

The installer said it was successful but I don’t see anything at /Library/Developer/Toolchains.

- Daniel

On Feb 25, 2016, at 9:31 AM, Joe Groff via swift-users <swift-users@swift.org> wrote:

On Feb 25, 2016, at 7:54 AM, Ryan Baxter via swift-users <swift-users@swift.org> wrote:

Hi,

I recently installed a Swift Development snapshot of the package manager on my system and added /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift to my path. However when I do 'which swift' in my terminal it points to a binary in /usr/bin. When I run 'swift build --help' I get '<unknown>:0: error: no such file or directory: 'build'' so clearly it is not the right swift binary. I am not sure where the binary came from in /usr/bin but I cant delete it because OSX is telling me that it is needed by the operating system. Has anyone encountered this before?

OS X puts forwarding stubs for various developer tools into /usr/bin that launch the corresponding tools from the active Xcode or Command Line Tools installation. IIRC you're supposed to use xcode-select, or change the toolchain within Xcode itself, instead of putting the toolchain directly in your path. You can then use `xcrun swift` to run swift with the correct environment set up.

-Joe

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

-Simon

Yes I installed the development snapshot and the swift binary was
installed in /Library/Developer/... But there was already an existing
binary in /usr/bin that I can't seem to replace or remove.

The binary in /usr/bin is a stub that forwards to the active toolchain's
swift binary.

-Joe

···

Ryan Baxter via swift-users <swift-users@swift.org> wrote:

-Ryan

On Feb 27, 2016, at 2:21 PM, Simon Pilkington <simonmpilkington@icloud.com> wrote:

On 25 Feb 2016, at 9:34 AM, Daniel Dunbar via swift-users <swift-users@swift.org> wrote:

That is correct.

Ryan, did you install the 2.2 stable snapshot? It is expected that that
snapshot doesn't include the Swift package manager (swift-build). If
you want it, you should install the development snapshots.

I encountered this as well as I was definitely using the most recent
development snapshot - swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-osx.

The installer said it was successful but I don’t see anything at
/Library/Developer/Toolchains.

- Daniel

On Feb 25, 2016, at 9:31 AM, Joe Groff via swift-users <swift-users@swift.org> wrote:

On Feb 25, 2016, at 7:54 AM, Ryan Baxter via swift-users <swift-users@swift.org> wrote:

Hi,

I recently installed a Swift Development snapshot of the package
manager on my system and added
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift
to my path. However when I do 'which swift' in my terminal it points
to a binary in /usr/bin. When I run 'swift build --help' I get
'<unknown>:0: error: no such file or directory: 'build'' so clearly
it is not the right swift binary. I am not sure where the binary
came from in /usr/bin but I cant delete it because OSX is telling me
that it is needed by the operating system. Has anyone encountered this before?

OS X puts forwarding stubs for various developer tools into /usr/bin
that launch the corresponding tools from the active Xcode or Command
Line Tools installation. IIRC you're supposed to use xcode-select, or
change the toolchain within Xcode itself, instead of putting the
toolchain directly in your path. You can then use `xcrun swift` to run
swift with the correct environment set up.

-Joe

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

-Simon

--Apple-Mail-CE469578-FBD9-43DC-8C2E-567BFBBD23FF
Content-Type: text/html;
  charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv="content-type" content="text/html;
charset=utf-8"></head><body dir="auto"><div>Yes I installed the
development snapshot and the swift binary was installed in
/Library/Developer/... But there was already an existing binary in
/usr/bin that I can't seem to replace or
remove.<br><br>-Ryan</div><div><br>On Feb 27, 2016, at 2:21 PM, Simon
Pilkington &lt;
a href="mailto:simonmpilkington@icloud.com">simonmpilkington@icloud.com</a>&gt;
wrote:<br><br></div><blockquote type="cite"><div><meta
http-equiv="Content-Type" content="text/html charset=utf-8"><br
class=""><div><blockquote type="cite" class=""><div class="">On 25 Feb
2016, at 9:34 AM, Daniel Dunbar via swift-users &lt;<a
href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br
class="Apple-interchange-newline"><div class=""><meta
http-equiv="Content-Type" content="text/html charset=us-ascii"
class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">That is correct.<div
class=""><br class=""></div><div class="">Ryan, did you install the 2.2
stable snapshot? It is expected that that snapshot doesn't include the
Swift package manager (swift-build). If you want it, you should install
the development snapshots.</div></div></div></blockquote><div><br
class=""></div>I encountered this as well as I was definitely using the
most recent development snapshot
-&nbsp;swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-osx.</div><div><br
class=""></div><div>The installer said it was successful but I don’t see
anything at&nbsp;<span style="color: rgb(41, 41, 41); font-family:
'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"
class="">/Library/Developer/Toolchains.</span></div><div><font
color="#292929" face="Helvetica Neue, Helvetica, Arial, Lucida Grande,
sans-serif" class=""><br class=""></font><blockquote type="cite"
class=""><div class=""><div style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"
class=""><div class=""><br class=""></div><div class="">&nbsp;-
Daniel</div><div class=""><br class=""><div class=""><blockquote
type="cite" class=""><div class="">On Feb 25, 2016, at 9:31 AM, Joe Groff
via swift-users &lt;<a href="mailto:swift-users@swift.org"
class="">swift-users@swift.org</a>&gt; wrote:</div><br
class="Apple-interchange-newline"><div class=""><meta
http-equiv="Content-Type" content="text/html charset=us-ascii"
class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class=""><br class=""><div
class=""><blockquote type="cite" class=""><div class="">On Feb 25, 2016,
at 7:54 AM, Ryan Baxter via swift-users &lt;<a
href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br
class="Apple-interchange-newline"><div class=""><div dir="ltr"
class="">Hi,<div class=""><br class=""></div><div class="">I recently
installed a Swift Development snapshot of the package manager on my
system and added&nbsp;<span
style="color:rgb(41,41,41);font-family:'Helvetica Neue',Helvetica,Arial,'Lucida
Grande',sans-serif"
class="">/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift to my
path.&nbsp; However when I do 'which swift' in my terminal it points to a
binary in /usr/bin.&nbsp; When I run '</span><font color="#292929"
face="Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif"
class="">swift build --help' I get '&lt;unknown&gt;:0: error: no such
file or directory: 'build'' so clearly it is not the right swift
binary.&nbsp; I am not sure where the binary came from in /usr/bin but I
cant delete it because OSX is telling me that it is needed by the
operating system.&nbsp; Has anyone&nbsp;encountered&nbsp;this
before?</font></div></div></div></blockquote><br class=""></div><div
class="">OS X puts forwarding stubs for various developer tools into
/usr/bin that launch the corresponding tools from the active Xcode or
Command Line Tools installation. IIRC you're supposed to use
xcode-select, or change the toolchain within Xcode itself, instead of
putting the toolchain directly in your path. You can then use `xcrun
swift` to run swift with the correct environment set up.</div><div
class=""><br class=""></div><div class="">-Joe</div><br
class=""></div>_______________________________________________<br
class="">swift-users mailing list<br class=""><a
href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br
class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users&quot;
class="">https://lists.swift.org/mailman/listinfo/swift-users&lt;/a&gt;&lt;br
class=""></div></blockquote></div><br
class=""></div></div>_______________________________________________<br
class="">swift-users mailing list<br class=""><a
href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br
class="">
a href="https://lists.swift.org/mailman/listinfo/swift-users&quot;&gt;https://lists.swift.org/mailman/listinfo/swift-users&lt;/a&gt;&lt;br
class=""></div></blockquote><br class=""></div><div>-Simon</div><br
class=""></div></blockquote></body></html>
--Apple-Mail-CE469578-FBD9-43DC-8C2E-567BFBBD23FF--