6

I was trying to build the substrate-node-template (https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) for the first time. I am using WSL2 with Ubuntu 22.04 LTS.

I came to the step of cargo build --release and I got the following error:

Compiling tikv-jemalloc-sys v0.4.3+5.2.1-patched.2
error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`

Caused by:
  process didn't exit successfully: `/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-fd6a5adda1344782/build-script-build` (exit status: 101)
  --- stdout
  TARGET=x86_64-unknown-linux-gnu
  HOST=x86_64-unknown-linux-gnu
  NUM_JOBS=16
  OUT_DIR="/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out"     
  BUILD_DIR="/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out/build"
  SRC_DIR="/home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2"
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  CC="cc"
  CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall"
  JEMALLOC_REPO_DIR="jemalloc"
  running: "sh" "/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out/build/configure" "--disable-cxx" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-gnu" "--build=x86_64-unknown-linux-gnu" "--prefix=/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out"

I already tried the solutions proposed https://github.com/gnzlbg/jemallocator/issues/148 and https://blog.csdn.net/weixin_36941283/article/details/124361536 but no luck.

The issue has resulted in me not being able to proceed with the command ./target/release/node-template --dev because it fails and cannot find the directoy /node-template.

Thank you.

P.s first time stack exchange poster, please let me know if my formatting is incorrect.

1 Answer 1

3

Problem compiling substrate node in WSL ( windows )

Following solved the issue.

Was missing wasm32 as installation target.

1
  • 1
    Fixed in the docs now. Thanks for reporting, guthub is best to report errors like this though FYI, to get it fixed 🙏
    – Nuke
    May 31, 2022 at 3:03

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.