broot: Broot fails to compile with cargo install

Broot fails to compile and this is the error message

error[E0432]: unresolved import `nix::sys::epoll`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:41:19
   |
41 |     use nix::sys::epoll::*;
   |                   ^^^^^ could not find `epoll` in `sys`

error[E0433]: failed to resolve: use of undeclared type `EpollCreateFlags`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:49:33
   |
49 |     let poll_fd = epoll_create1(EpollCreateFlags::empty())?;
   |                                 ^^^^^^^^^^^^^^^^ use of undeclared type `EpollCreateFlags`

error[E0433]: failed to resolve: use of undeclared type `EpollEvent`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:50:21
   |
50 |     let mut event = EpollEvent::new(EpollFlags::EPOLLIN, 0);
   |                     ^^^^^^^^^^ use of undeclared type `EpollEvent`

error[E0433]: failed to resolve: use of undeclared type `EpollFlags`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:50:37
   |
50 |     let mut event = EpollEvent::new(EpollFlags::EPOLLIN, 0);
   |                                     ^^^^^^^^^^ use of undeclared type `EpollFlags`

error[E0433]: failed to resolve: use of undeclared type `EpollOp`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:53:9
   |
53 |         EpollOp::EpollCtlAdd,
   |         ^^^^^^^ use of undeclared type `EpollOp`

   Compiling proc-status v0.1.1
error[E0433]: failed to resolve: use of undeclared type `EpollEvent`
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:57:23
   |
57 |     let mut events = [EpollEvent::empty(); 1];
   |                       ^^^^^^^^^^ use of undeclared type `EpollEvent`

error[E0425]: cannot find function `epoll_create1` in this scope
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:49:19
   |
49 |     let poll_fd = epoll_create1(EpollCreateFlags::empty())?;
   |                   ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `epoll_ctl` in this scope
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:51:5
   |
51 |     epoll_ctl(
   |     ^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `epoll_wait` in this scope
  --> /Users/nagybotond/.cargo/registry/src/github.com-1ecc6299db9ec823/xterm-query-0.1.0/src/lib.rs:58:20
   |
58 |     let fd_count = epoll_wait(poll_fd, &mut events, timeout_ms)?;
   |                    ^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `xterm-query` due to 9 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `broot v1.14.0`, intermediate artifacts can be found at `/var/folders/18/br1lcr9s0js75bc8l464y8_m0000gn/T/cargo-installgrscap`

uname -a Darwin computer.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64

cargo --version cargo 1.64.0-nightly (c0bbd42ce 2022-07-03)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Okay so I commented out lines 18-35 in luma.rs and this:

you also need to remove

https://github.com/Canop/broot/blob/3454e1efa0c90b8680c130e6b98ee87cb85a4f8c/Cargo.toml#L62

and of course don’t use the feature https://github.com/Canop/broot/blob/3454e1efa0c90b8680c130e6b98ee87cb85a4f8c/Cargo.toml#L20

and it compiles and works

@0323pin I’m interested by making it work on all platforms. I’m more focused in macos when looking for testers because it’s where I have most unsuspected surprises, but please do register too.

Builds on MacOS (12, M1) with the new commit too!

OK, let’s release the 1.4.1

@westernwontons Sorry I didn’t wait for you, this was kind of urgent

@Canop All good on NetBSD, it build successfully.

How many users at Apple do I need before they give me a mac to test my apps ? ^^

if you can use the relevant #cfg blocking the relevant code in case of os=macos, yes I’d appreciate it as it would be tested.

I’ll see what I can do, but no promises, I’m not that experienced of a Rustacean

macos doesn’t support epoll, it have a thing call kqueue. I think mio could be used to replace the call of epoll in xterm-query