New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-9808] Building Apple Swift on ppc64le for ubuntu 16.04 #52228
Comments
@compnerd, I know PowerPC64LE isn't one of our supported platforms yet (though Sarvesh is making progress on it!), but does this ICU-related error look familiar? |
Comment by Sarvesh Tamba (JIRA) Exported LD_LIBRARY_PATH to reflect the path containing libicui18nswift.so.61. It worked after this change. However I am facing the below problem:- Out of the 109 remaining lldb related test failures I am seeing the following kind of errors for 107 tests. On careful observation I found that the --arch parameter passed to the dotest.py is empty. i.e. "Command invoked: /root/swift-source/lldb/test/dotest.py -q --arch= -s /root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-traces". Is this expected or this could be causing issues? Detailed error is as below(seen for 107/109 failures):- ******************** TEST 'lldb-Suite :: lang/swift/archetype_resolution_subclass/TestArchetypeResolutionSubclass.py' FAILED ******************** lldb version 7.0.0 (https://github.com/apple/swift-lldb.git revision a6ad475f9ee5558baf6baf49e2be7b77ff46df5f) Session logs for test failures/errors/unexpected successes will go into directory '/root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-traces' runCmd: settings set symbols.enable-external-lookup false os command: make VPATH=/root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass -C /root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/archetype_resolution_subclass/lldbsuite.test.lldbtest.test_dwarf -I /root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass -f /root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass/Makefile MAKE_DSYM=NO ARCH=ppc64le CC=/root/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/bin/clang-7 SWIFTC=/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/bin/swiftc Compiling /root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass/main.swift/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/bin/swift -frontend -c -primary-file /root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass/main.swift Merging swift modules for a/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/bin/swift -frontend -g -Onone -serialize-debugging-options -module-cache-path /root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/module-cache-clang -sdk / -enable-anonymous-context-mangled-names -merge-modules Wrapping swift module/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/bin/swift -modulewrap a.swiftmodule -o /root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/archetype_resolution_subclass/lldbsuite.test.lldbtest.test_dwarf/a.swiftmodule.o Linking a.out/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/bin/swiftc a.swiftmodule.o main.o -Onone -Xfrontend -serialize-debugging-options -module-cache-path /root/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/module-cache-clang -sdk "/" -o "a.out" stderr: /root/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/archetype_resolution_subclass/main.swift:11:1: warning: result of call to 'f' is unused retcode: 0 FAIL: LLDB (/root/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/bin/clang-7-ppc64le) :: test_dwarf (lldbsuite.test.lldbtest.TestArchetypeResolutionSubclass) UNSUPPORTED: LLDB (/root/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/bin/clang-7-ppc64le) :: test_dwo (lldbsuite.test.lldbtest.TestArchetypeResolutionSubclass) (test case does not fall in any category of interest for this run)
|
Comment by Sarvesh Tamba (JIRA) The following values were traced while debugging in File "/root/swift-source/lldb/packages/Python/lldbsuite/test/lldbinline.py", line 171, in 'do_test', which is involved in the lldb test failures and reports "AssertionError: False is not True : inline test did not hit a single breakpoint" for 51 test failures:- exe:- source_files:- target:- process:- Since the process is in exited state on start up, the intended breakpoints do not get hit in the while loop. Hence the failures are seen. |
Comment by Sarvesh Tamba (JIRA) All failing lldb test cases have the following type of error message:- |
Comment by Sarvesh Tamba (JIRA) After skipping the failing lldb tests, I am able to complete the libdispatch test suite. However, facing the following issues in TestFoundation test suite:- [257/257][100%][91.650s] Running utility command for TestFoundation — Running tests for foundation
+ /usr/bin/cmake --build /root/swift-source/build/buildbot_linux/foundation-linux-powerpc64le – -j8 test [0/1][ 0%][0.000s] Running tests... Test project /root/swift-source/build/buildbot_linux/foundation-linux-powerpc64le Start 1: TestFoundation 1/1 Test #1: TestFoundation ...................***Failed 0.00 sec /root/swift-source/build/buildbot_linux/foundation-linux-powerpc64le/TestFoundation/TestFoundation: error while loading shared libraries: libicui18nswift.so.61: cannot open shared object file: No such file or directory 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.00 sec The following tests FAILED: 1 - TestFoundation (Failed) Errors while running CTest FAILED: CMakeFiles/test.util cd /root/swift-source/build/buildbot_linux/foundation-linux-powerpc64le && /usr/bin/ctest --force-new-ctest-process ninja: build stopped: subcommand failed. Building the standard library for: swift-stdlib-linux-powerpc64le Running Swift tests for: check-swift-all-linux-powerpc64le check-swift-all-optimize-linux-powerpc64le ./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 |
Comment by Sarvesh Tamba (JIRA) 1.) Tried setting ICU_ROOT & DICU_ROOT in "swift/utils/build-script-impl". However faced the same errors as before - "error while loading shared libraries: libicui18nswift.so.61: cannot open shared object file: No such file or directory". Correct me if this is not correct approach to set the two variables. {{ sar@e2641fd15168:~$ /home/sar/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/bin/llvm-readelf -dynamic-table /home/sar/swift-source/build/buildbot_linux/foundation-linux-powerpc64le/TestFoundation/TestFoundation Figured out that the directories mentioned in RUNPATH did not have the required library - libicui18nswift.so.61
However, the /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/powerpc64le has all the required libraries. I tried setting RUNPATH through various files which referenced RUNPATH, but it did not help much. Finally I manually copied the libraries in the directory mentioned in the RUNPATH and it worked. The TestFoundation test suite was executed, though it failed for 4 test cases since I was running as a root user. Running as normal non root user worked and all the test cases for TestFoundation passed successfully:- [256/257][ 99%][98.957s] Generating TestFoundation.dir/TestFoundation
100% tests passed, 0 tests failed out of 1 Total Test time (real) = 53.49 sec
|
Comment by Sarvesh Tamba (JIRA) Used the 'llvm-readelf' utility to find details about the libraries linked with lldb binary and realised that the directories mentioned in RUNPATH might not have the required libraries. Similar to reasons mentioned in my earlier issue "https://forums.swift.org/t/testfoundation-test-suite-failing-while-building-swift-toolchain/20279/6", I manually copied the libraries and it worked. The lldb test suite was executed, though it fails now for only 7 test cases:- |
Comment by Sarvesh Tamba (JIRA) Attached to this issue are the details of the final 7 failing lldb tests. |
Attachment: Download
Environment
PowerPC64LE
Additional Detail from JIRA
md5: d6daecae37985fe752392ca5c9d403d9
Issue Description:
Trying a clean toolchain build on the latest Swift master branch using build-toolchain script. However I am facing the following issue:-
Linking /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/bin/swift-test
Linking /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/bin/swift-run
Linking /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/bin/swift-build
Linking /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/bin/swift-package
— bootstrap: note: building self-hosted 'swift-build': env SWIFT_EXEC=/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/powerpc64le-unknown-linux/release/swiftc SWIFTPM_BUILD_DIR=/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le SWIFTPM_BOOTSTRAP=1 /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/powerpc64le-unknown-linux/release/swift-build-stage1 --disable-sandbox -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/linux -Xswiftc -Xcc -Xswiftc -DSPM_BUILD_IDENT=e49bb01 -Xswiftc -I/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/lib/swift/linux/x86_64 -Xswiftc -Xcc -Xswiftc -F/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/lib/swift/linux/x86_64 -Xswiftc -I/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/lib/swift/linux/x86_64/dispatch -Xlinker -L/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/lib/swift/linux -Xlinker -rpath -Xlinker /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/lib/swift/linux -Xswiftc -I/root/swift-source/build/buildbot_linux/llbuild-linux-powerpc64le/products/llbuildSwift -Xswiftc -I/root/swift-source/llbuild/products/libllbuild/include -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/pm/llbuild -Xlinker -L/root/swift-source/build/buildbot_linux/llbuild-linux-powerpc64le/lib -Xlinker -rpath -Xlinker /root/swift-source/build/buildbot_linux/llbuild-linux-powerpc64le/lib -Xswiftc -enable-testing --configuration release --build-tests
/root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/powerpc64le-unknown-linux/release/swift-build-stage1: error while loading shared libraries: libicui18nswift.so.61: cannot open shared object file: No such file or directory
— bootstrap: error: build failed with exit status 127
Building the standard library for: swift-stdlib-linux-powerpc64le
Running Swift tests for: check-swift-all-linux-powerpc64le check-swift-all-optimize-linux-powerpc64le
./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
The text was updated successfully, but these errors were encountered: