HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
17.1k stars 1.31k forks source link

Compile error with cargo install cargo-c #5515

Closed b4byhuey closed 9 months ago

b4byhuey commented 9 months ago

Problem Description

Try to compile but i get this error..

Activity Log, Crash Log or any other details

error[E0277]: the trait bound `MacKeychain: cargo_credential::Credential` is not satisfied
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.74.0/src/cargo/util/auth/mod.rs:455:45
    |
455 |           let provider: Box<dyn Credential> = match process {
    |  _____________________________________________^
456 | |             "cargo:token" => Box::new(TokenCredential::new(config)),
457 | |             "cargo:paseto" => Box::new(PasetoCredential::new(config)),
458 | |             "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
...   |
462 | |             process => Box::new(CredentialProcessCredential::new(process)),
463 | |         };
    | |_________^ the trait `cargo_credential::Credential` is not implemented for `MacKeychain`
    |
help: trait impl with same name found
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-credential-0.4.1/src/lib.rs:61:1
    |
61  | impl Credential for UnsupportedCredential {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `cargo_credential` are being used?
    = help: the following other types implement trait `cargo_credential::Credential`:
              UnsupportedCredential
              BasicProcessCredential
              PasetoCredential<'a>
              CredentialProcessCredential
              TokenCredential<'a>
    = note: required for the cast from `std::boxed::Box<MacKeychain>` to `std::boxed::Box<dyn cargo_credential::Credential>`

error[E0277]: the trait bound `LibSecretCredential: cargo_credential::Credential` is not satisfied
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.74.0/src/cargo/util/auth/mod.rs:455:45
    |
455 |           let provider: Box<dyn Credential> = match process {
    |  _____________________________________________^
456 | |             "cargo:token" => Box::new(TokenCredential::new(config)),
457 | |             "cargo:paseto" => Box::new(PasetoCredential::new(config)),
458 | |             "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
...   |
462 | |             process => Box::new(CredentialProcessCredential::new(process)),
463 | |         };
    | |_________^ the trait `cargo_credential::Credential` is not implemented for `LibSecretCredential`
    |
help: trait impl with same name found
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-credential-libsecret-0.3.2/src/lib.rs:104:5
    |
104 |     impl Credential for LibSecretCredential {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `cargo_credential` are being used?
    = help: the following other types implement trait `cargo_credential::Credential`:
              UnsupportedCredential
              BasicProcessCredential
              PasetoCredential<'a>
              CredentialProcessCredential
              TokenCredential<'a>
    = note: required for the cast from `std::boxed::Box<LibSecretCredential>` to `std::boxed::Box<dyn cargo_credential::Credential>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `cargo` (lib) due to 2 previous errors
error: failed to compile `cargo-c v0.9.27+cargo-0.74.0`, intermediate artifacts can be found at `/tmp/cargo-installO8hQnI`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Process completed with exit code 101.

What Operating System are you running?

github action ubuntu-22.04

What version of HandBrake are you running?

Nightly e9bae4c

Where did you download HandBrake from?

No response

quietvoid commented 9 months ago

Upstream issue: https://github.com/rust-lang/cargo/issues/13002

Nomis101 commented 9 months ago

I also had several compile issues related to cargo-c in the past. I've now installed cargo-c via Homebrew, which worked better for me.

quietvoid commented 9 months ago

This should be fixed with latest cargo-c update.

sr55 commented 9 months ago

^ thanks