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

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

Closed
jyn514 opened this issue Dec 27, 2021 · 4 comments · Fixed by #93487
Closed

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

jyn514 opened this issue Dec 27, 2021 · 4 comments · Fixed by #93487
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 27, 2021

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.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Dec 27, 2021
@Sl1mb0
Copy link
Contributor

Sl1mb0 commented Dec 27, 2021

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

@yerke
Copy link
Contributor

yerke commented Jan 26, 2022

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
Copy link
Contributor

yerke commented Jan 26, 2022

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
Copy link
Contributor

yerke commented Jan 26, 2022

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 6, 2022
…etup, r=Mark-Simulacrum

Fix linking stage1 toolchain in `./x.py setup`

Closes [92319](rust-lang#92319)

Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by `@Sl1mb0.`

We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497).

cc `@jyn514` and `@Mark-Simulacrum` as they were active in rust-lang#89206
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 7, 2022
…etup, r=Mark-Simulacrum

Fix linking stage1 toolchain in `./x.py setup`

Closes [92319](rust-lang#92319)

Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ``@Sl1mb0.``

We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497).

cc ``@jyn514`` and ``@Mark-Simulacrum`` as they were active in rust-lang#89206
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 7, 2022
…etup, r=Mark-Simulacrum

Fix linking stage1 toolchain in `./x.py setup`

Closes [92319](rust-lang#92319)

Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ```@Sl1mb0.```

We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497).

cc ```@jyn514``` and ```@Mark-Simulacrum``` as they were active in rust-lang#89206
m-ou-se added a commit to m-ou-se/rust that referenced this issue Feb 7, 2022
…etup, r=Mark-Simulacrum

Fix linking stage1 toolchain in `./x.py setup`

Closes [92319](rust-lang#92319)

Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ````@Sl1mb0.````

We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497).

cc ````@jyn514```` and ````@Mark-Simulacrum```` as they were active in rust-lang#89206
m-ou-se added a commit to m-ou-se/rust that referenced this issue Feb 7, 2022
…etup, r=Mark-Simulacrum

Fix linking stage1 toolchain in `./x.py setup`

Closes [92319](rust-lang#92319)

Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by `````@Sl1mb0.`````

We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497).

cc `````@jyn514````` and `````@Mark-Simulacrum````` as they were active in rust-lang#89206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants