Skip to content

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.

@marcoieni
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 7, 2025

📌 Commit 12bc409 has been approved by marcoieni

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2025
bors added a commit that referenced this pull request Jul 7, 2025
Rollup of 11 pull requests

Successful merges:

 - #143130 (doc(std): clarify `NonZero<T>` usage limitation in doc comment)
 - #143415 (Get rid of build-powerpc64le-toolchain.sh)
 - #143464 (Make tests/ui/abi/debug.rs cross-compile)
 - #143482 (Fix short linker error output)
 - #143524 (Move `stable_mir` back to its own crate)
 - #143528 (interpret: rename StackPopCleanup)
 - #143551 (Dont resolve instance of root in `mir_callgraph_cyclic`)
 - #143558 (mbe: Refactors and function extractions in `compile_declarative_macro`)
 - #143563 (std: fix typo in `std::path`)
 - #143564 (compiler: Deduplicate `must_emit_unwind_tables()` comments)
 - #143577 (Disable download-rustc for library profile)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9c6ef43 into rust-lang:master Jul 7, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 7, 2025
rust-timer added a commit that referenced this pull request Jul 7, 2025
Rollup merge of #143415 - Gelbpunkt:cleanup-dist-ppc64le-toolchain, r=marcoieni

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
github-actions bot pushed a commit to devnexen/miri that referenced this pull request Jul 8, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#143130 (doc(std): clarify `NonZero<T>` usage limitation in doc comment)
 - rust-lang/rust#143415 (Get rid of build-powerpc64le-toolchain.sh)
 - rust-lang/rust#143464 (Make tests/ui/abi/debug.rs cross-compile)
 - rust-lang/rust#143482 (Fix short linker error output)
 - rust-lang/rust#143524 (Move `stable_mir` back to its own crate)
 - rust-lang/rust#143528 (interpret: rename StackPopCleanup)
 - rust-lang/rust#143551 (Dont resolve instance of root in `mir_callgraph_cyclic`)
 - rust-lang/rust#143558 (mbe: Refactors and function extractions in `compile_declarative_macro`)
 - rust-lang/rust#143563 (std: fix typo in `std::path`)
 - rust-lang/rust#143564 (compiler: Deduplicate `must_emit_unwind_tables()` comments)
 - rust-lang/rust#143577 (Disable download-rustc for library profile)

r? `@ghost`
`@rustbot` modify labels: rollup
@shepmaster
Copy link
Member

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

Should be fixed in #145763

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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants