-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Fix bootstrap.py uname error #113616
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
Fix bootstrap.py uname error #113616
Conversation
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @albertlarsan68 (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
Thanks for the PR! |
Fix bootstrap.py uname error
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
The error I got:
```
❯ ./x check
Traceback (most recent call last):
File "/data1/edgar/rust/x.py", line 50, in <module>
bootstrap.main()
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1113, in main
bootstrap(args)
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1070, in bootstrap
build = RustBuild(config_toml, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 505, in __init__
self.build = args.build or self.build_triple()
^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 976, in build_triple
return config or default_build_triple(self.verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 259, in default_build_triple
kernel, cputype, processor = uname.decode(default_encoding).split()
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
```
This is because
```
❯ uname -smp
Linux x86_64 AMD Ryzen 7 5800X 8-Core Processor
```
Returns more than 3 space separated words.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#113353 (Implement selection for `Unsize` for better coercion behavior) - rust-lang#113553 (Make Placeholder, GeneratorWitness*, Infer and Error unreachable on SMIR rustc_ty_to_ty) - rust-lang#113598 (Update cargo) - rust-lang#113603 (Test simd-wide-sum for codegen error) - rust-lang#113613 (Allow to have `-` in rustdoc-json test file name) - rust-lang#113615 (llvm-wrapper: adapt for LLVM API change) - rust-lang#113616 (Fix bootstrap.py uname error) r? `@ghost` `@rustbot` modify labels: rollup
The x.py script fails with
ValueError: too many values to unpack (expected 3)when uname -smp gives more than 3 wordsThe error I got:
This is because
Returns more than 3 space separated words.