JojiiOfficial / LiveBudsCli

A tool to control your Galaxy buds+, Live, Buds Pro and Buds 2 Pro
https://crates.io/crates/earbuds
GNU General Public License v3.0
193 stars 15 forks source link

Build error on Fedora 36 #80

Closed amitanilkulkarni closed 2 years ago

amitanilkulkarni commented 2 years ago

Installed all dependencies and tried cargo install earbuds:

error[E0432]: unresolved import `clap::crate_version`
 --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:1:12
  |
1 | use clap::{crate_version, App, AppSettings, Arg, ValueHint};
  |            ^^^^^^^^^^^^^ no `crate_version` in the root

error: cannot determine resolution for the macro `crate_version`
 --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:8:18
  |
8 |         .version(crate_version!())
  |                  ^^^^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:16:18
   |
16 |                 .about("Prints informations verbosely"),
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:28:18
   |
28 |                 .about("Generate completion scripts for a given type of shell")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:33:18
   |
33 |                 .about("Starts the daemon")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:39:18
   |
39 |                 .about("Don't fork the daemon")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:44:18
   |
44 |                 .about("Kill the daemon. If used together with -d, the daemon will get restarted")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:50:18
   |
50 |                 .about("Don't print extra output")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:58:18
   |
58 |                 .about("Specify the device to use")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/cli.rs:91:26
   |
91 |                         .about("Provide additional input for some keys")
   |                          ^^^^^ method not found in `Arg<'_>`

error[E0061]: this function takes 4 arguments but 3 arguments were supplied
   --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/earbuds-0.1.9/src/main.rs:156:5
    |
156 |     generate::<G, _>(app, app.get_name().to_string(), &mut std::io::stdout());
    |     ^^^^^^^^^^^^^^^^ ---  --------------------------  ---------------------- supplied 3 arguments
    |     |
    |     expected 4 arguments
    |
note: function defined here
   --> /home/amitkul2/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
    |
38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
    |        ^^^^^^^^

Some errors have detailed explanations: E0061, E0432, E0599.
For more information about an error, try `rustc --explain E0061`.
error: failed to compile `earbuds v0.1.9`, intermediate artifacts can be found at `/tmp/cargo-installuE2qEq`

Caused by:
  could not compile `earbuds` due to 11 previous errors
JojiiOfficial commented 2 years ago

Could you provide more information? How did you install cargo? Which rust version are you using? Does this error appear when compiling the latest git commit?

amitanilkulkarni commented 2 years ago

I'm using distro-packaged version of rust and cargo, installed via dnf. The error persists after a git pull.

$ cargo --version
cargo 1.59.0

$ rustc --version
rustc 1.59.0 (Fedora 1.59.0-4.fc36)

Please let me know if you need any more details. Thanks!

adlr commented 2 years ago

Cloning tip of tree, going in, and running cargo build got it working for me on Fedora 36. Previously I had the same issue.

JojiiOfficial commented 2 years ago

Updated clap. This error should be fixed