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-39] Unable to start REPL on Linux #42662
Comments
To run the REPL, the 'swift' and 'lldb' binaries need to be next to each other. This is not the case in the build tree. Either create a symlink, or build the package using 'build-script --preset=buildbot_linux_1404 installable_package=/tmp/swift.tar.gz install_destdir=/tmp/swift-install', and try again from the package. |
I initially had the same issue initially. I think this should be documented more prominently. |
Comment by Nitin Gupta (JIRA) (tested on Fedora 23 x86_64): Dmitri: Foundation/NSArray.swift:347:13: error: invalid character in source file octopid: + /usr/bin/cmake --build /scratch/src/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64 – install However lldb did get created which I symlinked along with swift binary (as suggest by Dmitry) and the swift REPL works now. Still would have like a single clean build command. |
Comment by Nitin Gupta (JIRA) I also had to apply this patch to REPL.cpp: |
For the Foundation issue, please run `utils/update-checkout -a` and rebuild. I fixed the issue in apple/swift-corelibs-foundation@7d77b31 For the REPL.cpp patch, please propose it as a pull request. Thank you! |
The REPL.cpp patch isn't necessary when you use the default swift-lldb based REPL. |
It isn't, but we still would like to get the integrated REPL working, it is useful for engineers working on the compiler and standard library. |
Comment by Nitin Gupta (JIRA) checked out the latest sources and tried building again with Dmitri's method and now I get this: CMake Error at scripts/cmake_install.cmake:36 (file): FAILED: cd /scratch/src/swift/build/buildbot_linux/lldb-linux-x86_64 && /usr/bin/cmake -P cmake_install.cmake |
I had the same issue first. Just adjust the path. The correct path is: /scratch/src/swift/build/buildbot_linux/lldb-linux-x86_64/lib64/python2.7 |
Comment by Nitin Gupta (JIRA) Markus: now it goes a bit further but then bails out with this error:
|
I see. Unfortunately, the package preset depends on the swift-package-tests directory, which is currently missing from the repository. As a temporary workaround, please disable those tests by commenting out "test-installable-package=1" from utils/build-presets.ini. This will allow build-script to exit with success. I actually think the package file should have been created, could you check? |
Comment by Nitin Gupta (JIRA) Yes swift.tar.gz was created and I have now disable tests on installable package as you suggested. However, I pulled all repos and now I see swift.tar.gz did not get updated. Looking at the logs, I see that the build now fails on this test:
|
Comment by Nitin Gupta (JIRA) I now tried building with buildbot_linux_1510 preset on Ubuntu 15.10 and everything works fine. I will retry on Fedora 23 later. Thanks for all the replies. Closing the issue. |
Comment by Nitin Gupta (JIRA)
Markus, By any chance would you know a permanent fix for this? This extra step of modifying an auto generated file during build is stopping me from getting automated builds on Fedora 23. This problem does not exist on Ubuntu 15.10 but that's not what I usually use. Thanks. |
Nitin, This is a very old lldb issue. I think it was there from the start... (I never bothered to report it. But the right thing to do would be to open a new bug on the llvm bugzilla.) |
Environment
Linux x86_64:
Ubuntu 15.10
Fedora 23
Additional Detail from JIRA
md5: fd86c22c281bf15d4abce7ab7c984033
Issue Description:
I build swift from source on both Ubuntu 15.10 and Fedora 23 with:
utils/build-script -R
to get a release build.
But when I try to start REPL from build directory I'm getting following error (on both Linux flavors):
LLVM ERROR: Compiler-internal integrated REPL unimplemented for this platform
However I can run ./swiftc without errors.
Output of tests run with 'build-scripts -R -t':
Testing Time: 46.07s
Expected Passes : 1667
Expected Failures : 92
Unsupported Tests : 573
check-swift-linux-x86_64 finished --
The text was updated successfully, but these errors were encountered: