mach bootstrap errors out when trying to update rust
Categories
(Firefox Build System :: Bootstrap Configuration, defect, P3)
Tracking
(Not tracked)
People
(Reporter: lth, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
It crashes because 'rustfmt' is not where it expects to find it:
Your version of Rust (1.39.0) is too old.
Found rustup. Will try to upgrade.
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2020-01-30, rust version 1.41.0 (5e1a79984 2020-01-27)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: downloading component 'rust-std' for 'x86_64-linux-android'
info: downloading component 'rust-std' for 'i686-linux-android'
info: downloading component 'rust-std' for 'aarch64-linux-android'
info: downloading component 'rust-std' for 'thumbv7neon-linux-androideabi'
info: downloading component 'rust-std' for 'i686-unknown-linux-gnu'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: removing component 'rust-std' for 'x86_64-linux-android'
info: removing component 'rust-std' for 'i686-linux-android'
info: removing component 'rust-std' for 'aarch64-linux-android'
info: removing component 'rust-std' for 'thumbv7neon-linux-androideabi'
info: removing component 'rust-std' for 'i686-unknown-linux-gnu'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: installing component 'rust-std' for 'x86_64-linux-android'
info: installing component 'rust-std' for 'i686-linux-android'
info: installing component 'rust-std' for 'aarch64-linux-android'
info: installing component 'rust-std' for 'thumbv7neon-linux-androideabi'
info: installing component 'rust-std' for 'i686-unknown-linux-gnu'
info: checking for self-updates
info: downloading self-update
stable-x86_64-unknown-linux-gnu updated - rustc 1.41.0 (5e1a79984 2020-01-27)
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'; did you mean 'rust-std'?
Error running mach:
['bootstrap']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
subprocess.CalledProcessError: Command '['/home/lhansen/.cargo/bin/rustup', 'component', 'add', 'rustfmt']' returned non-zero exit status 1.
File "/home/lhansen/m-c/python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
bootstrapper.bootstrap()
File "/home/lhansen/m-c/python/mozboot/mozboot/bootstrap.py", line 449, in bootstrap
self.instance.ensure_rust_modern()
File "/home/lhansen/m-c/python/mozboot/mozboot/base.py", line 709, in ensure_rust_modern
self.upgrade_rust(rustup)
File "/home/lhansen/m-c/python/mozboot/mozboot/base.py", line 757, in upgrade_rust
subprocess.check_call([rustup, 'component', 'add', 'rustfmt'])
File "/usr/lib64/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
Reporter | ||
Comment 1•5 years ago
|
||
Workaround(?): run mach bootstrap again, it'll see that rust is now recent enough and skip this failing step.
Comment 2•5 years ago
|
||
Mike, bug 1609832 has something to do with this. I wasn't able to reproduce this exact issue locally, though.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
What version of rustup do you have? (rustup --version)
Reporter | ||
Comment 5•5 years ago
|
||
[lhansen@yojimbo ~]$ rustup --version
rustup 1.21.1 (7832b2ebe 2019-12-20)
I'm a little miffed that this bug is marked as a dup of a bug that's marked invalid, when the resolution to the latter appears only to be a workaround. But I guess I can reopen if the problem happens again.
FWIW, nothing around the original problem seems to be fixed after a recent reboot:
[lhansen@yojimbo ~]$ rustfmt
error: 'rustfmt' is not installed for the toolchain 'stable-x86_64-unknown-linux-gnu'
To install, run `rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu`
[lhansen@yojimbo ~]$ rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'; did you mean 'rust-std'?
Comment 6•5 years ago
|
||
I thought the other bug was open. Anyways, this makes no sense. rustfmt is supposed to exist. Running it even gives you a command to run that fails the same way. This would seem to be a rustup bug. Must be some state file in your ~/.rustup in some weird state.
Reporter | ||
Comment 7•5 years ago
|
||
Possibly. Here's .rustup/settings.toml, doesn't look very exciting:
default_host_triple = "x86_64-unknown-linux-gnu"
default_toolchain = "stable"
telemetry = false
version = "12"
[overrides]
The other subdirectories in .rustup, apart from .../rustlib, don't appear to have config files, at least not any that are easily findable.
Description
•