Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version conflict on if-addrs-sys #4

Open
ghost opened this issue Jan 28, 2021 · 5 comments
Open

Version conflict on if-addrs-sys #4

ghost opened this issue Jan 28, 2021 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 28, 2021

There seems to be an issue with the if-addrs-sys package, i tried checking and building with cargo right out of the box and i am unable to. When i do run
cargo check
i get the following error:

Updating git repositoryhttps://github.com/rs-ipfs/rust-ipfs`
Updating crates.io index
Updating git repository https://github.com/NLnetLabs/domain.git
error: failed to select a version for if-addrs-sys.
... required by package if-addrs v0.6.4
... which is depended on by libp2p-tcp v0.27.0
... which is depended on by libp2p v0.34.0
... which is depended on by ipfs v0.2.1 (https://github.com/rs-ipfs/rust-ipfs#cf370325)
... which is depended on by node-cli v2.0.0 (/home/cbnits/Documents/ref/substrate/bin/node/cli)
... which is depended on by chain-spec-builder v2.0.0 (/home/cbnits/Documents/ref/substrate/bin/utils/chain-spec-builder)
versions that meet the requirements ^0.3 are: 0.3.2, 0.3.1

the package if-addrs-sys links to the native library ifaddrs, but it conflicts with a previous package which links to ifaddrs as well:
package get_if_addrs-sys v0.1.1
... which is depended on by get_if_addrs v0.5.3
... which is depended on by libp2p-tcp v0.22.0
... which is depended on by libp2p v0.28.1
... which is depended on by node-browser-testing v2.0.0 (/home/cbnits/Documents/ref/substrate/bin/node/browser-testing)

failed to select a version for if-addrs-sys which could resolve this conflict
`

What do you think is the solution to this?

Reference Screenshot:

Screenshot from 2021-01-28 12-00-52

@driemworks
Copy link

driemworks commented Aug 3, 2021

@dEvK4n3Ki were you able to solve the issue? I encountered the same thing. It looks like the latest version of rust-ipfs uses libp2p 0.34.0 but the older libs used in this repo use 0.28.1. One fix is to specify the tag = "[email protected]", which uses libp2p 0.28.1. I have a fork that does that: https://github.com/driemworks/substrate/tree/offchain_ipfs_wsl
Another (not as easy but definitey better) option would be to rebase this repo with the parity/substrate master branch.

edit: should be [email protected], not 0.2.1.

@saravana87
Copy link

@dEvK4n3Ki were you able to solve the issue? I encountered the same thing. It looks like the latest version of rust-ipfs uses libp2p 0.34.0 but the older libs used in this repo use 0.28.1. One fix is to specify the tag = "[email protected]", which uses libp2p 0.28.1. I have a fork that does that: https://github.com/driemworks/substrate/tree/offchain_ipfs_wsl
Another (not as easy but definitey better) option would be to rebase this repo with the parity/substrate master branch.

Can you tell me where to add tag ="[email protected]". Should I add it in the docker version?

@driemworks
Copy link

driemworks commented Aug 10, 2021

@dEvK4n3Ki were you able to solve the issue? I encountered the same thing. It looks like the latest version of rust-ipfs uses libp2p 0.34.0 but the older libs used in this repo use 0.28.1. One fix is to specify the tag = "[email protected]", which uses libp2p 0.28.1. I have a fork that does that: https://github.com/driemworks/substrate/tree/offchain_ipfs_wsl
Another (not as easy but definitey better) option would be to rebase this repo with the parity/substrate master branch.

Can you tell me where to add tag ="[email protected]". Should I add it in the docker version?

There are three packages that depend on ipfs, so the tag needs to be specified in the Cargo.toml in each.
Take a look at: driemworks@2072db4

I'm using WSL so if your system is different this could differ. I'm only able to get the project to run using ngihtly-2020-08-23. That is, running cargo +nightly-2020-08-23 build --release and then cargo +nightly-2020-08-23 run --release -- --dev --tmp

@saravana87
Copy link

@driemworks Thanks for your reply.
I edited the tag in all the 3 files.
I got the following error.
image

Please let me know how to fix this.

@driemworks
Copy link

driemworks commented Aug 11, 2021

The error says wasm32-unknown-unknown target may not be installed. Install it:
rustup target add wasm32-unknown-unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants