dappforce/subsocial-solochain

Error when build code

Closed this issue · 3 comments

after launch
cargo build --release
appear the error:

Compiling frame-support v2.0.0-rc4 (https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f)
error[E0424]: expected value, found module self
--> /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/00768a1/frame/support/src/traits.rs:1172:11
|
1170 | / bitmask! {
1171 | | /// Reasons for moving funds out of an account.
1172 | | #[derive(Encode, Decode)]
| | ^^^^^^ self value is a keyword only available in methods with a self parameter
1173 | | pub mask WithdrawReasons: i8 where
... |
1188 | | }
1189 | | }
| |_- 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.

This is a bug related to Substrate w/ Rust compatibility. Since we use Substrate v2.0.0-rc4, this bug isn't fixed yet.
The working fix is to follow next commands from dappforce-subsocial-node directory:

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

Correct rust toolchains since #108 will be specified in the init.sh file.

siman commented

Should be fixed by this PR: #108