Skip to content

x.py setup stopped being able to link toolchains at some point #92319

Closed
@jyn514

Description

@jyn514
Member

I tried this code on a fresh git clone of rust-lang/rust:

x.py setup library

I expected to see this happen: setup works without errors.

Instead, this happened: x.py gives an error:

Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
`x.py` will now use the configuration at .../rust/src/bootstrap/defaults/config.compiler.toml

`rustup` failed to link stage 1 build to `stage1` toolchain
To manually link stage 1 build to `stage1` toolchain, run:

            `rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1`

Meta

This feature was introduced in #89212 and worked at that time. @Sl1mb0 do you have time to look into this? The original bug report was from Nazar Mokrynskyi on Zulip, not sure their github username.

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
C-bugCategory: This is a bug.
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to Rust
on Dec 27, 2021
Sl1mb0

Sl1mb0 commented on Dec 27, 2021

@Sl1mb0
Contributor

Yes, I'll take a look over the next few days.

yerke

yerke commented on Jan 26, 2022

@yerke
Contributor

Hello. Is there a workaround for this issue for now?
I got

Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
`x.py` will now use the configuration at /Users/yerke/Development/rust/src/bootstrap/defaults/config.compiler.toml

`rustup` failed to link stage 1 build to `stage1` toolchain
To manually link stage 1 build to `stage1` toolchain, run:

            `rustup toolchain link stage1 build/aarch64-apple-darwin/stage1`

But when I ran rustup toolchain link stage1 build/aarch64-apple-darwin/stage1, I got error: not a directory: 'build/aarch64-apple-darwin/stage1/lib'.

yerke

yerke commented on Jan 26, 2022

@yerke
Contributor

OK. After reading the zulip thread, I figured out how to work around it. After running ./x.py build, rustup toolchain link stage1 build/aarch64-apple-darwin/stage1 succeeded.

yerke

yerke commented on Jan 26, 2022

@yerke
Contributor

@rustbot claim

added 3 commits that reference this issue on Feb 6, 2022

Rollup merge of rust-lang#93487 - yerke:yerke/fix-link-toolchain-in-s…

8a25218

Rollup merge of rust-lang#93487 - yerke:yerke/fix-link-toolchain-in-s…

c65834b

Rollup merge of rust-lang#93487 - yerke:yerke/fix-link-toolchain-in-s…

b26068c
added 2 commits that reference this issue on Feb 7, 2022

Rollup merge of rust-lang#93487 - yerke:yerke/fix-link-toolchain-in-s…

6b066f0

Rollup merge of rust-lang#93487 - yerke:yerke/fix-link-toolchain-in-s…

f611de0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @yerke@jyn514@Sl1mb0

    Issue actions

      `x.py setup` stopped being able to link toolchains at some point · Issue #92319 · rust-lang/rust