Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Support for cross-compiling the swift repl #48

Merged
merged 1 commit into from
Sep 7, 2016
Merged

Support for cross-compiling the swift repl #48

merged 1 commit into from
Sep 7, 2016

Conversation

karwa
Copy link

@karwa karwa commented Aug 31, 2016

Requires new build-script variable: LLDB_SWIFTC, from swiftlang/swift#4574

(requires new build-script variable: LLDB_SWIFTC)
@tfiala
Copy link
Contributor

tfiala commented Sep 1, 2016

@swift-ci Please test Linux platform

@karwa
Copy link
Author

karwa commented Sep 1, 2016

It will fail to build until the requisite swift build-script variables are given (see linked patch).

@tfiala
Copy link
Contributor

tfiala commented Sep 1, 2016

Ah I see, okay thanks.

Separately, I have a question into our build system maintainer to figure out why said build did not actually kick off, independently of its expectation to fail. (We should have gotten a notification of a build going into a queue).

@karwa
Copy link
Author

karwa commented Sep 6, 2016

@tfiala we have cross-repo testing support now, so it should work

@tfiala
Copy link
Contributor

tfiala commented Sep 6, 2016

@swift-ci Please test Linux platform

@karwa
Copy link
Author

karwa commented Sep 6, 2016

Buidbot failed to pull in the linked patch to the swift build script, so it failed.

CC @shahmishal , is this supposed to work?

@tfiala
Copy link
Contributor

tfiala commented Sep 6, 2016

We're seeing this build error on the Linux CI:

[713/872] Building CXX object source/Utility/CMakeFiles/lldbUtility.dir/UriParser.cpp.o
[714/872] Creating export file for liblldb
[715/872] Generating ../../lib/lldb/clang
[716/872] cd /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/tools/repl/swift && /opt/bin/cmake -E remove_directory /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/./repl_swift_module_cache
[717/872] cd /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/tools/repl/swift && /opt/bin/cmake -E make_directory /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/./repl_swift_module_cache
[718/872] Generating ../../../bin/repl_swift
FAILED: cd /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/tools/repl/swift \
&& -resource-dir /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/swift-linux-x86_64/lib/swift \
-module-cache-path /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/./repl_swift_module_cache \
-o /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/Ninja-DebugAssert/lldb-linux-x86_64/./bin/repl_swift \
-Xlinker -rpath -Xlinker "\$ORIGIN/../lib/swift/linux" /home/buildnode/disk2/workspace/swift-lldb-PR-Linux/lldb/tools/repl/swift/main.swift
/bin/sh: 1: -resource-dir: not found

@shahmishal
Copy link
Member

I should have it completed by end of day today.

@tfiala
Copy link
Contributor

tfiala commented Sep 6, 2016

Buidbot failed to pull in the linked patch to the swift build script, so it failed.
CC @shahmischal

Ah sorry, missed that before I reflected up the error.

@shahmishal
Copy link
Member

swiftlang/swift#4574
@swift-ci Please test Linux platform

@shahmishal
Copy link
Member

Please test with following PR:
swiftlang/swift#4574

@swift-ci Please test Linux platform

@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

@shahmishal, this doesn't look like it worked. I'm seeing the same error we were getting this morning.

@karwa
Copy link
Author

karwa commented Sep 7, 2016

The tests from the swift side of the patch seem to work: https://ci.swift.org/job/swift-PR-Linux/3718/consoleFull

(checks out apple/swift from PR 4574, the sister patch)

15:40:03 Fetching upstream changes from [email protected]:apple/swift.git
15:40:03  > git --version # timeout=10
15:40:03  > git -c core.askpass=true fetch --tags --progress [email protected]:apple/swift.git +refs/pull/*:refs/remotes/origin/pr/*
15:40:06  > git rev-parse refs/remotes/origin/pr/4574/merge^{commit} # timeout=10
15:40:06  > git rev-parse refs/remotes/origin/origin/pr/4574/merge^{commit} # timeout=10
15:40:06 Checking out Revision 5cfcc54dea1b7732a085fb38fd1890b36e9eb990 (refs/remotes/origin/pr/4574/merge)
15:40:06  > git config core.sparsecheckout # timeout=10
15:40:06  > git checkout -f 5cfcc54dea1b7732a085fb38fd1890b36e9eb990

... then a bit later it merges this one in to LLDB

15:40:15 + git fetch origin pull/48/merge:ci_pr_48
15:40:16 From https://github.com/apple/swift-lldb
15:40:16  * [new ref]         refs/pull/48/merge -> ci_pr_48
15:40:16 + git fetch --recurse-submodules=yes
15:40:17 From https://github.com/apple/swift-lldb
15:40:17    d5c8597..2412f02  swift-3.0-branch -> origin/swift-3.0-branch
15:40:17 + git clean -fdx
15:40:17 + git submodule foreach --recursive git clean -fdx
15:40:17 + git submodule foreach --recursive git reset --hard HEAD
15:40:18 + git reset --hard HEAD
15:40:18 HEAD is now at a0a6b64 Remove unnecessary include of swift/AST/ExprHandle.h.
15:40:18 + git checkout ci_pr_48
15:40:18 Switched to branch 'ci_pr_48'
15:40:18 + git submodule update --recursive
15:40:18 + git fetch --recurse-submodules=yes
15:40:18 + git clean -fdx

It's a little bit hard to follow because there's loads of changes that went in to the same test (and because it was done from the swift side, the swift project is listed in Jenkins' list of changes but the LLDB one isn't). But I think we ended up with everything where it should be.

EDIT: Oops. Looking at it again, we didn't even build LLDB :p

15:40:22 /home/buildnode/disk2/workspace/swift-PR-Linux/branch-master/swift/utils/build-script: note: using preset 'buildbot_linux_1404_no_lldb', which expands to 

@shahmishal
Copy link
Member

@karwa @tfiala Sorry, I am still testing :)

@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

Ah okay thanks!

@shahmishal
Copy link
Member

Please test with following PR:
swiftlang/swift#4574

@swift-ci Please test Linux platform

@shahmishal
Copy link
Member

It picked up the right PR, lets see if we see any other issues.

+ git fetch origin pull/4574/merge:ci_pr_4574
From github.com:apple/swift
 * [new ref]         refs/pull/4574/merge -> ci_pr_4574

@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

Okay, fingers crossed :-)

@shahmishal
Copy link
Member

it passed 👍

@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

Awesome, thanks!

@tfiala tfiala merged commit 587e781 into apple:master Sep 7, 2016
@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

@shahmishal I think I put this in prematurely. We need swiftlang/swift#4574 to go in first, don't we.

@tfiala
Copy link
Contributor

tfiala commented Sep 7, 2016

I took care of the other check-in. I restarted the LLDB builders to make sure they picked up the swift change.

fredriss pushed a commit that referenced this pull request Sep 7, 2016
This reverts commit rL280668 because the register tests fail on i386
Linux.

I investigated a little bit what causes the failure - there are missing
registers when running 'register read -a'.
This is the output I got at the bottom:
"""
...
Memory Protection Extensions:
      bnd0 = {0x0000000000000000 0x0000000000000000}
      bnd1 = {0x0000000000000000 0x0000000000000000}
      bnd2 = {0x0000000000000000 0x0000000000000000}
      bnd3 = {0x0000000000000000 0x0000000000000000}

unknown:
2 registers were unavailable.
"""

Also looking at the packets exchanged between the client and server:
"""
...
history[308] tid=0x7338 <  19> send packet: $qRegisterInfo4a#d7
history[309] tid=0x7338 < 130> read packet:
$name:bnd0;bitsize:128;offset:1032;encoding:vector;format:vector-uint64;set:Memory
Protection Extensions;ehframe:101;dwarf:101;#48
history[310] tid=0x7338 <  19> send packet: $qRegisterInfo4b#d8
history[311] tid=0x7338 < 130> read packet:
$name:bnd1;bitsize:128;offset:1048;encoding:vector;format:vector-uint64;set:Memory
Protection Extensions;ehframe:102;dwarf:102;#52
history[312] tid=0x7338 <  19> send packet: $qRegisterInfo4c#d9
history[313] tid=0x7338 < 130> read packet:
$name:bnd2;bitsize:128;offset:1064;encoding:vector;format:vector-uint64;set:Memory
Protection Extensions;ehframe:103;dwarf:103;#53
history[314] tid=0x7338 <  19> send packet: $qRegisterInfo4d#da
history[315] tid=0x7338 < 130> read packet:
$name:bnd3;bitsize:128;offset:1080;encoding:vector;format:vector-uint64;set:Memory
Protection Extensions;ehframe:104;dwarf:104;#54
history[316] tid=0x7338 <  19> send packet: $qRegisterInfo4e#db
history[317] tid=0x7338 <  76> read packet:
$name:bndcfgu;bitsize:64;offset:1096;encoding:vector;format:vector-uint8;#99
history[318] tid=0x7338 <  19> send packet: $qRegisterInfo4f#dc
history[319] tid=0x7338 <  78> read packet:
$name:bndstatus;bitsize:64;offset:1104;encoding:vector;format:vector-uint8;#8e
...
"""

The bndcfgu and bndstatus registers don't have the 'Memory Protections
Extension' set. I looked at the code and it seems that that is set
correctly.

So I'm not sure what's the problem or where does it come from.

Also there is a second failure related to something like this in the
tests:
"""
registerSet.GetName().lower()
"""

For some reason the registerSet.GetName() returns None.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@280703 91177308-0d34-0410-b5e6-96231b3b80d8
@karwa
Copy link
Author

karwa commented Oct 9, 2016

@tfiala What happened to this? Did it get lost in a merge? Not in master

@tfiala
Copy link
Contributor

tfiala commented Oct 10, 2016

@llvm-beanz, did we lose this as part of your CMake enhancements, or did this happen as a casualty of a merge?

@llvm-beanz
Copy link
Contributor

I can’t find any indication this was ever on trunk. It certainly wasn’t there before my patch merged in.

-Chris

On Oct 10, 2016, at 11:15 AM, Todd Fiala [email protected] wrote:

@llvm-beanz https://github.com/llvm-beanz, did we lose this as part of your CMake enhancements, or did this happen as a casualty of a merge?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #48 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/APDq137KWgxGAsvvOzpCVd6xRISfKbtMks5qyoDbgaJpZM4Jx9h6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants