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

New Cargo Feature requires Cargo.toml files update #1349

Closed
bodo-hugo-barwich opened this issue Jan 6, 2022 · 5 comments
Closed

New Cargo Feature requires Cargo.toml files update #1349

bodo-hugo-barwich opened this issue Jan 6, 2022 · 5 comments
Labels
Type: Bug Something isn't working

Comments

@bodo-hugo-barwich
Copy link
Contributor

Describe the bug
Any Cargo or make command fails with Error feature 'resolver' is required

To Reproduce
Steps to reproduce the behavior:
Fresh Development Installation with branch main updated

$ git log -1
commit 356757e2c776132e4c8db0a85e4b1733137330fd (HEAD -> main, origin/main, origin/HEAD)
Author: noot <36753753+noot@users.noreply.github.com>
Date:   Fri Dec 17 20:03:29 2021 -0500

    drand v14 update: fix fetching around null tipsets (#1339)

running make release or cargo clean

Log output

$ make release
cargo build --release --bin forest
error: failed to parse manifest at `/absolute/path/to/forest/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest
make: *** [Makefile:55: release] Error 101
$ cargo clean
error: failed to parse manifest at `/absolute/path/to/forest/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest

Expected behaviour
should compile normally

Environment (please complete the following information):

  • OS:
$ uname -a
Linux thebrain 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux
  • Rust version(e.g. rustc --version)
$ rustc --version
rustc 1.48.0
$ cargo --version
cargo 1.46.0
  • Branch/commit
 $ git log -1
commit 356757e2c776132e4c8db0a85e4b1733137330fd (HEAD -> main, origin/main, origin/HEAD)
Author: noot <36753753+noot@users.noreply.github.com>
Date:   Fri Dec 17 20:03:29 2021 -0500

    drand v14 update: fix fetching around null tipsets (#1339)

Other information and links

Features Meta Tracker
New resolver Cargo Feature

@bodo-hugo-barwich bodo-hugo-barwich added the Type: Bug Something isn't working label Jan 6, 2022
@bodo-hugo-barwich
Copy link
Contributor Author

Actually modifying the Cargo.toml as described in the Cargo Meta Tracker does solve this issue.
but it needs to be done to all Cargo.toml files

$ cat Cargo.toml | grep -i -B3 -A3 "resolver"

cargo-features = ["resolver"]

[workspace]
members = [
$ make release
cargo build --release --bin forest
    Updating crates.io index
    Updating git repository `https://github.com/ChainSafe/libp2p-bitswap`
  Downloaded crossbeam-queue v0.3.2
  Downloaded hmac v0.8.1
  Downloaded futures-task v0.3.15
  Downloaded const_fn v0.4.8
  Downloaded async-executor v1.4.1
  Downloaded instant v0.1.10
  Downloaded tracing-futures v0.2.5
  Downloaded hashbrown v0.11.2
  Downloaded aes v0.7.5
  Downloaded git-version v0.3.4
  Downloaded cuckoofilter v0.5.0
  Downloaded filecoin-proofs v9.0.2
  Downloaded universal-hash v0.4.1
  Downloaded unicode-segmentation v1.8.0
  Downloaded unicode-bidi v0.3.5
  Downloaded blstrs v0.2.2
  Downloaded typenum v1.13.0
  Downloaded tracing-attributes v0.1.15
  Downloaded ff-cl-gen v0.3.0
  Downloaded cpufeatures v0.2.1
  Downloaded clang-sys v1.2.0
  Downloaded crypto-mac v0.10.1
  Downloaded crossbeam-deque v0.8.1
  Downloaded crossbeam v0.8.1
  Downloaded crossbeam-epoch v0.9.5
  Downloaded blake3 v0.3.8
  Downloaded femme v2.1.1
  Downloaded cc v1.0.69
  Downloaded cid v0.6.1
  Downloaded bls-signatures v0.9.0
  Downloaded byteorder v1.4.3
  Downloaded byte-unit v4.0.12
  Downloaded byte-pool v0.2.3
  Downloaded bimap v0.6.1
  Downloaded async-std-resolver v0.20.3
  Downloaded bincode v1.3.3
  Downloaded tokio v1.8.4
  Downloaded uint v0.9.1
  Downloaded dtoa v0.4.8
  Downloaded prost-types v0.9.0
  Downloaded hostname v0.3.1
  Downloaded heck v0.3.3
  Downloaded asynchronous-codec v0.6.0
  Downloaded futures-executor v0.3.15
  Downloaded polling v2.1.0
  Downloaded pin-project-lite v0.2.7
  Downloaded data-encoding-macro v0.1.12
  Downloaded proc-macro2 v1.0.27
  Downloaded enum-as-inner v0.3.3
  Downloaded pin-project-lite v0.1.12
  Downloaded rustc_version v0.3.3
  Downloaded http v0.2.4
  Downloaded futures-channel v0.3.15
  Downloaded cpufeatures v0.1.5
  Downloaded flume v0.10.9
  Downloaded fixedbitset v0.4.0
  Downloaded futures v0.3.15
  Downloaded prometheus v0.12.0
  Downloaded trust-dns-resolver v0.20.3
  Downloaded git-version-macro v0.3.4
  Downloaded libloading v0.7.0
  Downloaded num-complex v0.4.0
  Downloaded ipld_amt v0.2.1
  Downloaded sct v0.6.1
  Downloaded jobserver v0.1.22
  Downloaded prost v0.9.0
  Downloaded serde_repr v0.1.7
  Downloaded forest_actor v1.0.5
  Downloaded signal-hook-registry v1.4.0
  Downloaded signature v1.3.1
  Downloaded slab v0.4.3
  Downloaded polyval v0.5.3
  Downloaded tungstenite v0.13.0
  Downloaded standback v0.2.17
  Downloaded half v1.7.1
  Downloaded bellperson v0.16.3
  Downloaded az v1.1.2
  Downloaded bindgen v0.57.0
  Downloaded procfs v0.9.1
  Downloaded subtle v2.4.1
  Downloaded match_cfg v0.1.0
  Downloaded ipld_amt v1.0.0
  Downloaded socket2 v0.4.0
  Downloaded multihash v0.14.0
  Downloaded blstrs v0.3.0
  Downloaded forest_actor v3.0.0
  Downloaded http-client v6.4.1
  Downloaded groupy v0.4.1
  Downloaded prost v0.8.0
  Downloaded ed25519 v1.1.1
  Downloaded dashmap v4.0.2
  Downloaded surf v2.2.0
  Downloaded proc-macro-crate v1.0.0
  Downloaded poly1305 v0.7.2
  Downloaded httparse v1.4.1
  Downloaded thiserror v1.0.26
  Downloaded multistream-select v0.10.4
error: failed to parse manifest at `/home/<user>/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/multistream-select-0.10.4/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest
make: *** [Makefile:55: release] Error 101

@elmattic
Copy link
Contributor

elmattic commented Jan 6, 2022

Hey Bodo, have you tried to build with last version?

(run rustup update stable to upgrade cargo and rustc to 1.57.0)

@truemagic-coder
Copy link

FYI it works on Ubuntu 20.04 (latest) with Rust 1.57.0 (stable). Make release created the release and cargo clean did not error.

Using Ubuntu 20.04 (latest) with Rust 1.48.0 (stable). The same error happened to me as Bodo. I had to delete the rust-toolchain file (denoting stable) in the git repo to override 1.57.0 to 1.48.0. The documentation for forest can be updated with the rustup update stable command. Would you like me to submit a PR to the README?

I know this is a new issue but I also tried building the Docker image and that did not work. Do you want me to create a new issue in the tracker?

Compiling forest_libp2p v0.1.0 (/usr/src/forest/node/forest_libp2p)
error: git describe failed with status 128: fatal: not a git repository (or any of the parent directories): .git
--> node/forest_libp2p/src/behaviour.rs:59:47
|
59 | static ref CURRENT_COMMIT: &'static str = git_version!();
| ^^^^^^^^^^^^^^
|
= note: this error originates in the macro proc_macro_call (in Nightly builds, run with -Z macro-backtrace for more info)

Compiling genesis v0.1.0 (/usr/src/forest/utils/genesis)
error: could not compile forest_libp2p due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile forest v0.1.0 (/usr/src/forest/forest), intermediate artifacts can be found at /usr/src/forest/target

@bodo-hugo-barwich
Copy link
Contributor Author

The error that I was observing is reproducible as seen in this test workflow
Rust Compiler Matrix Test

It seems especially applicable to the Rust Versions < 1.52.0 as it can be concluded from the cargo commit history.

But I noticed that it does not only affect this project but several libraries that use this feature.
Also I saw that the Minimum Rust Version for the project was incremented to 1.55.

So, this issue is actually not applicable to the project.

@bodo-hugo-barwich
Copy link
Contributor Author

According to the Test Matrix the earliest working Rust compiler version is 1.53.0
Rust Compiler Test Matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants