Modulus
Modulus

Reputation: 1

Trouble with creating first Substrate chain

When I try to compile the Node Template I get a series of errors.
error: failed to run custom build command for node-template-runtime v2.0.0 (/Users/Modulus3D/VSCode Projects/substrate-node-template/runtime)

Caused by: process didn't exit successfully: /Users/Modulus3D/VSCode Projects/substrate-node-template/target/release/build/node-template-runtime-cae9ad6029c9f681/build-script-build (exit code: 1) --- stdout Executing build command: "rustup" "run" "nightly" "cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/Users/Modulus3D/VSCode Projects/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml" "--color=always" "--release"

and also:

error[E0282]: type annotations needed --> /Users/Modulus3D/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9 | 541 | let accuracy = P::ACCURACY.saturated_into(); | ^^^^^^^^ consider giving accuracy a type ... 1595 | / implement_fixed!( 1596 | | FixedI64, 1597 | | test_fixed_i64, 1598 | | i64, ... | 1601 | | "Fixed Point 64 bits signed, range = [-9223372036.854775808, 9223372036.854775807]", 1602 | | ); | |__- in this macro invocation | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed --> /Users/Modulus3D/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9 | 541 | let accuracy = P::ACCURACY.saturated_into(); | ^^^^^^^^ consider giving accuracy a type ... 1604 | / implement_fixed!( 1605 | | FixedI128, 1606 | | test_fixed_i128, 1607 | | i128, ... | 1611 | | [-170141183460469231731.687303715884105728, 170141183460469231731.687303715884105727]_", 1612 | | ); | |__- in this macro invocation | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed --> /Users/Modulus3D/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9 | 541 | let accuracy = P::ACCURACY.saturated_into(); | ^^^^^^^^ consider giving accuracy a type ... 1614 | / implement_fixed!( 1615 | | FixedU128, 1616 | | test_fixed_u128, 1617 | | u128, ... | 1621 | | [0.000000000000000000, 340282366920938463463.374607431768211455]_", 1622 | | ); | |__- in this macro invocation | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

For more information about this error, try rustc --explain E0282. error: could not compile sp-arithmetic

To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed warning: build failed, waiting for other jobs to finish... error: build failed

Any suggestions on how to resolve these errors??

Upvotes: 0

Views: 1143

Answers (2)

Ayoung
Ayoung

Reputation: 23

Fresh project always facing the efferent nightly versions issue. If you running the substrate version 2.0.0 you can solve it with bellow command:

rustup install nightly-2020-07-02
rustup override set nightly-2020-07-02
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-07-02

then try to re build again!

Upvotes: 0

zeke
zeke

Reputation: 330

Look like you need to downgrade you nightly version.

You can do so by running the following sequence of commands:

rustup install nightly-2020-10-06
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-06
export WASM_BUILD_TOOLCHAIN=nightly-2020-10-06

You can learn more about how nightly is used with substrate here: https://substrate.dev/docs/en/knowledgebase/getting-started/#rust-nightly-toolchain

Upvotes: 1

Related Questions