NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.27k forks source link

Rust 1.80.0 breaks some packages #332957

Open alyssais opened 3 months ago

alyssais commented 3 months ago

Dear maintainers,

Rust 1.80.0 contains a couple of changes that break some packages: an unfixable build regression, and a warning for unrecognized cfg values that some packages treat as an error. Most commonly, the required fix is just to update the "time" crate. I've opened PRs to fix as many regressions as I can, but I can't do all of them.

1.80.0 is currently in staging-next, so will probably be in Nixpkgs master in the next 1-2 weeks. It wasn't really feasible to hold back, because packages tend to start requiring new Rust versions very soon after release, and it also didn't make a lot of sense to keep 1.79.0 as well, because many of the affected packages haven't been touched in a year or more, so there'd be no assurance we'd be able to remove it any time soon.

So, some effort will be required from you to keep your package building with 1.80.0. Usually, the process will be like this:

As a last resort, we can patch if we need to, but especially for packages that include a Cargo.lock in Nixpkgs, this is a pain.

I'll post the affected packages in comments, because GitHub limits how many mentions an issue body can contain.

Sorry for the inconvenience. I've lost a lot of the last week to coordinating the update, collecting broken packages, etc., but hopefully by spreading out the work from here it won't take too much of anybody else's time.

NobbZ commented 3 months ago

[ ] rustic-rs @NobbZ

I just checked, 0.7.0 (most recent release) fails to build with rust 1.80 (per hydra logs). Though I was able to build current main of rustic locally.

I reached out to the maintainers of rustic to ask if a release is planned soonish.

Depending on the answer, I will try to find a good dev snapshot.

Builditluc commented 3 months ago

Opened https://github.com/NixOS/nixpkgs/pull/334569 for wiki-tui

matdibu commented 3 months ago

xen-guest-agent fixed this on their main branch 3 months ago: https://gitlab.com/xen-project/xen-guest-agent/-/commit/89aeb4eb98bb9b84cc6a38cede45c1846bcec20d we're running the lastest tag 0.4.0, which is 6 months old

should we bump xen-guest-agent to an unstable version? or should we wait for 0.5.0 ?

alyssais commented 3 months ago

It's your call as the package maintainer, but if you choose to wait, the package will be broken until then. Another option might be to backport the update — whatever you think is best.

alyssais commented 3 months ago

(staging-next merged)

msanft commented 3 months ago

Gossip was fixed in #334369

getchoo commented 3 months ago

Opened https://github.com/NixOS/nixpkgs/pull/334764 for av1an. Looks like upstream didn't make a new release in time :(

imincik commented 3 months ago

Created https://github.com/t-rex-tileserver/t-rex/issues/320 for t-rex.

NobbZ commented 3 months ago

A new release of rustic is scheduled soonish and should happen during the remainder of the month, I have therefore decided to not go through the hoops of patching the cargo file, but instead just go to the current dev snapshot, it didn't have any problems during my ~20 hour testphase.

334683

drupol commented 3 months ago

delta is broken:

delta>    Compiling ryu v1.0.16
delta>    Compiling time v0.3.31
delta>    Compiling miniz_oxide v0.7.1
delta>    Compiling bstr v1.9.0
delta> error[E0282]: type annotations needed for `Box<_>`
delta>   --> /build/delta-0.17.0-vendor.tar.gz/time/src/format_description/parse/mod.rs:83:9
delta>    |
delta> 83 |     let items = format_items
delta>    |         ^^^^^
delta> ...
delta> 86 |     Ok(items.into())
delta>    |              ---- type must be known at this point
delta>    |
delta> help: consider giving `items` an explicit type, where the placeholders `_` are specified
delta>    |
delta> 83 |     let items: Box<_> = format_items
delta>    |              ++++++++
delta> 
delta>    Compiling line-wrap v0.1.1
delta> For more information about this error, try `rustc --explain E0282`.
delta> error: could not compile `time` (lib) due to 1 previous error
delta> warning: build failed, waiting for other jobs to finish...
aws-sdk-cpp> source root is source
aws-sdk-cpp> Running phase: patchPhase
aws-sdk-cpp> substituteStream() in derivation aws-sdk-cpp-1.11.336: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'cmake/AWSSDKConfig.cmake')
alyssais commented 3 months ago

delta is broken:

Already tracked: https://github.com/NixOS/nixpkgs/issues/332957#issuecomment-2278578158.

tomodachi94 commented 3 months ago

Veloren tracked locally at https://github.com/NixOS/nixpkgs/issues/334931 and upstream at https://gitlab.com/veloren/veloren/-/issues/2005

nyarly commented 3 months ago

335154 fixes lorri; normally, we would backport our releases. Rust 1.80 isn't available in 24.05 though, correct? The change to time likely isn't an issue there, but now that we're targeting 1.80, it would be nice to make some other updates (there are PRs already e.g. for LazyLock)

alyssais commented 3 months ago

Rust 1.80 isn't available in 24.05 though, correct?

Correct.

emilazy commented 3 months ago

The fixes for Rust 1.80 should be backwards compatible, so bumping the MSRV in a way that breaks 1.79 (and hence Nixpkgs 24.05) compatibility is a separate decision.

philiptaron commented 3 months ago

https://github.com/NixOS/nixpkgs/pull/335266 fixes kakounePlugins.kakoune-lsp.

Mic92 commented 3 months ago

The fixes for Rust 1.80 should be backwards compatible, so bumping the MSRV in a way that breaks 1.79 (and hence Nixpkgs 24.05) compatibility is a separate decision.

We might backport rust 1.80 as a separate version at some point i.e. if would be required for firefox, but it's very unlikely that we would change the default rust version in 24.05.

nixos-discourse commented 3 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/rustc-explain-e0282-error-could-not-compile-time-lib/50765/2

Piturnah commented 3 months ago
* [ ]  gex @Azd325 @evanrichter @Piturnah

I have no issues building gex 0.6.4 with 1.80

alyssais commented 3 months ago

I have no issues building gex 0.6.4 with 1.80

Hydra does

emilazy commented 3 months ago

Looks like a libgit2 1.8 issue, rather than 1.80 per se. (They came in on the same staging cycle.)

henriquekirchheck commented 3 months ago

package zerotierone also seems to be broken and should be fixed with this pr zerotier/ZeroTierOne#2349

jonathan-conder commented 3 months ago

Here is a fix for neovim-gtk: https://github.com/NixOS/nixpkgs/pull/335518

knoopx commented 3 months ago

another broken rust package czkawka

alyssais commented 3 months ago

Also already tracked

AstrickHarren commented 3 months ago

Not sure if correct, but I'm seeing package delta 0.17.0 also not compiling.

Error Detail ```rust delta> --> /build/delta-0.17.0-vendor.tar.gz/time/src/format_description/parse/mod.rs:83:9 delta> | delta> 83 | let items = format_items delta> | ^^^^^ delta> ... delta> 86 | Ok(items.into()) delta> | ---- type must be known at this point delta> | delta> help: consider giving `items` an explicit type, where the placeholders `_` are specified delta> | delta> 83 | let items: Box<_> = format_items delta> | ++++++++ ```

However, I think delta updated to 0.18.0 just two days ago.

IQubic commented 3 months ago

easyeffects is also broken too, for much the same reasons. I assume it's time that's broken here, as that's what the compilation error implies.

s0me1newithhand7s commented 3 months ago

so.. how much time do we have?

NobbZ commented 3 months ago

Time for what exactly? The offending staging merge has happened, so whatever can't be build with rust 1.80 is broken right now.

The quicker you fix it, and PR to nixpkgs, the quicker the "package" will unbreak.

s0me1newithhand7s commented 3 months ago

Time for what exactly? The offending staging merge has happened, so whatever can't be build with rust 1.80 is broken right now.

The quicker you fix it, and PR to nixpkgs, the quicker the "package" will unbreak.

understood.

getchoo commented 3 months ago

easyeffects is also broken too

This was fixed in https://github.com/NixOS/nixpkgs/pull/334838, but it's only gotten to nixpkgs-unstable/nixos-unstable-small so far

Misterio77 commented 3 months ago

I think pam_rssh is also broken due to the same reason, but I haven't seen it on the list. https://hydra.nixos.org/build/269353263

xaverdh commented 3 months ago

bson and therefore jen is broken. This causes the build of runiq to fail. I opened https://github.com/NixOS/nixpkgs/pull/335826 to work around this, since making bson work with newer Rust seems like a major undertaking to me. while waiting for upstream

ofalvai commented 3 months ago

Here is a fix for swc: https://github.com/NixOS/nixpkgs/pull/335823

alyssais commented 3 months ago

@jjpe responding here to https://github.com/rust-lang/rust/issues/127343#issuecomment-2295313993, because it would be OT in the Rust thread.

We do not need upstream maintenance to fix this regression. It can be fixed with a trivial downstream patch, and that's already happened in lots of cases. An upstream fix is of course preferable, but we don't need to have any one of these packages broken indefinitely.

alyssais commented 3 months ago

I think pam_rssh is also broken due to the same reason, but I haven't seen it on the list. https://hydra.nixos.org/build/269353263

It's in this one: https://github.com/NixOS/nixpkgs/issues/332957#issuecomment-2278578811

Seppel3210 commented 3 months ago

made a pr for elan #336417

JanLikar commented 3 months ago

PR for cargo-clone: #337058.

hatch01 commented 3 months ago

Working on rustdesk #337324

samueltardieu commented 2 months ago

I submitted a patch for cargo-info: https://gitlab.com/imp/cargo-info/-/merge_requests/9

samueltardieu commented 2 months ago

I submitted a package upgrade request for rtz: https://github.com/NixOS/nixpkgs/pull/337471

sgillespie commented 2 months ago

I believe https://github.com/NixOS/nixpkgs/pull/336278 should have fixed this for iamb

GoldsteinE commented 2 months ago

Submitted a patch for silicon: https://github.com/NixOS/nixpkgs/pull/337499

gepbird commented 2 months ago

cc @MDM23 for maintaining surrealist

samueltardieu commented 2 months ago

New release requested for mchprs: https://github.com/MCHPR/MCHPRS/issues/159

aqrln commented 2 months ago

Prisma 5.19 will be released today with the changes that make it compile with Rust 1.80, prisma-engines will be bumped in https://github.com/NixOS/nixpkgs/pull/337521.

Luflosi commented 2 months ago

karlender also fails to compile, see https://gitlab.com/floers/karlender/-/issues/45.

MDM23 commented 2 months ago

The issue is present in the surrealist version in master (currently at 2.0.6). I'm working on preparing an update for a while now (https://github.com/NixOS/nixpkgs/pull/335619). However, there are still some difficulties.

The newer versions require tauri 2.0. I managed to provide this version but this may conflicts with the changes in https://github.com/NixOS/nixpkgs/pull/335751. Still have to check this out in detail.

But more important, there is an issue with a missing optional dependency (hyper-tls). I believe that this has something to do with this Cargo bug.

MDM23 commented 2 months ago

Managed to update surrealist. The issue will be fixed with https://github.com/NixOS/nixpkgs/pull/335619.

VuiMuich commented 2 months ago

I submitted a patch for cargo-info: https://gitlab.com/imp/cargo-info/-/merge_requests/9

I submitted https://github.com/NixOS/nixpkgs/pull/338155 in case it takes upstream a while to release the new version.