I can't set swift toolchain path in ubuntu (CLION)


 

I'm trying to configure clion for a swift project, but it just doesn't recognize the swift toolchain path.

$ which swift

produces the output

/usr/bin/swift/bin/swift

so the toolchain is there but clion just doesn't recognize it


1
5 comments

Hello Seunlanlege,

I already setup Swift sdk in Ubuntu 16.04 LTS smoothly, looks like your SDK path is not correct related to your Swift installation configuration:

Try with "/usr/bin/swift", which is your actual Swift sdk home, as CLion expects Swift sdk home path, not Binary path(remaining taken care of by IDE).

Also, I hope you already setup Swift configuration correctly.

For a startover guide, you may refer:

  1. https://www.twilio.com/blog/2015/12/getting-started-with-swift-on-linux.html
  2. https://www.raywenderlich.com/122189/introduction-to-open-source-swift-on-linux 

Kind Regards,

infojg9

0
Avatar
Permanently deleted user

I already tried setting the tool chain path to 

`/usr/bin/swift`

I still get the same error.

I'm using swift 3.1.1 could this be the issue?

I'm also using the latest version of clion

0

Most unlikely, it works out of the box, than means your last swift sdk installation was not correct.

First cleanup your broken swift sdk, then adapt these instructions for your target platform:

https://swift.org/download/#using-downloads

https://swift.org/getting-started/#installing-swift

KR,

infojg9

0
Avatar
Permanently deleted user

Just putting / as the Swift toolchain path worked for me. lol.

(running on arch linux x64)

3
Avatar
Permanently deleted user

Apparently the path you choose must contain the folder `usr` underneath,  so in you case it should be just `/` but in general if swift is located at `SOME_PATH/usr/bin/swift` then you must select `SOME_PATH`.

1

Please sign in to leave a comment.