-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrapping rustc for a custom target no longers works since 1.48, assembles stages for build
not host
#81702
Comments
I suspect this is a similar problem to #77352, and the solution of x.py dist / x.py install I recommended there is the one I'd recommend here as well. If that doesn't work for some reason for your case I'd be interested in hearing why. |
@danc86 Just chiming in here to report that I have also been trying to upgrade meta-rust from 1.47.0 to 1.49.0 recently and I'm now stuck at the very same problem. There were a few other obstacles on the road due to moved files and bugs like dd682cb |
Thanks for the pointer @Mark-Simulacrum, it does indeed seem the same as #77352, I didn't find that issue when I was searching. I will try In your comments on that issue, you seem to be suggesting it's just the assembly step which is no longer happening. But if I'm understanding the output I pasted above, it seems like there is a significant change in the bootstrapping behaviour. Previously, stage0 was cross-built |
Yeah, there's potentially some oddity there. It doesn't sound like it's doing what I would expect in your case. That said, I believe the new root behavior is broadly correct (though maybe exposes preexisting internal inaccuracies/bugs). I don't think it should affect dist/install. |
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
Now it seems `./x.py install` is the only way to assemble a fully working stage 2 cross-built compiler. See rust-lang/rust#81702.
This also affected rust 1.47 when we tried to do cross compilation for rustc on Alpine. Using |
Anyone know what's preventing #3349 from being fixed properly? The linker issue this is working around seems to be blocking pyo3 from working on buildroot right now as well. |
I'm working with Yocto's meta-rust layer, trying to build rustc 1.49. I'm building on a regular x86_64 Linux host, but we use a custom JSON target specification due to rust-lang/cargo#3349. So we have
x86_64-unknown-linux-gnu
(real Rust triple) cross-bootstrapping forx86_64-linux
(custom target which is essentially the same asx86_64-unknown-linux-gnu
but with a different name):With rust 1.47,
x.py build --stage 2 src/rustc
gives us the desired bootstrapping behaviour:(Note that it also insisted on building a compiler for the build triple
x86_64-unknown-linux-gnu
as well as the hostx86_64-linux
, which is unnecessary but not harmful. It seems this has been addressed in bootstrap since 1.47.)The end result with 1.47 above is that the
build/x86_64-linux/stage2
directory contains an assembled rustc for the hostx86_64-linux
with libstd forx86_64-linux
(andx86_64-unknown-linux-gnu
).However, with 1.48 and 1.49 the bootstrap behaviour has changed in a way that I still don't grok. When I run
x.py build --stage 2
it seems both stage0 and stage1 are built forx86_64-unknown-linux-gnu
. There is no stage1 built for the hostx86_64-linux
which is what I would expect.As a result, this step:
Uplifting stage1 std (x86_64-unknown-linux-gnu -> x86_64-linux)
doesn't actually do what it says. Thebuild/x86_64-linux/stage2
directory ends up containing a compiler, but its rustlib directory is empty:That step seems to be copying into
build/x86_64-unknown-linux-gnu/stage2
instead.Complete build config and target spec for reference:
config.toml
x86_64-linux.json
The text was updated successfully, but these errors were encountered: