[swift-dev] More Swift 3 Raspberry Pi 2 build problems

Eric Wing ewmailing at gmail.com
Mon Sep 19 09:18:32 CDT 2016


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.
==================

+ 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
[146/146] Link:
../build/buildbot_linux/fo...on-linux-armv7/Foundation/libFoundation.so
+ popd
~/Source/SWIFT/swift
xctest: using gold linker
+ /home/pi/Source/SWIFT/swift-corelibs-xctest/build_script.py
--swiftc=/home/pi/Source/SWIFT/build/buildbot_linux/swift-linux-armv7/bin/swiftc
--build-dir=/home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7
--foundation-build-dir=/home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation
--libdispatch-src-dir=/home/pi/Source/SWIFT/swift-corelibs-libdispatch
--libdispatch-build-dir=/home/pi/Source/SWIFT/build/buildbot_linux/libdispatch-linux-armv7
--release
xctest-build: mkdir -p
/home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7
xctest-build: /home/pi/Source/SWIFT/build/buildbot_linux/swift-linux-armv7/bin/swiftc
-Xcc -fblocks -c -O -emit-object -emit-module -module-name XCTest
-module-link-name XCTest -parse-as-library -emit-module-path
/home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7/XCTest.swiftmodule
-force-single-frontend-invocation -I
/home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation
-I /home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation/usr/lib/swift
-I /home/pi/Source/SWIFT/build/buildbot_linux/libdispatch-linux-armv7/src
-I /home/pi/Source/SWIFT/swift-corelibs-libdispatch
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/TestListing.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/ObjectWrapper.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCaseSuite.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/XCPredicateExpectation.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/XCTestInternalObservation.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/TestFiltering.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/PrintObserver.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/PerformanceMeter.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/WallClockTimeMetric.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Private/ArgumentParser.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTAssert.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestSuite.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCaseRun.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCNotificationExpectationHandler.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCase+Performance.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestObservation.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestObservationCenter.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestRun.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCase+Asynchronous.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCPredicateExpectationHandler.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCase.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestSuiteRun.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestErrors.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestExpectation.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCWaitCompletionHandler.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCTestMain.swift
/home/pi/Source/SWIFT/swift-corelibs-xctest/Sources/XCTest/Public/XCAbstractTest.swift
-o /home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7/XCTest.o
xctest-build: /home/pi/Source/SWIFT/build/buildbot_linux/swift-linux-armv7/bin/swiftc
-emit-library /home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7/XCTest.o
-L /home/pi/Source/SWIFT/build/buildbot_linux/foundation-linux-armv7/Foundation
-lswiftGlibc -lswiftCore -lFoundation -lm -Xlinker -rpath=\$ORIGIN -o
/home/pi/Source/SWIFT/build/buildbot_linux/xctest-linux-armv7/libXCTest.so
xctest-build: Done.
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
--xctest=/home/pi/Source/SWIFT/build/buildbot_linux/xctest-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
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting
==================



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.)

==================


- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/LanguageCategory.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/StringPrinter.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/TypeCategory.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/VectorIterator.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/TypeFormat.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/FormatManager.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/FormattersContainer.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/CXXFunctionPointer.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/DataVisualization.h
-- Installing: /home/pi/swift/usr/include/lldb/DataFormatters/DumpValueObjectOptions.h
CMake Error at scripts/cmake_install.cmake:36 (file):
  file INSTALL cannot find
  "/home/pi/Source/SWIFT/build/buildbot_linux/lldb-linux-armv7/lib/python2.7".
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)


FAILED: cd /home/pi/Source/SWIFT/build/buildbot_linux/lldb-linux-armv7
&& /home/pi/usr/local/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero
exit status 1, aborting

==================



I would appreciate any guidance on these.

Thanks,
Eric


More information about the swift-dev mailing list