You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Experiencing problems? Have you tried our Stack Exchange first?
This is not a support question.
Description of bug
Compiling the current main tip (commit 87b1b4728e29f68c6b2bafde7f3d0f4c8af9b302) of the node template results in this error:
Compiling node-template-runtime v4.0.0-dev (/home/werk/Code/substrate-node-template/runtime)
error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/home/werk/Code/substrate-node-template/runtime)`
Caused by:
process didn't exit successfully: `/home/werk/Code/substrate-node-template/target/debug/build/node-template-runtime-5ecf88b7b75beaf9/build-script-build` (exit status: 1)
--- stderr
Cannot compile the WASM runtime: no compatible Rust compiler found!
Install at least Rust 1.68.0 or a recent nightly version.
I am able to successfully compile commit tagged as polkadot-v0.9.40.
I am using rust 1.69 with wasm backend and nighly options enabled.
Steps to reproduce
substrate-node-template> git checkout 87b1b4728e29f68c6b2bafde7f3d0f4c8af9b302
substrate-node-template> cargo c
I got the same error, but the root cause may be different.
The following warnings were emitted during compilation:
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 1 error generated.
error: failed to run custom build command for `secp256k1-sys v0.6.1`
Caused by:
process didn't exit successfully: `/Users/jasl/Workspaces/BlockChain/cybros-network/target/release/wbuild/cybros-primal-runtime/target/release/build/secp256k1-sys-9d0d23adcf50967f/build-script-build` (exit status: 1)
--- stdout
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")
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
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/jasl/Workspaces/BlockChain/cybros-network/target/release/wbuild/cybros-primal-runtime/target/wasm32-unknown-unknown/release/build/secp256k1-sys-1854092b76a525fb/out/wasm/wasm.o" "-c" "wasm/wasm.c"
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=1 error generated.
exit status: 1
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/jasl/Workspaces/BlockChain/cybros-network/target/release/wbuild/cybros-primal-runtime/target/wasm32-unknown-unknown/release/build/secp256k1-sys-1854092b76a525fb/out/wasm/wasm.o" "-c" "wasm/wasm.c" with args "clang" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
warning: build failed, waiting for other jobs to finish...
I know the error. It only occurs on macOS with Xcode bundled LLVM, and the WASM target has C binding crates. Changing to the Homebrew LLVM will solve the problem. It's just annoying.
The problem introduced to node-template from #14452
Activity
deepink-mas commentedon Jun 9, 2023
Some similar reports seem to be made here: #12791
deepink-mas commentedon Jun 9, 2023
In case this failure is related to #13580:
rustc 1.69.0-nightly (84c898d65 2023-04-16) (gentoo)
cargo 1.69.0-nightly
deepink-mas commentedon Jun 9, 2023
Version::extract("cargo 1.69.0-nightly").unwrap(); // panicked at 'called
Option::unwrap()on aNonevalue'deepink-mas commentedon Jun 9, 2023
Since the checking code accepts any nightly a workaround is to: export RUSTC_BOOTSTRAP=1
jasl commentedon Jun 27, 2023
I got the same error, but the root cause may be different.
I know the error. It only occurs on macOS with Xcode bundled LLVM, and the WASM target has C binding crates. Changing to the Homebrew LLVM will solve the problem. It's just annoying.
The problem introduced to node-template from #14452
bkchr commentedon Jun 27, 2023
@jasl yes this is not related and is caused by the pr you linked.
wasm-builder: Make `hash` and `date` optional
wasm-builder: Make `hash` and `date` optional (#14490)
wasm-builder: Make `hash` and `date` optional (paritytech#14490)