Skip to content

Get rid of build-powerpc64le-toolchain.sh #143415

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gelbpunkt
Copy link
Contributor

The dist-powerpc64le-linux-musl runner never actually used the toolchain that the script produced, it instead used the one from crosstool-ng.

The dist-powerpc64le-linux-gnu runner did use it, from what I can tell mainly to get a glibc 2.17 version with ppc64le support backported. Since crosstool-ng has the necessary patches, we can just use crosstool-ng to get an appropriate toolchain. While at it, use kernel 3.10 headers since that's the version documented in platform support for this target.

try-job: dist-powerpc64le-linux-gnu
try-job: dist-powerpc64le-linux-musl

The dist-powerpc64le-linux-musl runner never actually used the toolchain
that the script produced, it instead used the one from crosstool-ng.

The dist-powerpc64le-linux-gnu runner did use it, from what I can tell
mainly to get a glibc 2.17 version with ppc64le support backported.
Since crosstool-ng has the necessary patches, we can just use
crosstool-ng to get an appropriate toolchain. While at it, use kernel
3.10 headers since that's the version documented in platform support for
this target.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

r? @marcoieni

rustbot has assigned @marcoieni.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 4, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jul 4, 2025

@bors2 try

@rust-bors
Copy link

rust-bors bot commented Jul 4, 2025

⌛ Trying commit 12bc409 with merge 3956ef4

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jul 4, 2025
…try>

Get rid of build-powerpc64le-toolchain.sh

The dist-powerpc64le-linux-musl runner never actually used the toolchain that the script produced, it instead used the one from crosstool-ng.

The dist-powerpc64le-linux-gnu runner did use it, from what I can tell mainly to get a glibc 2.17 version with ppc64le support backported. Since crosstool-ng has the necessary patches, we can just use crosstool-ng to get an appropriate toolchain. While at it, use kernel 3.10 headers since that's the version documented in platform support for this target.

try-job: dist-powerpc64le-linux-gnu
try-job: dist-powerpc64le-linux-musl

<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r? <reviewer name>
-->
<!-- homu-ignore:end -->
@rust-bors
Copy link

rust-bors bot commented Jul 4, 2025

☀️ Try build successful (CI)
Build commit: 3956ef4 (3956ef4a164e4d59f20f15356a748e6d9adb6af6, parent: c96a69059ecc618b519da385a6ccd03155aa0237)

@marcoieni
Copy link
Member

Hi, thanks for this PR! It looks like a great cleanup. I'll ask for some help to review it.

The dist-powerpc64le-linux-musl runner never actually used the toolchain that the script produced, it instead used the one from crosstool-ng.

Did you get this from the script? If yes, where?

from what I can tell mainly to get a glibc 2.17 version

How can I double check this?

@Gelbpunkt
Copy link
Contributor Author

Gelbpunkt commented Jul 4, 2025

Did you get this from the script? If yes, where?

The PATH variable points to the crosstool-ng output. I also confirmed it manually by entering the build container and running powerpc64le-unknown-linux-musl-gcc --version and it includes "crosstool-ng". Also, the script's GCC targets glibc, not musl.

How can I double check this?

Not sure what your question is, I got this from reading the script. Glibc 2.17 is the documented baseline of the target.

@cuviper
Copy link
Member

cuviper commented Jul 4, 2025

FWIW, I use a pipeline like this to check the resulting symbol versions:

$ readelf -V librustc_driver-*.so | grep -o 'Name: \S*' | sort -uV
Name: GCC_3.0
Name: GCC_3.3
Name: GCC_3.4.4
Name: GCC_4.2.0
Name: GLIBC_2.17

(and repeat for all binaries, though librustc_driver is big enough that it usually represents everything)

In the CI artifacts from your try build, everything looks good to me except for one:

./rustc/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy
Name: GCC_3.0
Name: GCC_3.3
Name: GCC_3.4
Name: GCC_4.2.0
Name: GLIBC_2.2.5
Name: GLIBC_2.3
Name: GLIBC_2.3.4
Name: GLIBC_2.4
Name: GLIBC_2.6
Name: GLIBC_2.14
Name: GLIBC_2.15
Name: GLIBC_2.16
Name: GLIBC_2.17
Name: GLIBC_2.32
Name: GLIBC_2.33
Name: GLIBC_2.34

... but that appears to be from the x86-64 build host, not for PPC! (probably not a new problem)

$ file ./rustc/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy
./rustc/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=6507171c1208cad17b064ffbff3b348c18680367, for GNU/Linux 3.2.0, not stripped

@Gelbpunkt
Copy link
Contributor Author

Gelbpunkt commented Jul 4, 2025

... but that appears to be from the x86-64 build host, not for PPC! (probably not a new problem)

Yep! Can confirm this on a powerpc64le-unknown-linux-gnu host that installed the toolchain via rustup:

adrian@theta:~$ find ~/.rustup/ -name *objcopy*
/home/adrian/.rustup/toolchains/nightly-powerpc64le-unknown-linux-gnu/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy
adrian@theta:~$ file /home/adrian/.rustup/toolchains/nightly-powerpc64le-unknown-linux-gnu/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy
/home/adrian/.rustup/toolchains/nightly-powerpc64le-unknown-linux-gnu/lib/rustlib/powerpc64le-unknown-linux-gnu/bin/rust-objcopy: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=6507171c1208cad17b064ffbff3b348c18680367, for GNU/Linux 3.2.0, not stripped

This happens on all cross builds, actually. E.g. aarch64-unknown-linux-musl has the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants