When I am trying to build substrate node-template, cargo build
below error occurs. How to solve this issue.
system : Apple M1 Pro
OSX : Ventura 13.2.1
rustup show
installed toolchains
--------------------
stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin
installed targets for active toolchain
--------------------------------------
wasm32-unknown-unknown
x86_64-apple-darwin
active toolchain
----------------
nightly-x86_64-apple-darwin (overridden by +toolchain on the command line)
rustc 1.70.0-nightly (f63ccaf25 2023-03-06)
error: cannot find macro `thread_local` in this scope
--> /Users/xxxxx/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/primitives/externalities/src/scope_limited.rs:22:1
|
22 | environmental::environmental!(ext: trait Externalities);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
= note: this error originates in the macro `$crate::thread_local_impl` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `GLOBAL` in this scope
--> /Users/xxxxxxx/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/primitives/externalities/src/scope_limited.rs:22:1
|
22 | environmental::environmental!(ext: trait Externalities);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro `$crate::environmental` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0425`.
error: could not compile `sp-externalities` due to 4 previous errors