Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build because of error in frame-support v2.0.0-rc2 #276

Closed
udibr opened this issue May 30, 2020 · 4 comments
Closed

Can't build because of error in frame-support v2.0.0-rc2 #276

udibr opened this issue May 30, 2020 · 4 comments

Comments

@udibr
Copy link

udibr commented May 30, 2020

I run cargo build --release -p kitchen-node
and get

  Compiling frame-support v2.0.0-rc2
error[E0424]: expected value, found module `self`
   --> ~/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/frame-support-2.0.0-rc2/src/traits.rs:913:11
    |
911 | / bitmask! {
912 | |     /// Reasons for moving funds out of an account.
913 | |     #[derive(Encode, Decode)]
    | |              ^^^^^^ `self` value is a keyword only available in methods with a `self` parameter
914 | |     pub mask WithdrawReasons: i8 where
...   |
929 | |     }
930 | | }
    | |_- 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`.
@JoshOrndorff
Copy link
Owner

Hi @udibr Thanks for trying out the recipes. I've run the command myself, and I did not hit the error you reported. You may be getting this error because of your rust compiler version. Can you please run rustup show and post the output here? I've included my own rust versions for comparison.

joshy@pop-os:~/ProgrammingProjects/recipes$ cargo build --release -p kitchen-node
    Updating git repository `https://github.com/encointer/substrate-fixed.git`
   Compiling syn v1.0.27
   Compiling sp-std v2.0.0-rc2
   ...
   Compiling sc-cli v0.8.0-rc2
    Finished release [optimized] target(s) in 6m 04s

joshy@pop-os:~/ProgrammingProjects/recipes$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/joshy/.rustup

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

stable-x86_64-unknown-linux-gnu
nightly-2020-03-01-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
1.43.1-x86_64-unknown-linux-gnu (default)

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

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

1.43.1-x86_64-unknown-linux-gnu (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

@udibr
Copy link
Author

udibr commented Jun 1, 2020

recipes % rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/ehudben-reuven/.rustup

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 (directory override for '/Users/ehudben-reuven/Downloads/github/recipes')
rustc 1.45.0-nightly (4bd32c980 2020-05-29)

@JoshOrndorff
Copy link
Owner

Indeed this was caused by a compiler problem. Here is the corresponding issue in Substrate itself paritytech/substrate#6167

It seems the compiler was reverted to its old behavior, so you should be able to update your toolchain (just run curl https://getsubstrate.io -sSf | bash -s -- --fast again) and succeed with the build.

@udibr
Copy link
Author

udibr commented Jun 1, 2020

Works! Thanks!!

(I tried before doing rustup override set 1.43.1 but that didn't help)

@udibr udibr closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants