2

Working on substrate-node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro

cargo build --release --features runtime-benchmarks

error: failed to run custom build command for wasmtime-runtime v1.0.2

  Caused by:
    process didn't exit successfully: `/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/release/build/wasmtime-runtime-04bf801e868dc470/build-script-build` (exit status: 1)
    --- stdout
    cargo:rerun-if-changed=src/helpers.c
    TARGET = Some("wasm32-unknown-unknown")
    OPT_LEVEL = Some("3")
    HOST = Some("aarch64-apple-darwin")
    cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
    CC_wasm32-unknown-unknown = None
    cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
    CC_wasm32_unknown_unknown = None
    cargo:rerun-if-env-changed=TARGET_CC
    TARGET_CC = None
    cargo:rerun-if-env-changed=CC
    CC = None
    cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
    CFLAGS_wasm32-unknown-unknown = None
    cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
    CFLAGS_wasm32_unknown_unknown = None
    cargo:rerun-if-env-changed=TARGET_CFLAGS
    TARGET_CFLAGS = None
    cargo:rerun-if-env-changed=CFLAGS
    CFLAGS = None
    cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
    CRATE_CC_NO_DEFAULTS = None
    DEBUG = Some("false")
    running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-Wall" "-Wextra" "-DCFG_TARGET_OS_unknown" "-DCFG_TARGET_ARCH_wasm32" "-o" "/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-b8e432731307a73b/out/src/helpers.o" "-c" "src/helpers.c"
    cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found
    cargo:warning=#include <setjmp.h>
    cargo:warning=         ^~~~~~~~~~
    cargo:warning=1 error generated.
    exit status: 1

    --- stderr

using polkadot polkadot-v0.9.35" After running rustup +nightly show I get the below

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

stable-aarch64-apple-darwin
nightly-2021-11-29-aarch64-apple-darwin
nightly-2022-01-31-aarch64-apple-darwin
nightly-2022-03-10-aarch64-apple-darwin
nightly-2022-08-09-aarch64-apple-darwin
nightly-aarch64-apple-darwin (default)
bpf
sbf
1.65.0-aarch64-apple-darwin
1.66.0-aarch64-apple-darwin

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

aarch64-apple-darwin
thumbv7em-none-eabihf
wasm32-unknown-unknown

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

nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)
rustc 1.70.0-nightly (f63ccaf25 2023-03-06)
6
  • Please include: rustup show and rustup +nightly show
    – Bruno
    Commented Mar 7, 2023 at 19:41
  • I just built the Substrate Node Template (polkadot-v0.9.37) on my Mac M1 using the same command and it worked fine. Please include more info for debugging purposes.
    – Bruno
    Commented Mar 7, 2023 at 19:56
  • @Bruno rustup +nightly show added
    – Neo
    Commented Mar 7, 2023 at 20:16
  • the error occurs when I run cargo build --release --features runtime-benchmarks i.e with the --feature the runtime-benchmarks
    – Neo
    Commented Mar 7, 2023 at 20:19
  • Yes I have it works on my machine with cargo build --release --features runtime-benchmarks. Please also include the rustup show`
    – Bruno
    Commented Mar 7, 2023 at 20:38

0

Your Answer

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

Browse other questions tagged or ask your own question.