Skip to content

1.20.3 doesn't build against rust 1.82.0

I get build failures due to this:

error[E0432]: unresolved import `mio::unix`
  --> src/async_handle.rs:38:10
   |
38 | use mio::unix::SourceFd;
   |          ^^^^ could not find `unix` in `mio`
   |
note: found an item that was configured out
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:74:9
   |
74 | pub mod unix {
   |         ^^^^
note: the item is gated here
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:72:1
   |
72 | #[cfg(all(unix, feature = "os-ext"))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not document `libnbd`
   Compiling libc v0.2.164
   Compiling pin-project-lite v0.2.15
   Compiling log v0.4.22
   Compiling bitflags v2.6.0
   Compiling thiserror v1.0.69
make[2]: *** [Makefile:1166: target/doc/libnbd/index.html] Error 101
make[2]: *** Waiting for unfinished jobs....
   Compiling socket2 v0.5.7
   Compiling mio v1.0.2
   Compiling libnbd-sys v0.1.0 (/build/libnbd/src/libnbd-1.20.3/rust/libnbd-sys)
   Compiling errno v0.3.9
   Compiling mio v0.8.11
   Compiling os_socketaddr v0.2.5
   Compiling tokio v1.41.1
   Compiling libnbd v0.1.0 (/build/libnbd/src/libnbd-1.20.3/rust)
error[E0432]: unresolved import `mio::unix`
  --> src/async_handle.rs:38:10
   |
38 | use mio::unix::SourceFd;
   |          ^^^^ could not find `unix` in `mio`
   |
note: found an item that was configured out
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:74:9
   |
74 | pub mod unix {
   |         ^^^^
note: the item is gated here
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:72:1
   |
72 | #[cfg(all(unix, feature = "os-ext"))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `new` found for struct `mio::Poll` in the current scope
   --> src/async_handle.rs:182:26
    |
182 |     let mut poll = Poll::new()?;
    |                          ^^^ function or associated item not found in `mio::Poll`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libnbd` (lib) due to 2 previous errors
   Compiling rustix v0.38.41
   Compiling bitflags v2.6.0
   Compiling anyhow v1.0.93
   Compiling linux-raw-sys v0.4.14
   Compiling rand_core v0.6.4
   Compiling cfg-if v1.0.0
   Compiling fastrand v2.2.0
   Compiling once_cell v1.20.2
   Compiling pretty-hex v0.3.0
   Compiling syn v2.0.89
make[2]: *** [Makefile:1163: target/debug/liblibnbd.rlib] Error 101
   Compiling rand v0.8.5
   Compiling tempfile v3.14.0
   Compiling tokio-macros v2.4.0
   Compiling thiserror-impl v1.0.69
   Compiling tokio v1.41.1
   Compiling thiserror v1.0.69
   Compiling libnbd v0.1.0 (/build/libnbd/src/libnbd-1.20.3/rust)
error[E0432]: unresolved import `mio::unix`
  --> src/async_handle.rs:38:10
   |
38 | use mio::unix::SourceFd;
   |          ^^^^ could not find `unix` in `mio`
   |
note: found an item that was configured out
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:74:9
   |
74 | pub mod unix {
   |         ^^^^
note: the item is gated here
  --> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/lib.rs:72:1
   |
72 | #[cfg(all(unix, feature = "os-ext"))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `new` found for struct `mio::Poll` in the current scope
   --> src/async_handle.rs:182:26
    |
182 |     let mut poll = Poll::new()?;
    |                          ^^^ function or associated item not found in `mio::Poll`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libnbd` (lib) due to 2 previous errors
make[2]: *** [Makefile:1170: target/debug/examples/get-size] Error 101
make[2]: Leaving directory '/build/libnbd/src/libnbd-1.20.3/rust'
make[1]: *** [Makefile:571: all-recursive] Error 1
make[1]: Leaving directory '/build/libnbd/src/libnbd-1.20.3'
make: *** [Makefile:496: all] Error 2

This is using rust 1.82.0 on Arch Linux.