Rustc --explain E0282; error: could not compile `time` (lib)

I recently started getting errors when building my system. There are a number of packages that no longer build. I have had to remove them from my configuration in order to get my system to build.

They all give the same error message:

For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error

The packages that won’t build are:

  • kakoune-lsp
  • ctpv
  • easyeffects
  • uair

Is this a problem with an upstream rust library that I just need to wait to be fixed? Is there anything I can do in the mean time? When this type of thing happens, can I roll back to a previous version of an package to see if it will build?

2 Likes
2 Likes

The error is because the rust compiler made a small breaking change, which causes old versions of time to no longer compile. See, e.g., here: `time` crate compilation error - #2 by DatoClement - help - The Rust Programming Language Forum

The fix is to update dependencies/to a newer version for those affected packages (or to compile them with an older rustc version, but well, not the ideal solution).

1 Like

Also for easyeffects, this was due to a dep (deepfilternet) which was fixed in deepfilternet: fix compilation with Rust 1.80 by Mrmaxmeier · Pull Request #334838 · NixOS/nixpkgs · GitHub.

So yeah for a lot of these, the answer is to just wait a couple days until it lands in nixos-unstable.