0

I am getting this error:

Rust WASM toolchain not installed, please install it!

  Further error information:
  ------------------------------------------------------------
     Compiling wasm-test v1.0.0 (/var/folders/cw/dc7mkcsd6yx76lscv6w1hpcw0000gn/T/.tmp3NWr2N)
  error[E0463]: can't find crate for `std`
    |
    = note: the `wasm32-unknown-unknown` target may not be installed
    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`

  error: requires `sized` lang_item

  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page
  error: cannot find macro `println` in this scope
   --> src/main.rs:3:5
    |
  3 |                 println!("{}", env!("RUSTC_VERSION"));
    |                 ^^^^^^^

  For more information about this error, try `rustc --explain E0463`.
  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page
  error: could not compile `wasm-test` (lib) due to 2 previous errors
  warning: build failed, waiting for other jobs to finish...
  error: could not compile `wasm-test` (bin "wasm-test") due to 3 previous errors
  ------------------------------------------------------------

warning: build failed, waiting for other jobs to finish...

I have already installed the target. But still getting the same error.🤔

Any suggestion for fix?

2 Answers 2

0

Some related doc: https://paritytech.github.io/polkadot-sdk/master/substrate_wasm_builder/index.html#prerequisites

Copy pasted for history:

Wasm builder requires the following prerequisites for building the Wasm binary:

  • rust nightly + wasm32-unknown-unknown toolchain

or

  • rust stable and version at least 1.68.0 + wasm32-unknown-unknown toolchain

If a specific rust is installed with rustup, it is important that the wasm target is installed as well. For example if installing the rust from 20.02.2020 using rustup install nightly-2020-02-20, the wasm target needs to be installed as well rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-20

0

I ensured wasm32-unknown-unknown target is installed in my system. But, still it had issues. Then, I just reinstalled rustup. I think something might have messed-up due to switching channels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.