Comments (15)
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.
from swift.
I initially had the same issue initially.
But if you run "lldb/scripts/build-swift-cmake.py --release --update",
it will install everything to ./install/usr/bin and the error goes away.
I think this should be documented more prominently.
from swift.
Comment by Nitin Gupta (JIRA)
(tested on Fedora 23 x86_64):
Dmitri:
'build-script --preset=buildbot_linux_1404 installable_package=/tmp/swift.tar.gz install_destdir=/tmp/swift-install' terminates with following error:
Foundation/NSArray.swift:347:13: error: invalid character in source file
guard idx < count && idx >= 0 else {
Foundation/NSArray.swift:347:15: error: invalid character in source file
guard idx < count && idx >= 0 else {
Foundation/NSArray.swift:347:17: error: invalid character in source file
guard idx < count && idx >= 0 else {
Foundation/NSArray.swift:347:19: error: invalid character in source file
guard idx < count && idx >= 0 else {
Foundation/NSArray.swift:348:13: error: invalid character in source file
fatalError("(self): Index out of bounds")
Foundation/NSArray.swift:348:15: error: invalid character in source file
fatalError("(self): Index out of bounds")
octopid:
'lldb/scripts/build-swift-cmake.py --release --update' gives:
+ /usr/bin/cmake --build /scratch/src/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64 – install
ninja: error: unknown target '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.
from swift.
Comment by Nitin Gupta (JIRA)
I also had to apply this patch to REPL.cpp:
https://gist.github.com/aktowns/2adf0f252c97d140c766
from swift.
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!
from swift.
The REPL.cpp patch isn't necessary when you use the default swift-lldb based REPL.
from swift.
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.
from swift.
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):
file INSTALL cannot find
"/scratch/src/swift/build/buildbot_linux/lldb-linux-x86_64/lib/python2.7".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
FAILED: cd /scratch/src/swift/build/buildbot_linux/lldb-linux-x86_64 && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
utils/build-script: command terminated with a non-zero exit status 1, aborting
utils/build-script: command terminated with a non-zero exit status 1, aborting
from swift.
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
from swift.
Comment by Nitin Gupta (JIRA)
Markus: now it goes a bit further but then bails out with this error:
-
-
- Creating installable package ---
-
Package file: /tmp/swift.tar.gz --
/tmp/swift_package_sandbox /scratch/src/swift/swift
/scratch/src/swift/swift- cd /scratch/src/swift/swift-package-tests
/scratch/src/swift/swift/utils/build-script-impl: line 2238: cd: /scratch/src/swift/swift-package-tests: No such file or directory
utils/build-script: command terminated with a non-zero exit status 1, aborting
utils/build-script: command terminated with a non-zero exit status 1, aborting
- cd /scratch/src/swift/swift-package-tests
-
from swift.
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?
from swift.
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:
{{
FAIL: Swift :: stdlib/StringSlicesConcurrentAppend.swift (7003 of 7257)
> ******************** TEST 'Swift :: stdlib/StringSlicesConcurrentAppend.swift' FAILED ********************
Script:
rm -rf /scratch/src/swift/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/StringSlicesConcurrentAppend.swift.tmp && mkdir -p /scratch/src/swift/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/StringSlicesConcurrentAppend.swift.tmp && /scratch/src/swift/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -target x86_64-unknown-linux-gnu -module-cache-path '/tmp/swift-testsuite-clang-module-cache7RtjVi' -module-cache-path '/tmp/swift-testsuite-clang-module-cache7RtjVi' /scratch/src/swift/swift/validation-test/stdlib/StringSlicesConcurrentAppend.swift -o /scratch/src/swift/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/StringSlicesConcurrentAppend.swift.tmp/a.out -module-name main && /scratch/src/swift/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/StringSlicesConcurrentAppend.swift.tmp/a.out
Exit Code: 1
Command Output (stderr):
/scratch/src/swift/swift/validation-test/stdlib/StringSlicesConcurrentAppend.swift:37:7: warning: variable 'ret' was never mutated; consider changing to 'let' constant
var ret = _stdlib_pthread_barrier_wait(barrierVar)
~~~ ^
let
/scratch/src/swift/swift/validation-test/stdlib/StringSlicesConcurrentAppend.swift:69:16: error: type of expression is ambiguous without more context
if tid == .Master {
^~~~~
--
********************
Testing Time: 182.27s
********************
Failing Tests (1):
Swift :: stdlib/StringSlicesConcurrentAppend.swift
Expected Passes : 6540
Expected Failures : 102
Unsupported Tests : 614
Unexpected Failures: 1
-
-
- Failed while running tests for swift (check-swift-all-linux-x86_64)
utils/build-script: command terminated with a non-zero exit status 1, aborting
utils/build-script: command terminated with a non-zero exit status 1, aborting
- Failed while running tests for swift (check-swift-all-linux-x86_64)
-
}}
from swift.
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.
from swift.
Comment by Nitin Gupta (JIRA)
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
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.
from swift.
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.)
from swift.
Related Issues (20)
- Regression in Swift 6.0 compiler
- Unbalanced release of DictionaryStorage triggered by use of (.compacted() + Array).map() in release build HOT 10
- TypeCheckProtocol.cpp crashed with "witness has more effects than requirement?"
- Swift 5.10 crashing when -cross-module-optimization is enabled
- WinSDK import fails with Windows SDK 10.0.17763.0 HOT 3
- Using `@rethrows` protocols in `rethrows` functions allow the throws function to be called without `try`
- AnyObject key path diagnostic is broken
- Incompatibility of `borrowing` with `any` type in function arguments HOT 1
- [AutoDiff] Runtime EXC_BAD_ACCESS when running a pullback in certain cases. HOT 1
- Compiler hangs occasionally on many-core CPUs on Windows HOT 5
- Variable used before declaration cause crash in runtime on access, instead compilation error
- swift-frontend flag `-target-variant` does not persist in swift object file when generating static library
- Crash when using a logical operator inside pack iteration
- The equality comparison operator `==` is producing incorrect results for KeyPaths on Swift 6.0 Development Snapshots. HOT 1
- @TaskLocal macro does not specify access control for projected value properties HOT 3
- `some` cannot be used instead of a generic placeholder for never-returned type inference
- [Concurrency][SE-0434] Treat captured local globally-isolated functions as `Sendable`
- Contradictory compiler diagnostics regarding termination and return analysis HOT 2
- 老牌机场推荐:2024最新老牌机场
- @_noLocks doesn't work with ~Copyable types HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.