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

Dependency issue with crypto-mac package #9633

Open
akru opened this issue Aug 26, 2021 · 9 comments
Open

Dependency issue with crypto-mac package #9633

akru opened this issue Aug 26, 2021 · 9 comments

Comments

@akru
Copy link
Contributor

akru commented Aug 26, 2021

Description

error: failed to select a version for the requirement `crypto-mac = "^0.7"`
candidate versions found which didn't match: 0.11.1, 0.11.0, 0.10.1, ...
location searched: crates.io index
required by package `hmac v0.7.0`

Happens when call cargo update on substrate (polkadot-v0.9.9 branch) or other derivative package.

@bkchr
Copy link
Member

bkchr commented Aug 26, 2021

@akru try cargo update -p substrate-bip39

@akru
Copy link
Contributor Author

akru commented Aug 26, 2021

Thank you @bkchr, but is it temporary fix didn’t?

@bkchr
Copy link
Member

bkchr commented Aug 26, 2021

Why?

@akru
Copy link
Contributor Author

akru commented Aug 27, 2021

Just, anyway better to be able make cargo update without any hacks, right?

@xlc
Copy link
Contributor

xlc commented Aug 27, 2021

We cannot have lock files for ORML and currently impossible to have our CI passing.

@OfekShochat
Copy link

OfekShochat commented Aug 27, 2021

Im trying to only use sc-network. its giving me the same thing,

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.24.0`
    ... which is depended on by `libp2p v0.28.1`
    ... which is depended on by `sc-network v0.8.0`

@c410-f3r
Copy link
Contributor

cc #8660

@ltfschoen
Copy link
Contributor

ltfschoen commented Aug 31, 2021

the crypto-mac issue appears to have been caused because crypto-mac 0.7.0 was removed from https://crates.io/crates/crypto-mac/versions. if developers delete their Cargo.lock file and then rebuild with cargo build --release the experienced the issue.

this affected building Substrate tag v3.0.0 and the latest substrate-node-template, which is using dependencies from Substrate commit 4d28ebe.

but crypto-mac has been added back again at https://crates.io/crates/crypto-mac/versions, so this issue appears to have been resolved.

although now another dependency snow 0.7.1 has been removed from https://crates.io/crates/snow/versions, so if you delete Cargo.lock and then try to build the latest substrate-node-template that's using dependencies from Substrate commit 4d28ebe with cargo build --release it generates error:

    Updating git repository `https://github.com/paritytech/substrate.git`
    Updating crates.io index
error: failed to select a version for `snow`.
    ... required by package `libp2p-noise v0.30.0`
    ... which is depended on by `libp2p v0.37.1`
    ... which is depended on by `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)`
    ... which is depended on by `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)`
    ... which is depended on by `node-template v3.0.0-monthly-2021-08 (/Users/ls2/code/substrate-developer-hub/substrate-node-template/node)`
versions that meet the requirements `^0.7.1` are: 0.7.2, 0.7.1

all possible versions conflict with previously selected packages.

  previously selected package `snow v0.7.1`
    ... which is depended on by `libp2p-noise v0.30.0`
    ... which is depended on by `libp2p v0.37.1`
    ... which is depended on by `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)`
    ... which is depended on by `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)`
    ... which is depended on by `node-template v3.0.0-monthly-2021-08 (/Users/ls2/code/substrate-developer-hub/substrate-node-template/node)`

failed to select a version for `snow` which could resolve this conflict

unfortunately running cargo update -p substrate-bip39 does not resolve the issue.

@apopiak
Copy link
Contributor

apopiak commented Sep 1, 2021

#9391 bumps the libp2p version which will also bump snow, might be worth a try to cherry-pick.

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

No branches or pull requests

7 participants