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

build aarch64-musl host compiler in CI #75751

Closed
wants to merge 1 commit into from

Conversation

alex
Copy link
Member

@alex alex commented Aug 20, 2020

fixes #75721

I've put this together by cargo culting pieces from different Docker files. It's a bit emberassing, because I frankly have no idea if I did this correctly 😬 The docker image builds, but attempting to run it produces various permission errors that I believe are related to my local docker setup by rootless. In short, I'm very sorry for this mess and please review with a critical eye.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 20, 2020
@Mark-Simulacrum
Copy link
Member

r? @pietroalbini

@ehuss
Copy link
Contributor

ehuss commented Aug 21, 2020

I assume the PR title "must" is a typo?

Can you update this line in the docs to add a checkmark in the third column to indicate this target is available as a host target?

`aarch64-unknown-linux-musl` | ✓ | | ARM64 Linux with MUSL

(FWIW, I ran the docker image, and it failed with Host compiler must support std::atomic! when building LLVM for aarch64-unknown-linux-musl)

@alex alex changed the title build aarch64-must host compiler in CI build aarch64-musl host compiler in CI Aug 21, 2020
@alex
Copy link
Member Author

alex commented Aug 21, 2020

Sigh. Yes, it's a typo. It's a good thing my job doesn't require a lot of typing, I'm quite bad at it.

@alex alex force-pushed the aarch64-musl-host-ci branch from 51dec79 to 1d3006c Compare August 21, 2020 00:07
@alex alex force-pushed the aarch64-musl-host-ci branch from 1d3006c to 7c152e7 Compare August 21, 2020 00:07
@alex
Copy link
Member Author

alex commented Aug 21, 2020

I've updated the docs.

As for the compilation error. #63623 mentions that same error, but doesn't quite find the underlying cause. My inclination is that it likely means the version of GCC being used to build LLVM is too old -- likely since the base docker image is Ubuntu 16.04 and I'm sure aarch64 has improved a lot since then. Is bumping the base container a reasonable thing?

@ehuss
Copy link
Contributor

ehuss commented Aug 21, 2020

I don't really know much about it. One thing I don't understand is the difference between musl-toolchain.sh (which is used for the x86_64-unknown-linux-musl host builder and builds gcc 9.2.0) and musl.sh (which uses the system gcc of 5.4.0). They seem to create the musl root in completely different ways.

@mati865
Copy link
Contributor

mati865 commented Aug 21, 2020

They seem to create the musl root in completely different ways.

Thats true.
musl.sh takes system GCC and instructs it to use musl as C library. Obviously musl C++ is missing in this case so it's only able to compile and link C code.
musl-toolchain.sh prepares full GCC toolchain that can build and link C++ code and has kernel headers.

@pietroalbini
Copy link
Member

pietroalbini commented Aug 21, 2020

Since this moves AArch64 MUSL from Cross-compilation Tier 2 to Development Platform Tier 2, cc @rust-lang/compiler

@rustbot modify labels: S-waiting-on-team -S-waiting-on-review

@rustbot rustbot added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2020
@spastorino spastorino added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Aug 26, 2020
@pietroalbini pietroalbini added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 7, 2020
@spastorino
Copy link
Member

@alex
Copy link
Member Author

alex commented Sep 10, 2020

@ehuss @pietroalbini I think the PR that was closed in favor of this might actually be more complete/better/more functional. I guess I got here first, but I'm very happy to hand it over to @Gelbpunkt unless there's something I missed :-)

@pnkfelix
Copy link
Member

This was discussed today as part of the compiler weekly meeting

More specifically, I think the T-compiler team was generally in favor of landing this.

So I'm removing S-waiting-on-team.

(One thing I do not know is whether T-infra has discussed this. Cc @rust-lang/infra )

@pnkfelix pnkfelix added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Sep 11, 2020
@pietroalbini
Copy link
Member

At @alex's request, closing this in favor of #76420!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

Provide pre-build host compiler for aarch64-unknown-linux-musl
9 participants