Substrate: Does not build with latest rust

Created on 9 Oct 2020  路  12Comments  路  Source: paritytech/substrate

commit a845ff3300489af3acd90c0b77adf5d7addeb6d5 (HEAD -> master, origin/master, origin/HEAD)
Author: Rakan Alhneiti <[email protected]>
Date:   Thu Oct 8 22:56:35 2020 +0200
*** Initializing WASM build environment
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.49.0-nightly (3525087ad 2020-10-08)

info: checking for self-updates
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.47.0 (18bf6b4f0 2020-10-07)

info: checking for self-updates
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
/home/jbrown/.cargo/bin/wasm-gc



md5-c873f091a037298454adf2b9e5eb91fb



  error[E0282]: type annotations needed
      --> /home/jbrown/substrate/primitives/arithmetic/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
      --> /home/jbrown/substrate/primitives/arithmetic/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
      --> /home/jbrown/substrate/primitives/arithmetic/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`
Z0-unconfirmed

Most helpful comment

@kafcioo please follow the instructions i linked to.

it seems you have forgot this step:

rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01

All 12 comments

You need to downgrade your nightly compiler.

@bkchr Downgrade to what version? Thanks

@HaoyangLiu use some version around the first of october.

image
I did what you said but still throws error when trying to build

@kafcioo did you run cargo +nightly-2020-10-01 build?

Or you can follow the instruction here to remove the bad nightly version from your toolchain: https://substrate.dev/docs/en/knowledgebase/getting-started/index#downgrading-rust-nightly

I had to set it to use the version I just installed with like so rustup default nightly-2020-10-01 but now I run into another problem
image
I spend 2 days now trying to compile the code, why is it so difficult, why can't we have simple docker container to run this ...
btw I tried using docker run --rm -it chevdor/polkadot polkadot --dev but its not connecting to frond end

@kafcioo please follow the instructions i linked to.

it seems you have forgot this step:

rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01

yeah sorry, @shawntabrizi I didn't saw your comment before posting the next issue. I can confirm that the link you send fixed it

that issue should be fixed in today nightly 馃憤馃徏

Still not fixed as of today

@soulshoes what is not fixed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thiolliere picture thiolliere  路  3Comments

gregdhill picture gregdhill  路  5Comments

pepyakin picture pepyakin  路  5Comments

athei picture athei  路  4Comments

tomaka picture tomaka  路  4Comments