I temporarily hacked around the NSXMLNode.swift integer literal
overflow error I mentioned in the other thread to continue the build.
I hit a few more problems afterwards.
First, there was some kind of segmentation fault. It looks like swift
crashed trying to build libXCTest.so.
I changed the build flags from using the build-bot linux armv7, to
specifying flags so I could skip the XCTest. I then got another crash.
It looks like it is Swift-Build.
~/Source/SWIFT/swift
+ pushd /home/pi/Source/SWIFT/swift-corelibs-foundation
~/Source/SWIFT/swift-corelibs-foundation ~/Source/SWIFT/swift
+ /home/pi/Source/SWIFT/build/buildbot_linux/ninja-build/ninja
[114/114] Link:
../build/buildbot_linux/fo...on-linux-armv7/Foundation/libFoundation.so
+ popd
~/Source/SWIFT/swift
swiftpm: using gold linker
+ /home/pi/Source/SWIFT/swiftpm/Utilities/bootstrap
--swiftc=/home/pi/Source/SWIFT/build/buildbot_linux/swift-linux-armv7/bin/swiftc
--sbt=/home/pi/Source/SWIFT/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
--build=/home/pi/Source/SWIFT/build/buildbot_linux/swiftpm-linux-armv7
--foundation=/home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation
--libdispatch-source-dir=/home/pi/Source/SWIFT/swift-corelibs-libdispatch
--libdispatch-build-dir=/home/pi/Source/SWIFT/build/buildbot_linux/libdispatch-linux-armv7
--- bootstrap: note: building stage1:
/home/pi/Source/SWIFT/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
-f /home/pi/Source/SWIFT/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/build.swift-build
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
--- bootstrap: error: build failed with exit status -11
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting
==================
I skipped the Swift Build stuff. Finally it gets to the packaging
phase, and something in the packaging phase fails. I think it has
something to do with Python 2.7. I checked the directories and I seem
to have a python 3.4 subdirectory that was created in the Swift
package, but the python 2.7 directory it refers to doesn't exist. (My
Pi has the Python 2.7 packages installed. I think 3 is also
installed.)
And here is one more problem I found. I get a compiler assertion
failure on some code that used to work for me in Swift 2.3 on Pi, and
also compiles fine under Xcode 8/Swift 3. I filed a formal radar for
this one.
On Sep 19, 2016, at 7:18 AM, Eric Wing via swift-dev <swift-dev@swift.org> wrote:
I temporarily hacked around the NSXMLNode.swift integer literal
overflow error I mentioned in the other thread to continue the build.
I hit a few more problems afterwards.
First, there was some kind of segmentation fault. It looks like swift
crashed trying to build libXCTest.so.
I changed the build flags from using the build-bot linux armv7, to
specifying flags so I could skip the XCTest. I then got another crash.
It looks like it is Swift-Build.
~/Source/SWIFT/swift
+ pushd /home/pi/Source/SWIFT/swift-corelibs-foundation
~/Source/SWIFT/swift-corelibs-foundation ~/Source/SWIFT/swift
+ /home/pi/Source/SWIFT/build/buildbot_linux/ninja-build/ninja
[114/114] Link:
../build/buildbot_linux/fo...on-linux-armv7/Foundation/libFoundation.so
+ popd
~/Source/SWIFT/swift
swiftpm: using gold linker
+ /home/pi/Source/SWIFT/swiftpm/Utilities/bootstrap
--swiftc=/home/pi/Source/SWIFT/build/buildbot_linux/swift-linux-armv7/bin/swiftc
--sbt=/home/pi/Source/SWIFT/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
--build=/home/pi/Source/SWIFT/build/buildbot_linux/swiftpm-linux-armv7
--foundation=/home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation
--libdispatch-source-dir=/home/pi/Source/SWIFT/swift-corelibs-libdispatch
--libdispatch-build-dir=/home/pi/Source/SWIFT/build/buildbot_linux/libdispatch-linux-armv7
--- bootstrap: note: building stage1:
/home/pi/Source/SWIFT/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
-f /home/pi/Source/SWIFT/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/build.swift-build
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
--- bootstrap: error: build failed with exit status -11
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting
==================
I skipped the Swift Build stuff. Finally it gets to the packaging
phase, and something in the packaging phase fails. I think it has
something to do with Python 2.7. I checked the directories and I seem
to have a python 3.4 subdirectory that was created in the Swift
package, but the python 2.7 directory it refers to doesn't exist. (My
Pi has the Python 2.7 packages installed. I think 3 is also
installed.)
- Yes, that commit is in my tree.
- I used qemu to build Swift itself, however, I'm using Swift to
compile on a real Pi (which is where that assertion is hit).
- I don't think I'm using Swift package manager. That is a direct
invocation using swift -frontend -c
Thanks,
Eric
···
On 9/20/16, william <william@housedillon.com> wrote:
- Yes, that commit is in my tree.
- I used qemu to build Swift itself, however, I'm using Swift to
compile on a real Pi (which is where that assertion is hit).
- I don't think I'm using Swift package manager. That is a direct
invocation using swift -frontend -c
Thanks,
Eric
==================
I thought that swift-build-tool is what is responsible for `swift build`
Sorry for the confusion.
To clarify, the bug SR-2706 was on a real Pi, invoking swift -frontend
-c directly.
The other build failures were part of the normal building Swift from
source, which was on QEMU, which may use Swift package manager. The
source tree does include the commit you asked about.
Thanks,
Eric
···
On 9/20/16, William Dillon <william@housedillon.com> wrote:
On Sep 20, 2016, at 1:01 PM, Eric Wing <ewmailing@gmail.com> wrote:
On 9/20/16, william <william@housedillon.com> wrote:
- Yes, that commit is in my tree.
- I used qemu to build Swift itself, however, I'm using Swift to
compile on a real Pi (which is where that assertion is hit).
- I don't think I'm using Swift package manager. That is a direct
invocation using swift -frontend -c
Thanks,
Eric
Interesting... It's this part of your logs that got me thinking about
that:
--- bootstrap: note: building stage1:
/home/pi/Source/SWIFT/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
-f
/home/pi/Source/SWIFT/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/build.swift-build
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
--- bootstrap: error: build failed with exit status -11
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting
I thought that swift-build-tool is what is responsible for `swift build`
Since you spotted a problem using QEMU, I did a rebuild on a real Pi
2. I think the segfaults during the build went away.
However, I still get the install error about
CMake Error at scripts/cmake_install.cmake:36 (file):
file INSTALL cannot find
"/home/pi/Source/SWIFT/build/Ninja-Release/lldb-linux-armv7/lib/python2.7".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
Removing the --install-lldb flag allows me to skip past this for now.
But when I actually try to use swiftc to compile a test program, I get
an error about swift-autolink-extract:
swiftc -v main.swift
Swift version 3.0-dev (LLVM 1defb1946c, Clang ef0a699416, Swift 870b785219)
Target: armv7--linux-gnueabihf
/home/pi/swift/usr/bin/swift -frontend -c -primary-file main.swift
-target armv7--linux-gnueabihf -disable-objc-interop
-color-diagnostics -module-name main -o /tmp/main-ea93b4.o
swift-autolink-extract /tmp/main-ea93b4.o -o /tmp/main-1ae7d8.autolink
<unknown>:0: error: swift-autolink-extract command failed with exit
code 127 (use -v to see invocation)
I've seen the swift-autolink-extract issue before. For some reason that symlink to swift isn't being made for you. You can try making a new symlink to `swift` and see if that gets you forward.
I'd recommend using the github swift-arm repos, specifically the swift-3.0-branch branch. Checkout by cloning the swift repo, then use ./swift/utils/update-checkout --clone --branch swift-3.0-branch. That's what I'm using currently.
Hope that helps!
- Will
···
On Sep 21, 2016, at 1:09 PM, Eric Wing <ewmailing@gmail.com> wrote:
Since you spotted a problem using QEMU, I did a rebuild on a real Pi
2. I think the segfaults during the build went away.
However, I still get the install error about
CMake Error at scripts/cmake_install.cmake:36 (file):
file INSTALL cannot find
"/home/pi/Source/SWIFT/build/Ninja-Release/lldb-linux-armv7/lib/python2.7".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
Removing the --install-lldb flag allows me to skip past this for now.
But when I actually try to use swiftc to compile a test program, I get
an error about swift-autolink-extract:
swiftc -v main.swift
Swift version 3.0-dev (LLVM 1defb1946c, Clang ef0a699416, Swift 870b785219)
Target: armv7--linux-gnueabihf
/home/pi/swift/usr/bin/swift -frontend -c -primary-file main.swift
-target armv7--linux-gnueabihf -disable-objc-interop
-color-diagnostics -module-name main -o /tmp/main-ea93b4.o
swift-autolink-extract /tmp/main-ea93b4.o -o /tmp/main-1ae7d8.autolink
<unknown>:0: error: swift-autolink-extract command failed with exit
code 127 (use -v to see invocation)
I've seen the swift-autolink-extract issue before. For some reason that
symlink to swift isn't being made for you. You can try making a new symlink
to `swift` and see if that gets you forward.
Thank you. The symlink trick fixed that problem. I can now compile
multiple programs and it works.
Unfortunately, a slightly less trivial program I tried segfaults at
runtime. This program works under Xcode 8 and the official Ubuntu 15
Linux build. I'm hoping that arm branch and patches will clear this
up.
I'd recommend using the github swift-arm repos, specifically the
swift-3.0-branch branch. Checkout by cloning the swift repo, then use
./swift/utils/update-checkout --clone --branch swift-3.0-branch. That's
what I'm using currently.
Hope that helps!
- Will
So I was just going to follow the instructions documented here:
I think it already clones your repos and uses the swift-3.0-branch.
If I use the command you suggest:
./swift/utils/update-checkout --clone --branch swift-3.0-branch
It will try to make all the other repos switch to a branch called
swift-3.0-branch which doesn't exist.
Do you recommend I not follow that guide?
Thanks,
Eric
···
On 9/21/16, William Dillon <william@housedillon.com> wrote:
Well, I finished the full rebuild, but I seemed to have come across a
lot of the same problems again.
(1) First, building everything via the package.sh, I hit some error I
think connected to xctest or maybe swiftpm:
···
========
+ /home/pi/Source/SWIFTARM/package-swift/swiftpm/Utilities/bootstrap
--swiftc=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/swift-linux-armv7/bin/swiftc
--sbt=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool
--build=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/swiftpm-linux-armv7
--foundation=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/foundation-linux-armv7/Foundation
--libdispatch-source-dir=/home/pi/Source/SWIFTARM/package-swift/swift-corelibs-libdispatch
--libdispatch-build-dir=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/libdispatch-linux-armv7
--xctest=/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/xctest-linux-armv7
*** Error in `/home/pi/Source/SWIFTARM/package-swift/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool./swift/utils/build-script:
fatal error: command terminated with a non-zero exit status 1,
aborting
cp: cannot create directory
‘/home/pi/Source/SWIFTARM/package-swift/install/usr/lib/swift’: No
such file or directory
cp: cannot create regular file
‘/home/pi/Source/SWIFTARM/package-swift/install/usr/lib/swift/linux/armv7/’:
No such file or directory
cp: cannot create regular file
‘/home/pi/Source/SWIFTARM/package-swift/install/usr/lib/swift/linux/armv7/’:
No such file or directory
cp: cannot create regular file
‘/home/pi/Source/SWIFTARM/package-swift/install/usr/lib/swift/linux/’:
No such file or directory
cp: cannot create regular file
‘/home/pi/Source/SWIFTARM/package-swift/install/usr/lib/swift/linux’:
No such file or directory
===========
(2) Removing those from the build, I then return to the installing
lldb/python2.7 error I mentioned before.
(3) Finally, removing lldb from the build and using the created Swift
compiler, I can build and run trivial test programs, but I get that
irgen::CallEmission assertion failure on my less trivial programs.
I actually don't need xctest and lldb right now, but this one is a
blocker for me.