I am trying to run the frontier-node-template:https://github.com/substrate-developer-hub/frontier-node-template/
But it gives an error as shown below. I tried to change the
rustup default nightly-2021-11-12
rustup override set nightly-2021-11-12
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-12
error[E0308]: mismatched types
--> C:\Users\msi\.cargo\registry\src\github.com-1ecc6299db9ec823\parity-db-0.3.1\src\index.rs:502:3
|
501 | fn madvise_random(&self, _map: &mut memmap2::MmapMut) {
| - expected `()` because of default return type
502 | Ok(())
| ^^^^^^- help: consider using a semicolon here: `;`
| |
| expected `()`, found enum `std::result::Result`
|
= note: expected unit type `()`
found enum `std::result::Result<(), _>`
Compiling cid v0.6.1
Compiling zstd v0.6.1+zstd.1.4.9
For more information about this error, try `rustc --explain E0308`.
error: could not compile `parity-db` due to previous error
warning: build failed, waiting for other jobs to finish...
cargo check
works for me on rust 2021-11-12 nightly and 2021-12-12 nightly. That said I had to have protobuf's compiler protoc on the path as one of the dependencies seems to need that. Also I am using nixos / linux.cargo build --release --all-targets
also worked for me on linux.