Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

wasm executor compile error #632

Closed
woodsmur opened this issue Aug 30, 2018 · 0 comments
Closed

wasm executor compile error #632

woodsmur opened this issue Aug 30, 2018 · 0 comments

Comments

@woodsmur
Copy link
Contributor

llvm-tools-preview component should be installed before building substrate wasm executor, otherwise there'll be an error.

vagrant@ubuntu-cosmic:~/substrate$ ./scripts/build.sh
*** Building wasm binaries in substrate/executor/wasm
   Compiling runtime-test v0.1.0 (file:///home/vagrant/substrate/substrate/executor/wasm)
error: linking with `rust-lld` failed: exit code: 127
  |
  = note: "rust-lld" "-flavor" "wasm" "-L" "/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib" "/home/vagrant/substrate/substrate/executor/wasm/target/wasm32-unknown-unknown/release/deps/runtime_test.runtime_test.3yru7t3n-cgu.3.rcgu.o" "-o" "/home/vagrant/substrate/substrate/executor/wasm/target/wasm32-unknown-unknown/release/deps/runtime_test.wasm" "--gc-sections" "-O3" "-L" "/home/vagrant/substrate/substrate/executor/wasm/target/wasm32-unknown-unknown/release/deps" "-L" "/home/vagrant/substrate/substrate/executor/wasm/target/release/deps" "-L" "/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib" "/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-2a5c24d65378adf1.rlib" "--no-threads" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--no-entry" "--export-table"
  = note: rust-lld: error while loading shared libraries: libLLVM-7.so: cannot open shared object file: No such file or directory


error: aborting due to previous error

error: Could not compile `runtime-test`.

To learn more, run the command again with --verbose.

Running rustup component add llvm-tools-preview --toolchain=nightly will fix the compile error.

Here is the PR.

lamafab pushed a commit to lamafab/substrate that referenced this issue Jun 16, 2020
liuchengxu pushed a commit to chainx-org/substrate that referenced this issue Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants