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

libp2p not building at 0.37.1 #2231

Closed
apopiak opened this issue Sep 13, 2021 · 6 comments
Closed

libp2p not building at 0.37.1 #2231

apopiak opened this issue Sep 13, 2021 · 6 comments

Comments

@apopiak
Copy link

apopiak commented Sep 13, 2021

Problem Description

Version 0.37.1 is not currently building because of failed cargo dependency resolution. (This breaks a lot of dependents, e.g. Substrate.)

Note: The error below is different from the one triggered in when trying to build Substrate. Substrate fails to select a version for snow.

Reproduction Steps

  • check out libp2p git checkout v.0.37.1
  • cargo check

Error Logs

error: failed to select a version for the requirement `aesni = "^0.7"`
candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
location searched: crates.io index
required by package `aes v0.4.0`
    ... which is depended on by `aes-gcm v0.6.0`
    ... which is depended on by `snow v0.7.1`
    ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
    ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
    ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
@mxinden
Copy link
Member

mxinden commented Sep 14, 2021

Reason for the compile time error:

  • libp2p v0.37.1 depends on snow v0.7.1.
  • snow v0.7.1 depends on aes-gcm v0.6.0.
  • aes-gcm v0.6.0 depends on aes v0.4.0.
  • aes v0.4.0 depends on aesni.
  • aesni has been deprecated with v0.7 removed.

Fix:

  • libp2p v0.39.1 depends on snow v0.8.0.
  • snow v0.8.0 depends on aes-gcm v0.9.0.
  • aes-gcm v0.9.0 depends on aes v0.7.5.
  • aes v0.7.5 does not depend on aesni.

Would using libp2p v0.39.1 be an option for you @apopiak?

@apopiak
Copy link
Author

apopiak commented Sep 15, 2021

Yes and no. More recent versions of Substrate upgraded to 0.39 already, but the people in the ecosystem who depend on older versions are stuck with 0.37.
If it's possible and not too hard, releasing a 0.37.2 would be amazing.

@mxinden
Copy link
Member

mxinden commented Sep 26, 2021

If it's possible and not too hard, releasing a 0.37.2 would be amazing.

libp2p-noise v0.30.1 would be enough, no?

I have created branch libp2p-noise-0.30 which is currently at tag libp2p-noise-0.30.0 (the failing version). @apopiak could you create a pull request with:

  • A bump of the libp2p-noise version to v0.30.1.
  • A bump of snow in libp2p-noise to v0.8.0.
  • The required changes to make the upgrade compile.

I can then merge the pull request and cut a new release of libp2p-noise based on the branch.

@Milerius
Copy link
Contributor

Milerius commented Oct 5, 2021

@mxinden Do you think it's possible to have backward compatibility of #2264 with 20183c1 if possible

@apopiak
Copy link
Author

apopiak commented Oct 5, 2021

If it's possible and not too hard, releasing a 0.37.2 would be amazing.

libp2p-noise v0.30.1 would be enough, no?

I have created branch libp2p-noise-0.30 which is currently at tag libp2p-noise-0.30.0 (the failing version). @apopiak could you create a pull request with:

* A bump of the `libp2p-noise` version to `v0.30.1`.

* A bump of `snow` in `libp2p-noise` to `v0.8.0`.

* The required changes to make the upgrade compile.

I can then merge the pull request and cut a new release of libp2p-noise based on the branch.

will try to do this

@mxinden
Copy link
Member

mxinden commented Oct 6, 2021

libp2p-noise v0.30.1 has been tagged and released.

@mxinden mxinden closed this as completed Oct 6, 2021
karim-agha added a commit to karim-agha/rust-ipfs that referenced this issue Oct 20, 2021
When including rust-ipfs as a dependency in any crate, it fails with the following error:

```
error: failed to select a version for the requirement `aesni = "^0.7"`
candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
location searched: crates.io index
required by package `aes v0.4.0`
    ... which is depended on by `aes-gcm v0.6.0`
    ... which is depended on by `snow v0.7.1`
    ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
    ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
    ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
```

This fix updates the libp2p version into one that has a fix for this dependency and now it compiles fine
karim-agha added a commit to karim-agha/rust-ipfs that referenced this issue Oct 20, 2021
    When including rust-ipfs as a dependency in any crate, it fails with the following error:

    ```
    error: failed to select a version for the requirement `aesni = "^0.7"`
    candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
    location searched: crates.io index
    required by package `aes v0.4.0`
        ... which is depended on by `aes-gcm v0.6.0`
        ... which is depended on by `snow v0.7.1`
        ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
        ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
        ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
    ```

    This fix updates the libp2p version into one that has a fix for this dependency and now it compiles fine
bors bot added a commit to rs-ipfs/rust-ipfs that referenced this issue Nov 3, 2021
475: Fixing build issue described in: libp2p/rust-libp2p#2231 r=koivunej a=karim-agha

When including rust-ipfs as a dependency in any crate, it fails with the following error:

```
error: failed to select a version for the requirement `aesni = "^0.7"`
candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
location searched: crates.io index
required by package `aes v0.4.0`
    ... which is depended on by `aes-gcm v0.6.0`
    ... which is depended on by `snow v0.7.1`
    ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
    ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
    ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
```

This fix updates the libp2p version into one that has a fix for this dependency and now it compiles fine


Co-authored-by: Karim Agha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants