failed to select version for parity-scale-codec when building
guillheu opened this issue · comments
simply running cargo build --release -p data-avail
gives me the following dependency version error for the crate parity-scale-codec
:
error: failed to run custom build command for `da-runtime v6.0.0 (/home/user/avail/runtime)`
Caused by:
process didn't exit successfully: `/home/user/avail/target/release/build/da-runtime-4f79b26897e27741/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: "rustup" "run" "nightly-2021-12-14" "cargo" "-Zfeatures=build_dep" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/home/user/avail/target/release/wbuild/da-runtime/Cargo.toml" "--color=always" "--release"
Using rustc version: rustc 1.59.0-nightly (8f117a77d 2021-12-13)
--- stderr
warning: flag `-Z features` has been stabilized in the 1.51 release, and is no longer necessary
The new feature resolver is now available by specifying `resolver = "2"` in Cargo.toml.
See https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2 for more information.
Updating crates.io index
error: failed to select a version for the requirement `parity-scale-codec = "^3.0.0"`
candidate versions found which didn't match: 3.1.5, 3.1.3, 3.1.2, ...
location searched: crates.io index
required by package `kate v0.5.0 (https://github.com/maticnetwork/avail-core.git?tag=da/v0.4.0#38ee8798)`
... which satisfies git dependency `kate` (locked to 0.5.0) of package `da-runtime v6.0.0 (/home/user/avail/runtime)`
... which satisfies path dependency `wasm-project` (locked to 6.0.0) of package `da-runtime-wasm v1.0.0 (/home/user/avail/target/release/wbuild/da-runtime)`
warning: build failed, waiting for other jobs to finish...
I haven't seen that exact error before. You might be on an older version of rustc
based on your error messaging:
Using rustc version: rustc 1.59.0-nightly (8f117a77d 2021-12-13)
Could you try updating to the current version? To verify, I ran the following commands on a new Ubuntu VM, and it worked as expected:
git clone https://github.com/maticnetwork/avail.git
cd avail
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install nightly
rustup default nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo build --release -p data-avail
That worked, thank you.