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

can't compile broot on ubuntu 24.04 #995

Closed
dominix opened this issue Mar 25, 2025 · 5 comments
Closed

can't compile broot on ubuntu 24.04 #995

dominix opened this issue Mar 25, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@dominix
Copy link

dominix commented Mar 25, 2025

cargo install broot

...
   Compiling git2 v0.20.1
error[E0283]: type annotations needed
   --> /home/xxxxxxx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/broot-1.45.0/src/filesystems/filesystems_state.rs:601:38
    |
601 |             if y < self.mounts.len().into() {
    |                  -                   ^^^^
    |                  |
    |                  type must be known at this point
    |
    = note: multiple `impl`s satisfying `usize: PartialOrd<_>` found in the following crates: `core`, `deranged`:
            - impl PartialOrd for usize;
            - impl<MIN, MAX> PartialOrd<deranged::RangedUsize<MIN, MAX>> for usize
              where the constant `MIN` has type `usize`, the constant `MAX` has type `usize`;
help: try using a fully qualified path to specify the expected types
    |
601 |             if y < <std::num::NonZero<usize> as Into<T>>::into(self.mounts.len()) {
    |                    ++++++++++++++++++++++++++++++++++++++++++++                 ~

For more information about this error, try `rustc --explain E0283`.
error: could not compile `broot` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `broot v1.45.0`, intermediate artifacts can be found at `/tmp/cargo-installhyBW2c`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Error: `cargo install` failed

rustc --version
rustc 1.85.1 (4eb161250 2025-03-15)

@dominix dominix added the bug Something isn't working label Mar 25, 2025
@Canop
Copy link
Owner

Canop commented Mar 25, 2025

I'll look into that.

In the meantime, you should be able to install broot with

cargo install broot --locked

@dominix
Copy link
Author

dominix commented Mar 25, 2025

Thanks, it works with --locked. I'm too newbie to know this yet.

@Canop
Copy link
Owner

Canop commented Mar 25, 2025

Using --locked is the prefered way to install any application, and how I describe it in https://dystroy.org/broot/install/#broot-installation.

What happens without --locked is that cargo doesn't use the version of the dependencies that are specified by the application maker but selects updated dependencies when available. And sometimes they're not compatible.

@Canop
Copy link
Owner

Canop commented Mar 25, 2025

I released a new version, which makes --locked useless (until another dependency has a breaking change in a minor/patch version).

@Canop Canop closed this as completed Mar 25, 2025
@dominix
Copy link
Author

dominix commented Mar 25, 2025

thanks @Canop for the good work. cheers from Uzes (Gard).

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

No branches or pull requests

2 participants