Skip to content
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

Commonize uname -m results for aarch64 in docker runner #127828

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 16, 2024

uname -m on Linux reports aarch64, but on MacOS reports arm64. Commonize this to aarch64.

With this fix, it is now possible to run aarch64 CI docker images on Arm MacOS.

@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 16, 2024
@tgross35
Copy link
Contributor Author

Unfortunately this doesn't cover everything because it gives archive failures building with ../x :/ but at least it's a step above never finding any docker images.

@ehuss
Copy link
Contributor

ehuss commented Jul 17, 2024

FWIW, I had the same change in a local branch that I just didn't get around to pushing. It worked for me with the aarch64-gnu image.

@tgross35
Copy link
Contributor Author

tgross35 commented Jul 17, 2024

Thanks for confirming, great to know at least this bit works. Launching the aarch linux image with ./src/ci/docker/run.sh aarch64-gnu --dev worked for me with this change, but ../x t --stage 1 library/core library/std kept giving me failures to build the archive.

Didn't look into it too much since the message was pretty useless, hence #127830. I also didn't try running the full dist build since I might as well just use try jobs for that.

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to r=me with/without the nit suggestion

Comment on lines 30 to 34
machine="$(uname -m)"
if [ "$machine" = "arm64" ]; then
# MacOS reports "arm64" while Linux reports "aarch64". Commonize this.
machine="aarch64"
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
machine="$(uname -m)"
if [ "$machine" = "arm64" ]; then
# MacOS reports "arm64" while Linux reports "aarch64". Commonize this.
machine="aarch64"
fi
# MacOS reports "arm64" while Linux reports "aarch64". Commonize this.
machine="$(uname -m | sed 's/arm64/aarch64/')"

Copy link
Contributor Author

@tgross35 tgross35 Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied and double checked it works, thanks!

`uname -m` on Linux reports `aarch64`, but on MacOS reports `arm64`.
Commonize this to `aarch64`.

With this fix, it is now possible to run aarch64 CI docker images on Arm
MacOS.
@tgross35
Copy link
Contributor Author

@bors r=onur-ozkan rollup

@bors
Copy link
Contributor

bors commented Jul 17, 2024

📌 Commit f3f0b57 has been approved by onur-ozkan

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 17, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 17, 2024
…nur-ozkan

Commonize `uname -m` results for `aarch64` in docker runner

`uname -m` on Linux reports `aarch64`, but on MacOS reports `arm64`. Commonize this to `aarch64`.

With this fix, it is now possible to run aarch64 CI docker images on Arm MacOS.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127542 ([`macro_metavar_expr_concat`] Add support for literals)
 - rust-lang#127652 (Unignore cg_gcc fmt)
 - rust-lang#127664 (Fix precise capturing suggestion for hidden regions when we have APITs)
 - rust-lang#127806 (Some parser improvements)
 - rust-lang#127828 (Commonize `uname -m` results for `aarch64` in docker runner)
 - rust-lang#127845 (unix: break `stack_overflow::install_main_guard` into smaller fn)
 - rust-lang#127854 (Add internal lint for detecting non-glob imports of `rustc_type_ir::inherent`)
 - rust-lang#127861 (Document the column numbers for the dbg! macro)
 - rust-lang#127875 (style-guide: Clarify version-sorting)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#127542 ([`macro_metavar_expr_concat`] Add support for literals)
 - rust-lang#127652 (Unignore cg_gcc fmt)
 - rust-lang#127664 (Fix precise capturing suggestion for hidden regions when we have APITs)
 - rust-lang#127806 (Some parser improvements)
 - rust-lang#127828 (Commonize `uname -m` results for `aarch64` in docker runner)
 - rust-lang#127845 (unix: break `stack_overflow::install_main_guard` into smaller fn)
 - rust-lang#127859 (ptr::metadata: avoid references to extern types)
 - rust-lang#127861 (Document the column numbers for the dbg! macro)
 - rust-lang#127875 (style-guide: Clarify version-sorting)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d76ec07 into rust-lang:master Jul 18, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 18, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2024
Rollup merge of rust-lang#127828 - tgross35:docker-aarch64-uname, r=onur-ozkan

Commonize `uname -m` results for `aarch64` in docker runner

`uname -m` on Linux reports `aarch64`, but on MacOS reports `arm64`. Commonize this to `aarch64`.

With this fix, it is now possible to run aarch64 CI docker images on Arm MacOS.
@tgross35 tgross35 deleted the docker-aarch64-uname branch July 18, 2024 06:14
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.

5 participants