1

I have the responsibility of updating an old pallet (1-2 years old) and I can not find an updated directory since currently it is throwing this error:

error: failed to select a version for `parity-util-mem`.
    ... required by package `sp-runtime v3.0.0`
    ... which satisfies dependency `sp-runtime = "^3.0.0"` of package `frame-support v3.0.0`
    ... which satisfies dependency `frame-support = "^3.0.0"` of package `orml-utilities v0.4.0`
    ... which satisfies dependency `orml-utilities = "^0.4.0"` of package `pallet-vesting v3.0.0 (/Users/jackson/Desktop/chain_v2/pallets/vesting)`
    ... which satisfies path dependency `pallet-vesting` (locked to 3.0.0) of package `node-template-runtime v4.0.0-dev (/Users/jackson/Desktop/chain_v2/runtime)`
    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`
versions that meet the requirements `^0.9.0` are: 0.9.0

the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:
package `parity-util-mem v0.10.2`
    ... which satisfies dependency `parity-util-mem = "^0.10.2"` of package `sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`
    ... which satisfies git dependency `sc-informant` (locked to 0.10.0-dev) of package `sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`
    ... which satisfies git dependency `sc-service` (locked to 0.10.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`
    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`
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 ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `parity-util-mem` which could resolve this conflict

This is the import statement I am using in the toml: orml-utilities = { version = "0.4.0", default-features = false }

1 Answer 1

2

You need to check out which Substrate version that you are upgrading to.

Then replace all runtime dependencies' Substrate version to that version.

Finally, you can check the Cargo.lock to find out which dependency is using an incompatible parity-util-mem.

Note: I suggest following a release branch. Like:

# your project.toml
polkadot-xxx = { git = "...polkadot", branch = "release-v0.9.25 }
cumulus-xxx = { git = "... cumulus", branch = "polkadot-v0.9.25 }
substrate-xxx = { git = "... substrate", branch = "polkadot-v0.9.25 }

Otherwise, you might need to select the version manually. If you change the dependencies to an untagged/unbranched version, it might break the compatibility.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.