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

cargo build: error: failed to select a version for ibc-proto. #3676

Closed
taitruong opened this issue Oct 23, 2023 · 8 comments
Closed

cargo build: error: failed to select a version for ibc-proto. #3676

taitruong opened this issue Oct 23, 2023 · 8 comments

Comments

@taitruong
Copy link

I was trying to build v1.7.0 using cargo build --release --bin hermes, but get this error:

    Updating crates.io index
error: failed to select a version for `ibc-proto`.
    ... required by package `ibc-relayer v0.26.0 (/home/ttruong/data/development/hermes/crates/relayer)`
versions that meet the requirements `^0.38.0` (locked to 0.38.0) are: 0.38.0

the package `ibc-relayer` depends on `ibc-proto`, with features: `tonic` but `ibc-proto` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

I was able to build v1.6.0 though.

@romac
Copy link
Member

romac commented Oct 23, 2023

This is weird, since Hermes builds fine on CI and I am also unable to reproduce this locally.

Also this error message is plain wrong:

the package ibc-relayer depends on ibc-proto, with features: tonic

since ibc-relayer does not depend on ibc-proto with the tonic feature.

Which commit are you building from?

Maybe do a cargo clean followed by cargo update and try building again?

@taitruong
Copy link
Author

seems like it comes from ibc-proto: cargo add ibc-proto --package ibc-relayer-types

Error:

$ cargo add ibc-proto --package ibc-relayer-types
    Updating crates.io index
      Adding ibc-proto v0.38.0 to dependencies.
             Features:
             + client
             + std
             - borsh
             - json-schema
             - parity-scale-codec
             - proto-descriptor
             - serde
             - server
error: failed to select a version for `ibc-proto`.
    ... required by package `ibc-relayer v0.26.0 (/home/ttruong/data/development/hermes/crates/relayer)`
versions that meet the requirements `^0.38.0` (locked to 0.38.0) are: 0.38.

And yes, I did a cargo clean and working on v1.7.0 branch.

@romac
Copy link
Member

romac commented Oct 23, 2023

Ah i see then yeah the v1.7.0 tag is a bit borked. You can either install it from crates.io or build from master if that's okay with you. Sorry about that!

@taitruong
Copy link
Author

Can you create a new release?

@taitruong
Copy link
Author

Ah i see then yeah the v1.7.0 tag is a bit borked. You can either install it from crates.io or build from master if that's okay with you. Sorry about that!

error when installing from crates.io:

$ cargo install ibc-relayer-cli
    Updating crates.io index
  Installing ibc-relayer-cli v1.7.0
    Updating crates.io index
error: failed to compile `ibc-relayer-cli v1.7.0`, intermediate artifacts can be found at `/tmp/cargo-installwWayop`

Caused by:
  failed to select a version for `ibc-proto`.
      ... required by package `ibc-chain-registry v0.26.0`
      ... which satisfies dependency `ibc-chain-registry = "^0.26.0"` of package `ibc-relayer-cli v1.7.0`
  versions that meet the requirements `^0.38.0` are: 0.38.0

  the package `ibc-chain-registry` depends on `ibc-proto`, with features: `tonic` but `ibc-proto` does not have these features.
   It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


  failed to select a version for `ibc-proto` which could resolve this conflict

@taitruong
Copy link
Author

error from building on master branch:

~/data/development/hermes (master)$ cargo build --release --bin hermes
error: failed to select a version for `ibc-proto`.
    ... required by package `ibc-relayer v0.26.0 (/home/ttruong/data/development/hermes/crates/relayer)`
versions that meet the requirements `^0.38.0` (locked to 0.38.0) are: 0.38.0

the package `ibc-relayer` depends on `ibc-proto`, with features: `tonic` but `ibc-proto` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `ibc-proto` which could resolve this conflict

@ljoss17
Copy link
Contributor

ljoss17 commented Nov 6, 2023

Are you using Rust v1.70.0? If so, the issue should be solved by upgrading to Rust v1.71.0 rust-lang/cargo#12130

@taitruong
Copy link
Author

Are you using Rust v1.70.0? If so, the issue should be solved by upgrading to Rust v1.71.0 rust-lang/cargo#12130

That was the problem! Upgraded to v1.73.0 and works like a charm. Thank u!

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

No branches or pull requests

3 participants