paritytech / paritytech/try-runtime-cli
Error with latest `polkadot-sdk/master` (two incompatible versions of `rocksdb` are pulled in)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Using try-runtime-cli with the current polkadot-sdk/master fails. I'm using fea33a, but it's not a temporary problem of that commit; it's just the latest commit.
You can reproduce by adding try-runtime-cli = { version = "0.42.0" } to the deps of staging-node-cli. The build will fail. An easier way to check is like this:
$ cargo tree -i rocksdb
Updating crates.io index
error: failed to select a version for `librocksdb-sys`.
... required by package `rocksdb v0.21.0`
... which satisfies dependency `rocksdb = "^0.21"` of package `kvdb-rocksdb v0.19.0`
... which satisfies dependency `kvdb-rocksdb = "^0.19.0"` of package `sc-client-db v0.39.0`
... which satisfies dependency `sc-client-db = "^0.39.0"` of package `sc-cli v0.40.0`
... which satisfies dependency `sc-cli = "^0.40.0"` of package `try-runtime-cli v0.42.0`
... which satisfies dependency `try-runtime-cli = "^0.42.0"` of package `staging-node-cli v3.0.0-dev (/Users/michi/projects/polkadot-sdk/substrate/bin/node/cli)`
... which satisfies path dependency `node-cli` (locked to 3.0.0-dev) of package `polkadot-sdk-docs v0.0.1 (/Users/michi/projects/polkadot-sdk/docs/sdk)`
versions that meet the requirements `^0.11.0` are: 0.11.0+8.1.1
package `librocksdb-sys` links to the native library `rocksdb`, but it conflicts with a previous package which links to `rocksdb` as well:
package `librocksdb-sys v0.17.3+10.4.2`
... which satisfies dependency `librocksdb-sys = "^0.17.3"` of package `rocksdb v0.24.0`
... which satisfies dependency `rocksdb = "^0.24.0"` of package `kvdb-rocksdb v0.20.0`
... which satisfies dependency `kvdb-rocksdb = "^0.20.0"` of package `node-bench v0.9.0-dev (/Users/michi/projects/polkadot-sdk/substrate/bin/node/bench)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "rocksdb"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `librocksdb-sys` which could resolve this conflict
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with substrate/bin/node/cli/Cargo.toml and reproduce the failure by adding try-runtime-cli = { version = "0.42.0" }. Run cargo tree -i rocksdb and inspect the conflicting kvdb-rocksdb and librocksdb-sys dependency paths; done means the staging-node-cli dependency graph resolves without the native rocksdb links conflict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100