Skip to content

can't compile broot on ubuntu 24.04 #995

Closed
@dominix

Description

@dominix

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions