JoshOrndorff / utxo-workshop

A Substrate UTXO workshop
The Unlicense
117 stars 81 forks source link

error: failed to run custom build command for `utxo-runtime v2.0.0-alpha.5 ` #78

Open athenawisdoms opened 4 years ago

athenawisdoms commented 4 years ago

At around the 15 minute mark of the tutorial video, we were asked to run

cargo check -p utxo-runtime

However, an error occurs half way through the compilation process:

error: failed to run custom build command for `utxo-runtime v2.0.0-alpha.5 (/home/athena/utxo-workshop/runtime)`

Caused by:
  process didn't exit successfully: `/home/athena/utxo-workshop/target/debug/build/utxo-runtime-770daab2e5a3b297/build-script-build` (exit code: 1)
  --- stdout
  Executing build command: "rustup" "run" "nightly" "cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/home/athena/utxo-workshop/target/debug/wbuild/utxo-runtime/Cargo.toml" "--color=always" "--release"

  --- stderr
     Compiling wasm-build-runner-impl v1.0.0 (/home/athena/utxo-workshop/target/debug/wbuild-runner/utxo-runtime13178774267024377957)
      Finished dev [unoptimized + debuginfo] target(s) in 0.47s
       Running `/home/athena/utxo-workshop/target/debug/wbuild-runner/utxo-runtime13178774267024377957/target/debug/wasm-build-runner-impl`
     Compiling frame-support v2.0.0-alpha.5
  error[E0424]: expected value, found module `self`
     --> /home/athena/.cargo/registry/src/github.com-1ecc6299db9ec823/frame-support-2.0.0-alpha.5/src/traits.rs:835:11
      |
  833 | / bitmask! {
  834 | |     /// Reasons for moving funds out of an account.
  835 | |     #[derive(Encode, Decode)]
      | |              ^^^^^^ `self` value is a keyword only available in methods with a `self` parameter
  836 | |     pub mask WithdrawReasons: i8 where
  ...   |
  851 | |     }
  852 | | }
      | |_- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
      |
      = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

  error: aborting due to previous error

  For more information about this error, try `rustc --explain E0424`.
  error: could not compile `frame-support`

  To learn more, run the command again with --verbose.

Tried running

rustup toolchain install nightly-2020-07-12
cargo +nightly-2020-07-12 build --release

but the error did not go away.

What should we do to fix this?

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/athena/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-2020-07-12-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.46.0 (04488afe3 2020-08-24)
ddxl commented 4 years ago

me too

alko89 commented 4 years ago

I figured out the issue comes from the nightly toolchain, downgrading to a few months old nightly fixed the issue. I'm using nightly-2020-06-03-x86_64-unknown-linux-gnu.

Arstman commented 4 years ago

I figured out the issue comes from the nightly toolchain, downgrading to a few months old nightly fixed the issue. I'm using nightly-2020-06-03-x86_64-unknown-linux-gnu.

yes, exactly, solve my problem. thanks

btw, you have to install the wasm with this specific date version as well.

rustup target add wasm32-unknown-unknown --toolchain nightly-2020-06-03

CzhBlst commented 3 years ago

I figured out the issue comes from the nightly toolchain, downgrading to a few months old nightly fixed the issue. I'm using nightly-2020-06-03-x86_64-unknown-linux-gnu.

Solve my problem. And in windows use nightly-2020-06-03-x86_64-pc-windows-msvc

vessenes commented 3 years ago

FWIW, I did not see this problem on the master branch, but i did see it on the workshop branch.