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-5632] Swift REPL does not start on Linux #4624
Comments
Comment by Vladislav Dembskiy (JIRA) Today I did fresh checkout and got the same error on LFS. My LFS systems has another tools then Gentoo but the error is the same. |
Comment by Vladislav Dembskiy (JIRA) I have renamed the issue because I have got the same eroor on Gentoo and LFS. |
Comment by Vladislav Dembskiy (JIRA) On updated Gentoo I have go the same error: vedg@ved-hp-gentoo /mnt/swift/swift-source/swift $ swift |
Can't repro anymore. |
It happens for me, on Raspbian Stretch with the current Swift 5.1 arm release: pi@pi3:~ $ swift --version
Swift version 5.1 (swift-5.1-RELEASE)
Target: armv6-unknown-linux-gnueabihf
pi@pi3:~ $ swift
error: Could not construct an expression context for the REPL. |
I think it's a different issue [arm vs x86-64]. |
also, arm is not really officially supported on swift/Linux |
Comment by Cebtenzzre (JIRA) I'm getting this error too. I built Swift from commit e3409e4 on the tensorflow branch. $ swift --version
Swift version 5.2-dev
Target: x86_64-unknown-linux-gnu |
Comment by Cebtenzzre (JIRA) Well, I figured it out. $ lldb --repl=-disable-objc-interop --one-line-before-file 'log enable lldb host'
(lldb) log enable lldb host
lldb shlib dir -> `/usr/lib/`
lldb HostInfo::ComputePathRelativeToLibrary() attempting to derive the path /bin relative to liblldb install path: /usr/lib
lldb HostInfo::ComputePathRelativeToLibrary() derived the path as: /usr/bin
lldb support exe dir -> `/usr/bin/`
lldb Process::ReadModuleFromMemory reading [vdso] binary from memory
lldb DefaultComputeSwiftResourceDir: Setting SwiftResourceDir to "/usr/lib/swift", verify = true
lldb swift dir -> '/usr/lib/swift/'
lldb VerifyClangPath(): failed to stat clang resource directory at "/usr/lib/clang/7.0.0"
lldb VerifyClangPath(): failed to stat clang resource directory at "/usr/lib/lldb/clang"
lldb GetClangResourceDir() => ''
error: Could not construct an expression context for the REPL. So, the issue here (which I figured out mostly using GDB) is that LLDB can't find the clang resource directory (/usr/lib/clang/9.0.1). This error message is unhelpful and the resource directory handling seems overly fragile. |
Environment
Linux ved-hp-gentoo 4.12.5-gentoo #1 SMP Wed Aug 16 20:24:09 MSK 2017 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Additional Detail from JIRA
md5: efedf513595f314a593fddcd9377e69c
Issue Description:
Today after fresh checkout I did build Swift from sources abu unable to run REPL. I have got the following error:
vedg@ved-hp-gentoo /mnt/swift $ swift
error: Could not construct an expression context for the REPL.
The environment is:
Fresh gentoo but Pyhon 2 is the default
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Swift has been installed using the command
utils/build-script --preset=buildbot_linux,no_test install_destdir=/mnt/swift/gentoo installable_package=/mnt/swift/gentoo/swift-gentoo.tar.gz
and I have copied /mnt/swift/gentoo/usr into /
Swift version 4.0-dev (LLVM 98499e0a26, Clang 337d432629, Swift ae6c61e)
Target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: