pendulum-chain / spacewalk

Apache License 2.0
35 stars 7 forks source link

resolve parity-util-mem compile error #38

Closed ashneverdawn closed 2 years ago

ashneverdawn commented 2 years ago

resolve this compile error:

error: failed to select a version for `parity-util-mem`.
    ... required by package `sp-core v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073)`
    ... which satisfies git dependency `sp-core` of package `annuity v1.0.0 (/Users/hugo/Code/spacewalk/crates/annuity)`
versions that meet the requirements `^0.11.0` are: 0.11.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-service v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#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?branch=polkadot-v0.9.17#22d40c76)`
    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `spacewalk-standalone v1.2.0 (/Users/hugo/Code/spacewalk/testchain/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

The error does not occur when the following are commented out of the root Cargo.toml

  "testchain/node",
  "testchain/runtime",
  "crates/spacewalk",

So, it appears it's about something in our current code conflicting with the newly added crates from interbtc.

Note: This must be merged to dev/include-main-m2-pallets

gonzamontiel commented 2 years ago

This is due to the fact that we are using substrate/polkadot version v0.9.17, and the code included is using v0.9.18