You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wasi-root field needs to be in section target.wasm32-wasi, but in config.toml.example it's in target.x86_64-unknown-linux-gnu section. Just enabling wasi-root causes an unhelpful error message.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/bootstrap/compile.rs:193:48
stack backtrace:
0: rust_begin_unwind
at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/panicking.rs:92:14
2: core::panicking::panic
at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/panicking.rs:50:5
3: core::option::Option<T>::unwrap
at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/option.rs:386:21
4: bootstrap::compile::copy_self_contained_objects
at ./src/bootstrap/compile.rs:193:22
5: <bootstrap::compile::Std as bootstrap::builder::Step>::run
at ./src/bootstrap/compile.rs:95:28
6: bootstrap::builder::Builder::ensure
at ./src/bootstrap/builder.rs:1529:23
7: <bootstrap::compile::Std as bootstrap::builder::Step>::make_run
at ./src/bootstrap/compile.rs:51:9
8: bootstrap::builder::StepDescription::maybe_run
at ./src/bootstrap/builder.rs:197:13
9: bootstrap::builder::StepDescription::run
at ./src/bootstrap/builder.rs:238:21
10: bootstrap::builder::Builder::run_step_descriptions
at ./src/bootstrap/builder.rs:587:9
11: bootstrap::builder::Builder::execute_cli
at ./src/bootstrap/builder.rs:579:9
12: bootstrap::Build::build
at ./src/bootstrap/lib.rs:506:17
13: bootstrap::main
at ./src/bootstrap/bin/main.rs:33:5
14: core::ops::function::FnOnce::call_once
at /rustc/05b6023675d77979637b04a350c85903fbf59257/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failed to run: /home/omer/rust/rust/build/bootstrap/debug/bootstrap build --stage 1 library/std
If having a wasm32-wasi section always in the example config file is fine then we could move the section and wasi-root field right before the beginning of next section (e.g. [dist]). So the config.toml.example would look like:
...
[target.wasm32-wasi]
# The root location of the `wasm32-wasi` sysroot.# wasi-root = "..."
[dist]
...
The text was updated successfully, but these errors were encountered:
osa1
changed the title
config.toml: wasi-root field is in a wrong section
config.toml.example: wasi-root field is in a wrong section
Feb 20, 2021
config.toml parsing error improvements
Improve error messages for musl-libdir and wasi-root keys. Previously
the parser would panic with `unwrap()`. Now it prints
Target "wasm32-wasi" does not have a "wasi-root" key
(and similar for the `musl-libdir` field, which is used in target that
use musl)
Also update comments around wasi-root field to make it clear that the
field is only valid in wasm32-wasi target and needs to be moved to a
`[target.wasm32-wasi]` section to be valid.
Fixesrust-lang#82317
---
r? `@Mark-Simulacrum`
The
wasi-root
field needs to be in sectiontarget.wasm32-wasi
, but inconfig.toml.example
it's intarget.x86_64-unknown-linux-gnu
section. Just enablingwasi-root
causes an unhelpful error message.If having a
wasm32-wasi
section always in the example config file is fine then we could move the section andwasi-root
field right before the beginning of next section (e.g.[dist]
). So theconfig.toml.example
would look like:The text was updated successfully, but these errors were encountered: