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

"Rust WASM toolchain not installed, please install it!" error while building substrate-node-template #32

Closed
taskooh opened this issue Sep 14, 2020 · 11 comments

Comments

@taskooh
Copy link

taskooh commented Sep 14, 2020

When I followed the guide:

https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup

and compiled substrate, I faced the following error.

% cargo build --release
   Compiling node-template-runtime v2.0.0-rc6 (/Users/xf9x/Documents/github/substrate-node-template/runtime)
   Compiling derive_more v0.99.9
   Compiling dyn-clonable-impl v0.9.0
   Compiling thiserror-impl v1.0.20
   Compiling asn1_der_derive v0.1.2
   Compiling libp2p-core-derive v0.20.1
   Compiling scroll_derive v0.10.2
   Compiling strum_macros v0.16.0
error: failed to run custom build command for `node-template-runtime v2.0.0-rc6 (/Users/xf9x/Documents/github/substrate-node-template/runtime)`

Caused by:
  process didn't exit successfully: `/Users/xf9x/Documents/github/substrate-node-template/target/release/build/node-template-runtime-833ee7d7fff70513/build-script-build` (exit code: 1)
  --- stderr
     Compiling wasm-build-runner-impl v1.0.0 (/Users/xf9x/Documents/github/substrate-node-template/target/release/wbuild-runner/node-template-runtime17855005755133324358)
      Finished release [optimized] target(s) in 0.41s
       Running `/Users/xf9x/Documents/github/substrate-node-template/target/release/wbuild-runner/node-template-runtime17855005755133324358/target/x86_64-apple-darwin/release/wasm-build-runner-impl`
  Rust WASM toolchain not installed, please install it!
warning: build failed, waiting for other jobs to finish...
error: build failed

It was working well before I reinstall rustup. But now, it is not working

Environments

OS

macOS Catalina 10.15.6

rust toolchains

% rustup --version
rustup 1.22.1 (b01adbbc3 2020-07-08)
%cargo --version
cargo 1.46.0 (149022b1d 2020-07-17)
% cargo +nightly --version
cargo 1.48.0-nightly (875e01232 2020-09-08)
% rustup target list --toolchain nightly | grep installed
wasm32-unknown-unknown (installed)
x86_64-apple-darwin (installed)
% rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/xf9x/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-apple-darwin

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.46.0 (04488afe3 2020-08-24)
@bkchr bkchr transferred this issue from paritytech/substrate Sep 14, 2020
@danforbes
Copy link

@taskooh
Copy link
Author

taskooh commented Sep 14, 2020

Can you rerun these commands? https://substrate.dev/docs/en/knowledgebase/getting-started/#webassembly-compilation

The result was like this. Not solved.

xf9x@TasknoMacBook-Pro substrate-node-template % rustup update nightly
info: syncing channel updates for 'nightly-x86_64-apple-darwin'

  nightly-x86_64-apple-darwin unchanged - rustc 1.48.0-nightly (7402a3944 2020-09-13)

info: checking for self-updates
xf9x@TasknoMacBook-Pro substrate-node-template % rustup target add wasm32-unknown-unknown --toolchain nightly


info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
xf9x@TasknoMacBook-Pro substrate-node-template % rustup update


info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: checking for self-updates

   stable-x86_64-apple-darwin unchanged - rustc 1.46.0 (04488afe3 2020-08-24)
  nightly-x86_64-apple-darwin unchanged - rustc 1.48.0-nightly (7402a3944 2020-09-13)

info: cleaning up downloads & tmp directories
xf9x@TasknoMacBook-Pro substrate-node-template % cargo build --release
   Compiling node-template-runtime v2.0.0-rc6 (/Users/xf9x/Documents/github/substrate-node-template/runtime)
   Compiling frame-support-procedural-tools-derive v2.0.0-rc6 (https://github.com/paritytech/substrate.git?tag=v2.0.0-rc6#be8bb186)
   Compiling slog_derive v0.2.0
   Compiling async-trait v0.1.38
   Compiling serde v1.0.114
   Compiling pin-project v0.4.23
   Compiling tracing v0.1.19
   Compiling ref-cast v1.0.2
   Compiling rental v0.5.5
   Compiling prost v0.6.1
   Compiling dyn-clonable v0.9.0
   Compiling thiserror v1.0.20
error: failed to run custom build command for `node-template-runtime v2.0.0-rc6 (/Users/xf9x/Documents/github/substrate-node-template/runtime)`

Caused by:
  process didn't exit successfully: `/Users/xf9x/Documents/github/substrate-node-template/target/release/build/node-template-runtime-833ee7d7fff70513/build-script-build` (exit code: 1)
  --- stderr
     Compiling wasm-build-runner-impl v1.0.0 (/Users/xf9x/Documents/github/substrate-node-template/target/release/wbuild-runner/node-template-runtime17855005755133324358)
      Finished release [optimized] target(s) in 0.46s
       Running `/Users/xf9x/Documents/github/substrate-node-template/target/release/wbuild-runner/node-template-runtime17855005755133324358/target/x86_64-apple-darwin/release/wasm-build-runner-impl`
  Rust WASM toolchain not installed, please install it!
warning: build failed, waiting for other jobs to finish...
error: build failed

@danforbes
Copy link

Thank you - unfortunately I do not have access to a Mac so it will be difficult for me to help debug much.

@taskooh
Copy link
Author

taskooh commented Sep 15, 2020

Thank you - unfortunately I do not have access to a Mac so it will be difficult for me to help debug much.

All right, thank you for your help!

@taskooh
Copy link
Author

taskooh commented Sep 15, 2020

Probably this issue is happening only in the latest rustup version. So, I hope you to try on latest rustup (v1.22.1)

@danforbes
Copy link

Yes, that is what I am using. @bkchr did you find that this is an upstream bug in the Rust compiler? Do we know what people need to switch to in order to fix this problem?

~: rustup --version
rustup 1.22.1 (b01adbbc3 2020-07-08)

@danforbes
Copy link

Basti linked this as a related Issue rust-lang/rust#76698

@danforbes
Copy link

Sounds like reverting to nightly-2020-08-23 is a workaround.

@chrisckwong821
Copy link

I encountered similar problem and fixed it by updating rust and target "wasm" to latest nightly build

rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

@PatrickHuang888
Copy link

PatrickHuang888 commented Apr 3, 2023

I encountered similar problem and fixed it by updating rust and target "wasm" to latest nightly build

rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

I have same problem on rust 1.68.2, and ubuntu 22.04. solved it by this. but have problem of "cannot deserialize module: UnknownOpcode(192)" when startup, solved it by downgraded to 1.68.0

@bkchr
Copy link
Member

bkchr commented Apr 3, 2023

cannot deserialize module: UnknownOpcode(192)

Will be fixed by: paritytech/substrate#13804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants