Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Does not build with latest rust #7287

Closed
ethernomad opened this issue Oct 9, 2020 · 15 comments
Closed

Does not build with latest rust #7287

ethernomad opened this issue Oct 9, 2020 · 15 comments
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@ethernomad
Copy link
Contributor

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
  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`
@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Oct 9, 2020
@bkchr
Copy link
Member

bkchr commented Oct 9, 2020

Rustc issue: rust-lang/rust#77653

@bkchr bkchr closed this as completed Oct 9, 2020
@bkchr
Copy link
Member

bkchr commented Oct 9, 2020

You need to downgrade your nightly compiler.

@HaoyangLiu
Copy link

@bkchr Downgrade to what version? Thanks

@bkchr
Copy link
Member

bkchr commented Oct 16, 2020

@HaoyangLiu use some version around the first of october.

@kafcioo
Copy link

kafcioo commented Oct 20, 2020

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

@shawntabrizi
Copy link
Member

@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

@kafcioo
Copy link

kafcioo commented Oct 20, 2020

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

@shawntabrizi
Copy link
Member

@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

@kafcioo
Copy link

kafcioo commented Oct 20, 2020

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

@shirshak55
Copy link

that issue should be fixed in today nightly 👍🏼

@xovrlabs
Copy link

Still not fixed as of today

@bkchr
Copy link
Member

bkchr commented Nov 10, 2020

@soulshoes what is not fixed?

@stvenyin
Copy link

stvenyin commented Jan 6, 2021

always appear this porblem/
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01/

@Arsca
Copy link

Arsca commented Jan 28, 2021

I have this problem as well. Copy-pasting directly the commands from the tutorial. Hard to check out Polkadot/substrate due to this error.

@songtianyi
Copy link

nightly-x86_64-apple-darwin (default)
rustc 1.52.0-nightly (a15f484b9 2021-02-22)

boom!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

10 participants