New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-7801] Ubuntu developer snapshot requires Foundation for standard library symbols #4368
Comments
When this is resolved, it is important that an integration test is added to the swift-integration-testsuite: https://github.com/apple/swift-integration-tests Whoever fixes this, just follow the example of the import glibc test. |
@swift-ci create |
Reduced (broken also on MacOS): dtdebugger2:bin davide$ echo 'public func f() { print("patatino") }' > x.swift
dtdebugger2:bin davide$ ./swiftc -emit-library -emit-module -module-link-name x x.swift
dtdebugger2:bin davide$ ../../lldb-macosx-x86_64/bin/lldb --repl="-I ."
Welcome to Swift version 4.2-dev (LLVM fb6c0e5a49, Clang 5bae8c2e73, Swift 1a317f4712). Type :help for assistance.
1> import x
2> f()
error: Couldn't lookup symbols:
x.f() -> () |
That's a different issue. In fact, this works on ToT: $ ./build/Ninja-ReleaseAssert/lldb-linux-x86_64/bin/lldb --repl
Welcome to Swift version 4.2-dev (LLVM 3c04b0ea85, Clang 197a5d4e3b, Swift daeaaf8d91). Type :help for assistance.
1> import Swift
2> print(5)
5
3> let a = min(1.0, 2.0)
a: Double = 1 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial |
Can you please try building a ToT version of swift and letting me know whether it's fixed? Thanks! (you can use. a cmdline like |
Confirmed:
|
Is the fix contained in the latest snapshot? I downloaded and extracted swift-DEVELOPMENT-SNAPSHOT-2018-06-05-a-ubuntu16.04, and still get the same error message as reported above. |
If this works on ToT, but it doesn't work on a snapshot generated from ToT, then the bug is probably in the way the snapshot is generated (I Think). @shahmishal, as you're responsible for these ,can you please take a look? |
It does now work correctly with swift-DEVELOPMENT-SNAPSHOT-2018-08-10-a-ubuntu16.04, but the above problem still occurs with swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-10-a-ubuntu16.04. |
@martinr448 I am not sure if the fix can be cherry-picked into 4.2. friss (JIRA User). Your thoughts? |
This was cherry-picked into 4.2: |
@martinr448 can you check when another snapshot comes around that it works for you? |
Works now, tested on Ubuntu 16.04 with
Thanks! |
Environment
Ubuntu 16.04, running under VirtualBox
Additional Detail from JIRA
md5: 20a7246232fbec5b362321af1a1ed528
Issue Description:
With the current developer snapshot for Ubuntu 16.04, symbols from the standard library are not found unless Foundation is imported first:
Tested with the swift-DEVELOPMENT-SNAPSHOT-2018-05-29-a-ubuntu16.04.tar.gz snapshot for Ubuntu 16.04.
The problem does not occur with swift-4.1.1:
Related discussion in the Swift forum: Ubuntu developer snapshot requires Foundation for print statement
The text was updated successfully, but these errors were encountered: