I'm working on a Substrate-based blockchain project and encountering a compilation error when trying to build my node runtime. The error indicates that nightly features are being used while the stable Rust toolchain is active, despite having the nightly toolchain installed.
Error Message::
| |
| help: remove this `mut`
Compiling sc-service v0.10.0-dev (/root/substrate_evm/client/service)
error: failed to run custom build command for `node-5ire-runtime v3.0.0-dev (/root/substrate_evm/bin/node/runtime)`
Caused by:
process didn't exit successfully: `/root/substrate_evm/target/release/build/node-5ire-runtime-15ca950d1b3c40a0/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: RUSTFLAGS="-C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory " SKIP_WASM_BUILD="" "rustup" "run" "nightly" "cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/root/substrate_evm/target/release/wbuild/node-5ire-runtime/Cargo.toml" "--color=always" "--profile" "release"
Using rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
--- stderr
Locking 1 package
Adding node-5ire-runtime-wasm v1.0.0 (/root/substrate_evm/target/release/wbuild/node-5ire-runtime)
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling sp-io v7.0.0 (/root/substrate_evm/primitives/io)
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /root/substrate_evm/primitives/io/src/lib.rs:22:35
|
22 | #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0554`.
error: could not compile `sp-io` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `substrate-test-runtime v2.0.0 (/root/substrate_evm/test-utils/runtime)`
Caused by:
process didn't exit successfully: `/root/substrate_evm/target/release/build/substrate-test-runtime-37116eda0cc2e037/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: RUSTFLAGS="-C link-arg=--export-table -Clink-arg=--export=__heap_base -Clink-arg=-zstack-size=1048576 -C link-arg=--import-memory " SKIP_WASM_BUILD="" "rustup" "run" "nightly" "cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/root/substrate_evm/target/release/wbuild/substrate-test-runtime/Cargo.toml" "--color=always" "--profile" "release"
Using rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
--- stderr
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Locking 1 package
Adding substrate-test-runtime-wasm v1.0.0 (/root/substrate_evm/target/release/wbuild/substrate-test-runtime)
Blocking waiting for file lock on package cache
Compiling sp-io v7.0.0 (/root/substrate_evm/primitives/io)
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /root/substrate_evm/primitives/io/src/lib.rs:22:35
|
22 | #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0554`.
error: could not compile `sp-io` (lib) due to 1 previous error
warning: `sc-client-db` (lib) generated 3 warnings (run `cargo fix --lib -p sc-client-db` to apply 3 suggestions)
Cargo.toml:
[package]
name = "node-5ire-runtime"
version = "3.0.0-dev"
authors = ["Parity Technologies <[email protected]>"]
description = "Substrate node kitchensink runtime."
edition = "2021"
build = "build.rs"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
# third-party dependencies
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
"derive",
"max-encoded-len",
] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
static_assertions = "1.1.0"
log = { version = "0.4.17", default-features = false }
# primitives
sp-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/authority-discovery" }
sp-consensus-babe = { version = "0.10.0-dev", default-features = false, path = "../../../primitives/consensus/babe" }
sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "4.0.0-dev" }
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/inherents" }
node-primitives = { version = "2.0.0", default-features = false, path = "../primitives" }
sp-offchain = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/offchain" }
sp-core = { version = "7.0.0", default-features = false, path = "../../../primitives/core" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }
sp-api = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/api" }
sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/staking" }
sp-session = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/session" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" }
sp-version = { version = "5.0.0", default-features = false, path = "../../../primitives/version" }
sp-io = { version = "7.0.0", default-features = false, path = "../../../primitives/io" }
# frame dependencies
frame-executive = { version = "4.0.0-dev", default-features = false, path = "../../../frame/executive" }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../../frame/benchmarking", optional = true }
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../../frame/support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system" }
frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system/benchmarking", optional = true }
frame-election-provider-support = { version = "4.0.0-dev", default-features = false, path = "../../../frame/election-provider-support" }
frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
frame-try-runtime = { version = "0.10.0-dev", default-features = false, path = "../../../frame/try-runtime", optional = true }
pallet-alliance = { version = "4.0.0-dev", default-features = false, path = "../../../frame/alliance" }
pallet-assets = { version = "4.0.0-dev", default-features = false, path = "../../../frame/assets" }
pallet-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/authority-discovery" }
pallet-authorship = { version = "4.0.0-dev", default-features = false, path = "../../../frame/authorship" }
pallet-babe = { version = "4.0.0-dev", default-features = false, path = "../../../frame/babe" }
pallet-bags-list = { version = "4.0.0-dev", default-features = false, path = "../../../frame/bags-list" }
pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../../../frame/balances" }
pallet-bounties = { version = "4.0.0-dev", default-features = false, path = "../../../frame/bounties" }
pallet-child-bounties = { version = "4.0.0-dev", default-features = false, path = "../../../frame/child-bounties" }
pallet-collective = { version = "4.0.0-dev", default-features = false, path = "../../../frame/collective" }
pallet-contracts = { version = "4.0.0-dev", default-features = false, path = "../../../frame/contracts" }
pallet-contracts-primitives = { version = "7.0.0", default-features = false, path = "../../../frame/contracts/primitives/" }
pallet-conviction-voting = { version = "4.0.0-dev", default-features = false, path = "../../../frame/conviction-voting" }
pallet-democracy = { version = "4.0.0-dev", default-features = false, path = "../../../frame/democracy" }
pallet-election-provider-multi-phase = { version = "4.0.0-dev", default-features = false, path = "../../../frame/election-provider-multi-phase" }
pallet-election-provider-support-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../../frame/election-provider-support/benchmarking", optional = true }
pallet-elections-phragmen = { version = "5.0.0-dev", default-features = false, path = "../../../frame/elections-phragmen" }
pallet-fast-unstake = { version = "4.0.0-dev", default-features = false, path = "../../../frame/fast-unstake" }
pallet-nis = { version = "4.0.0-dev", default-features = false, path = "../../../frame/nis" }
pallet-grandpa = { version = "4.0.0-dev", default-features = false, path = "../../../frame/grandpa" }
pallet-im-online = { version = "4.0.0-dev", default-features = false, path = "../../../frame/im-online" }
pallet-indices = { version = "4.0.0-dev", default-features = false, path = "../../../frame/indices" }
pallet-identity = { version = "4.0.0-dev", default-features = false, path = "../../../frame/identity" }
pallet-lottery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/lottery" }
pallet-membership = { version = "4.0.0-dev", default-features = false, path = "../../../frame/membership" }
pallet-message-queue = { version = "7.0.0-dev", default-features = false, path = "../../../frame/message-queue" }
pallet-mmr = { version = "4.0.0-dev", default-features = false, path = "../../../frame/merkle-mountain-range" }
pallet-multisig = { version = "4.0.0-dev", default-features = false, path = "../../../frame/multisig" }
pallet-nomination-pools = { version = "1.0.0", default-features = false, path = "../../../frame/nomination-pools"}
pallet-nomination-pools-benchmarking = { version = "1.0.0", default-features = false, optional = true, path = "../../../frame/nomination-pools/benchmarking" }
pallet-nomination-pools-runtime-api = { version = "1.0.0-dev", default-features = false, path = "../../../frame/nomination-pools/runtime-api" }
pallet-offences = { version = "4.0.0-dev", default-features = false, path = "../../../frame/offences" }
pallet-offences-benchmarking = { version = "4.0.0-dev", path = "../../../frame/offences/benchmarking", default-features = false, optional = true }
pallet-preimage = { version = "4.0.0-dev", default-features = false, path = "../../../frame/preimage" }
pallet-proxy = { version = "4.0.0-dev", default-features = false, path = "../../../frame/proxy" }
pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, path = "../../../frame/randomness-collective-flip" }
pallet-ranked-collective = { version = "4.0.0-dev", default-features = false, path = "../../../frame/ranked-collective" }
pallet-recovery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/recovery" }
pallet-referenda = { version = "4.0.0-dev", default-features = false, path = "../../../frame/referenda" }
pallet-remark = { version = "4.0.0-dev", default-features = false, path = "../../../frame/remark" }
pallet-root-testing = { version = "1.0.0-dev", default-features = false, path = "../../../frame/root-testing" }
pallet-session = { version = "4.0.0-dev", features = [ "historical" ], path = "../../../frame/session", default-features = false }
pallet-session-benchmarking = { version = "4.0.0-dev", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
pallet-staking = { version = "4.0.0-dev", default-features = false, path = "../../../frame/staking" }
pallet-staking-reward-curve = { version = "4.0.0-dev", default-features = false, path = "../../../frame/staking/reward-curve" }
pallet-state-trie-migration = { version = "4.0.0-dev", default-features = false, path = "../../../frame/state-trie-migration" }
pallet-scheduler = { version = "4.0.0-dev", default-features = false, path = "../../../frame/scheduler" }
pallet-society = { version = "4.0.0-dev", default-features = false, path = "../../../frame/society" }
pallet-sudo = { version = "4.0.0-dev", default-features = false, path = "../../../frame/sudo" }
pallet-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../../frame/timestamp" }
pallet-tips = { version = "4.0.0-dev", default-features = false, path = "../../../frame/tips" }
pallet-treasury = { version = "4.0.0-dev", default-features = false, path = "../../../frame/treasury" }
pallet-utility = { version = "4.0.0-dev", default-features = false, path = "../../../frame/utility" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }
pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
pallet-asset-tx-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/asset-tx-payment/" }
pallet-transaction-storage = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-storage" }
pallet-uniques = { version = "4.0.0-dev", default-features = false, path = "../../../frame/uniques" }
pallet-vesting = { version = "4.0.0-dev", default-features = false, path = "../../../frame/vesting" }
pallet-whitelist = { version = "4.0.0-dev", default-features = false, path = "../../../frame/whitelist" }
# Frontier
fp-rpc = {version="3.0.0-dev", path = "../../../evm-primitives/rpc", default-features = false }
fp-self-contained = {version="1.0.0-dev", path = "../../../evm-primitives/self-contained", default-features = false }
# Frontier FRAME
pallet-base-fee = {version="1.0.0", path = "../../../evm-frame/base-fee", default-features = false }
pallet-dynamic-fee = {version = "4.0.0-dev", path = "../../../evm-frame/dynamic-fee", default-features = false }
pallet-ethereum = {version = "4.0.0-dev", path = "../../../evm-frame/ethereum", default-features = false }
pallet-evm = { version="6.0.0-dev", path = "../../../evm-frame/evm", default-features = false }
pallet-evm-precompile-modexp = {version = "2.0.0-dev", path = "../../../evm-frame/evm/precompile/modexp", default-features = false }
pallet-evm-precompile-sha3fips = {version = "2.0.0-dev", path = "../../../evm-frame/evm/precompile/sha3fips", default-features = false }
pallet-evm-precompile-simple = {version = "2.0.0-dev", path = "../../../evm-frame/evm/precompile/simple", default-features = false }
pallet-hotfix-sufficients = {version = "1.0.0", path = "../../../evm-frame/hotfix-sufficients", default-features = false }
pallet-evm-chain-id = { version = "1.0.0-dev", path = "../../../evm-frame/evm-chain-id", default-features = false }
[build-dependencies]
substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-builder" }
Rust Version: 1.72.0 stable (default) and nightly installed
I've already installed the nightly toolchain and attempted to set it as the default for my project using rustup override set nightly, yet the error persists.
How can i fix this errors?