Build failure: Boehm-gc-8.2.6, Nixos-24.05

When trying to switch to Nixos 24.05 the boehm-gc package breaks because of invalid patch. I believe it is this patch nixpkgs/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch at 0b8e7a1ae5a94da2e1ee3f3030a32020f6254105 · NixOS/nixpkgs · GitHub that breaks, but i am not expert sadly :frowning:

System: x86_64-linux

Full logs:

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/1knirm8jgazkcgnrv72bajb3vlg039wd-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/cpgchyx53f8yrqcawj2zxqh1v2ji8bxs-boehmgc-coroutine-sp-fallback.diff
patching file darwin_stop_world.c
Hunk #1 succeeded at 364 (offset 8 lines).
Hunk #2 succeeded at 420 (offset 8 lines).
patching file include/gc.h
Hunk #1 succeeded at 2188 (offset 16 lines).
patching file pthread_stop_world.c
Hunk #1 succeeded at 776 (offset 8 lines).
Hunk #2 FAILED at 853.
1 out of 2 hunks FAILED -- saving rejects to file pthread_stop_world.c.rej

Is this associated with the upgrade from boehm-gc-8.2.4 → boehm-gc-8.2.6?
Are there any workarounds?

1 Like

I have a similar one - I think there’s multiple conflicting patches getting applied, I tried to fix with an overlay to get boehmgc to work just applying this patch. To do this I set the array to , then in the patch phase I did patch -p1 < {my-patch-here}.

However, afterwards I got a unit test failure in nix on one test (in multiple versions of nix)

I experiment the same issue when trying to build latex Nix versions (from 2.19 to 2.22+) directly from the github:nixos/nix flake, on a pretty Linux system. I don’t understand why this isn’t hitting everyone out there.

[EDIT: in fact I’m trying to build an older Nix with latest Nixpkgs, which has Boehmgc 8.2.6 - the latter seems to have made a patch obsolete, but those older versions of Nix don’t know that and are still applying it]