Giter VIP home page Giter VIP logo

Comments (15)

gribozavr avatar gribozavr commented on May 21, 2024

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.

octoploid avatar octoploid commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

Comment by Nitin Gupta (JIRA)

I also had to apply this patch to REPL.cpp:
https://gist.github.com/aktowns/2adf0f252c97d140c766

from swift.

gribozavr avatar gribozavr commented on May 21, 2024

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.

octoploid avatar octoploid commented on May 21, 2024

The REPL.cpp patch isn't necessary when you use the default swift-lldb based REPL.

from swift.

gribozavr avatar gribozavr commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

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.

octoploid avatar octoploid commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

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

from swift.

gribozavr avatar gribozavr commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

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

}}

from swift.

swift-ci avatar swift-ci commented on May 21, 2024

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.

swift-ci avatar swift-ci commented on May 21, 2024

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.

octoploid avatar octoploid commented on May 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.