Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Dependency conflict when trying to use rgb-node in another project #88

Closed
jharveyb opened this issue Oct 12, 2020 · 2 comments
Closed
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jharveyb
Copy link
Contributor

rgb-node builds fine for me as its own crate, but when I try to include it in a separate project, I get this error upon cargo check or cargo build:

error: failed to select a version for secp256k1-sys.
... required by package secp256k1 v0.18.0
... which is depended on by bitcoin v0.24.0
... which is depended on by miniscript v2.0.0
... which is depended on by lnpbp v0.1.0-rc.2 (https://github.com/LNP-BP/rust-lnpbp?tag=v0.1.0-rc.2#96832d9b)
... which is depended on by rgb_node v0.1.0-rc.2 (https://github.com/LNP-BP/rgb-node?tag=v0.1.0-rc.2#a46423d6)
... which is depended on by $MY_PROJECT
versions that meet the requirements ^0.2.0 are: 0.2.0

the package secp256k1-sys links to the native library rustsecp256k1_v0_2_0, but it conflicts with a previous package which links to rustsecp256k1_v0_2_0 as well:
package secp256k1-sys v0.3.0
... which is depended on by secp256k1 v0.19.0
... which is depended on by bitcoin v0.25.0
... which is depended on by electrum-client v0.3.0-beta.1
... which is depended on by rgb_node v0.1.0-rc.2 (https://github.com/LNP-BP/rgb-node?tag=v0.1.0-rc.2#a46423d6)
... which is depended on by $MY_PROJECT

failed to select a version for secp256k1-sys which could resolve this conflict

This error is also present for the v0.1.0-rc.1 tag, but not v0.1.0-beta.4.

@dr-orlovsky
Copy link
Member

Sorry, I forgot to add the same section as in LNP/BP Core lib readme: https://github.com/LNP-BP/rust-lnpbp/#use-library-in-other-projects

So you need to add this to your project using either RGB Node or LNP/BP Core libraries.

This is temporary: with the release of upstream rust-bitcoin crates we will be able to do a release of our libs as well (hoping this will happen this week) and this fix would not be required anymore

@dr-orlovsky dr-orlovsky added bug Something isn't working documentation Improvements or additions to documentation labels Oct 12, 2020
@jharveyb
Copy link
Contributor Author

Confirmed that this is fixed with the v0.1.0 release, can be used from crates.io as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants