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

Compile error for dependencie "group" when trying to build fuzz target #1

Closed
fu2qa opened this issue Sep 6, 2021 · 3 comments
Closed

Comments

@fu2qa
Copy link

fu2qa commented Sep 6, 2021

Hello,

thanks for releasing this new interesting service! I wanted to try running the fuzz targets as described in the README, but it failed. I'm not experienced with rust, it seems to be a compile error related to the dependency group v0.9.0. Or is this maybe an error on my side?
I really like, that you ship the service with fuzz targets, nice work!

Signal-Calling-Service$ cargo +nightly fuzz run dtls
Compiling prost-derive v0.7.0
Compiling serde v1.0.130
Compiling pin-project v1.0.8
Compiling thiserror v1.0.29
Compiling async-stream v0.3.2
Compiling rand v0.8.4
Compiling group v0.9.0
error[E0034]: multiple applicable items in scope
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-derive-0.7.0/src/lib.rs:109:14
|
109 | .intersperse(quote!(|));
| ^^^^^^^^^^^ multiple intersperse found
|
= note: candidate #1 is defined in an impl of the trait Iterator for the type Map<I, F>
= note: candidate #2 is defined in an impl of the trait Itertools for the type T
help: disambiguate the associated function for candidate #1
|
105 ~ let tags = Iterator::intersperse(field
106 + .tags()
107 + .into_iter()
108 + .map(|tag| quote!(#tag)), {
109 + let mut _s = $crate::__private::TokenStream::new();
110 + $crate::quote_each_token!(_s $($tt));
...
help: disambiguate the associated function for candidate #2
|
105 ~ let tags = Itertools::intersperse(field
106 + .tags()
107 + .into_iter()
108 + .map(|tag| quote!(#tag)), {
109 + let mut _s = $crate::__private::TokenStream::new();
110 + $crate::quote_each_token!(_s $($tt)
);
...

Compiling structopt-derive v0.4.16
For more information about this error, try rustc --explain E0034.
error: could not compile prost-derive due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: failed to build fuzz script: "cargo" "build" "--manifest-path" "/home/user/repos/Signal-Calling-Service/fuzz/Cargo.toml" "--target" "x86_64-unknown-linux-gnu" "--release" "--bin" "dtls"

@awaitlink
Copy link

awaitlink commented Sep 6, 2021

The compilation issue seems to point to prost-derive. It looks like it's already reported there as well:


Edit to explain why prost-derive:

it seems to be a compile error related to the dependency group v0.9.0

Note that the order of the "Compiling" notices doesn't always correlate to other output because, for example, cargo may build in parallel. However, one can tell that the issue is raised in prost-derive because:

  • The error points to a file in prost-derive:
    error[E0034]: multiple applicable items in scope
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-derive-0.7.0/src/lib.rs:109:14
    
  • This message:
    error: could not compile prost-derive due to previous error
    

@jim-signal
Copy link
Contributor

Thanks @u32i64, that seems to be it. I am able to run using an earlier pinned nightly:

If you haven't already, and replace with your target such as x86_64-unknown-linux-gnu:

rustup install nightly-2021-06-08
rustup target add x86_64-apple-darwin --toolchain nightly-2021-06-08

Then this should work:

cargo +nightly-2021-06-08 fuzz run dtls

We probably should add a rust-toolchain file to help out with this.

@jrose-signal
Copy link
Contributor

The fuzz targets still require nightly, but I think we're now far enough ahead that we don't need a particular nightly. I'm going to close this for now, since that's true of all uses of cargo fuzz.

@jrose-signal jrose-signal closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants