Swift snapshots for Ubuntu 18.04


(Mishal Shah) #1

Swift snapshots for the master are available today, and Swift 4.2 snapshots will be available soon.

Ubuntu 18.04 Trunk Development (master) snapshots available at https://swift.org/download/#snapshots


Why Swift is iOS only language
(Ali Ahmadi Teshnizi) #2

I installed swift for ubuntu 18.04 development release, going through this tutorial. When I enter swift command, REPL starts. I can define an integer using "let" command too. But when I want to define a new string, face this error:
"error: Couldn't lookup symbols:
Swift.String.init(_builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.StringØ›

I'm new to swift and can't understand what does that error exactly mean. Can anyone help me?

thanks!


(^) #3

did you import Foundation first? i used to have this problem but it went away when i built the compiler from source


(Lf Araujo) #4

This seems to be related to your installation, in my case this works as expected. That tutorial is using a very old swift version, are you sure you got the latest?


(Ali Ahmadi Teshnizi) #5

No. And actually have no idea about how to do that. :sweat_smile:


(Ali Ahmadi Teshnizi) #6

I installed the last release(for ubuntu 16) and the last snapshot(for ubuntu 18). None of them is working. Did you use the same installation method?


(Lf Araujo) #7

I did a few years ago and I also remember having all kinds of strange issues. Last time I installed it in Ubuntu I hard copied the files into /bin and /lib following the folder structure inside the zip, which I don't recommend you to do. Ubuntu failed on me again in January, so I moved on. But if I were you I would first test the flatpak repo first, last time I checked it did not work... this was in January as well. Search in this forum.


(Ali Ahmadi Teshnizi) #8

Aha. Thanks!


(Davide C. C. Italiano) #9

This should work out-the-box. In fact, it was a bug in the REPL.
https://github.com/apple/swift-lldb/pull/809 should fix the problem, and the next nightly should have a working REPL.


(Michael Gottesman) #10

For those listening in, @dcci is going to add a test to our integration test suite so that this is prevented from ever happening again.


(Davide C. C. Italiano) #11

Done https://github.com/apple/swift-integration-tests/pull/31


(Mishal Shah) #12

Swift 4.2 development snapshots now available for Ubuntu 18.04 on https://swift.org/download/#snapshots