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

Cannot compile the WASM runtime: no standard library sources found! #82

Open
brenzi opened this issue Mar 1, 2024 · 3 comments
Open

Comments

@brenzi
Copy link

brenzi commented Mar 1, 2024

I'm trying to build system chains (using srtool-cli):

git clone https://github.com/encointer/runtimes.git
cd runtimes
git checkout bkontur/bko-bump-to-1.7
srtool build -p encointer-kusama-runtime --runtime-dir system-parachains/encointer/ --root

this results in the following error (here for asset-hub-kusama`)

Found 1.75.0, we will be using docker.io/paritytech/srtool:1.75.0 for the build
🧰 Substrate Runtime Toolbox - srtool v0.14.0 🧰
              - by Chevdor -
info: using existing install for '1.75.0-x86_64-unknown-linux-gnu'
info: override toolchain for '/build' set to '1.75.0-x86_64-unknown-linux-gnu'

  1.75.0-x86_64-unknown-linux-gnu unchanged - rustc 1.75.0 (82e1608df 2023-12-21)

🏗  Building asset-hub-kusama-runtime as release using rustc 1.75.0 (82e1608df 2023-12-21)
⏳ That can take a little while, be patient... subsequent builds may be faster.
   Since you have to wait a little, you may want to learn more about Substrate runtimes:
   https://docs.substrate.io/learn/architecture/

...

error: failed to run custom build command for `asset-hub-kusama-runtime v1.0.0 (/build/system-parachains/asset-hubs/asset-hub-kusama)`

Caused by:
  process didn't exit successfully: `/build/system-parachains/asset-hubs/asset-hub-kusama/target/srtool/release/build/asset-hub-kusama-runtime-6266e5ba4baf865f/build-script-build` (exit status: 1)
  --- stderr
  Cannot compile the WASM runtime: no standard library sources found!
  You can install them with `rustup component add rust-src` if you're using `rustup`.
warning: build failed, waiting for other jobs to finish...

@brenzi
Copy link
Author

brenzi commented Mar 6, 2024

same issue on main now on https://github.com/polkadot-fellows/runtimes

@seadanda
Copy link

seadanda commented Mar 6, 2024

This is an issue with srtool-cli, I have made a workaround for it here: chevdor/srtool-cli#34

I've also just seen that there is also a proper fix upstream in srtool.

@brenzi
Copy link
Author

brenzi commented Mar 7, 2024

Thanks @seadanda, this worked for me:

srtool build -p encointer-kusama-runtime --runtime-dir system-parachains/encointer/ --root --no-wasm-std

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

2 participants