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-8921] Building Apple Swift on ppc64le for ubuntu 16.04 #51427
Comments
cc @mikeash |
Comment by Sarvesh Tamba (JIRA) I tried to build Swift 4.2 in debug mode. I applied the patch mentioned in "#16425" for "stdlib/public/SwiftShims/System.h" as well. However, I am facing similar issues as reported above in "https://bugs.swift.org/browse/SR-7441" :- — bootstrap: note: building runtime v4 target: PackageDescription4: |
Comment by Sarvesh Tamba (JIRA) Hi Team, any insights on the above errors? |
Comment by Sarvesh Tamba (JIRA) On closer investigation, realised that the string implemetation has changed in Swift 4.2 from that in Swift 4.1 to a large extent. In the StringGuts.swift file there are comments such as "// FIXME: what about ppc64 and s390x?" indicating that the support for PowerPC(ppc64) might still be incomplete. Can we confirm that the new string implementation in Swift 4.2 has complete support for PowerPC(ppc64)? |
Comment by Sarvesh Tamba (JIRA) Built and verified Swift 5.0 master on PowerPC(powerpc64le). I was able to run all the samples given in swift.org/getting-started which confirms that 'swiftc'(Swift compiler), REPL environment and LLDB debugger are working correctly. Also package manager seems to work fine. Built a sample package using the ported Swift 5.0 binaries. More details in this bugs.swift.org/browse/SR-7441 |
1 similar comment
Comment by Sarvesh Tamba (JIRA) Built and verified Swift 5.0 master on PowerPC(powerpc64le). I was able to run all the samples given in swift.org/getting-started which confirms that 'swiftc'(Swift compiler), REPL environment and LLDB debugger are working correctly. Also package manager seems to work fine. Built a sample package using the ported Swift 5.0 binaries. More details in this bugs.swift.org/browse/SR-7441 |
Comment by Sarvesh Tamba (JIRA) Trying a clean build on the latest swift master branch. However I am facing the following issue:- Linking /root/swift-source/build/buildbot_linux/swiftpm-linux-powerpc64le/.bootstrap/bin/swift-test This was working fine as recently as yesterday, only failing during testing step at the lldb-suite related test suite. @belkadan Has anything changed in the code base recently which could be relating to this error? |
Comment by Sarvesh Tamba (JIRA) Realized this SR is closed. Opened a new one - SR-9808. |
Additional Detail from JIRA
md5: 19db618eaac80631729b1df346261283
Issue Description:
Hi,
We are trying to build Apple Swift on ppc64le Ubuntu16.04. We built it on ppc64le using a build script at the following link:-
https://github.com/ppc64le/build-scripts/blob/60b7885f4f0915a8671b3cfb86ddbb65f9b988a8/swift/swift41_ubuntu_16.04.sh
With this we were able to run the 'swiftc' and REPL environment for some basic "Hello World" type of code. However for complex codes, like import Foundation, it fails(probably due to Package manager issues). When we use "import Foundation" with swift, compile error occurs as below is seen:
(swift) import Foundation <REPL Input>:1:8: error: no such module 'Foundation' import Foundation ^
We are trying to build Swift 4.2(since Swift v4.1 has been released now and no further development is happening on this branch.) on Power8/LE (ppc64le) using the build-toolchain, in order to build the Swift package manager and other tools.
We are seeing a crash which is traceable till following function in HeapObject.cpp file:
static HeapObject *swift_retain(HeapObject *object) { SWIFT_RT_TRACK_INVOCATION(object, swift_retain); if (isValidPointerForNativeRetain(object)) object->refCounts.increment(1); return object; }
Beyond this debugging using simple print statements is tricky and the code flow is unclear. Breakpoints cannot be set since building code in debug mode is not possible as it runs out of resources and hangs.
Any help here would be greatly appreciated. Any more outputs, errors can be shared.
Looking forward to port Apple Swift on Ubuntu16.04.
Regards,
Sarvesh Tamba
The text was updated successfully, but these errors were encountered: