Install to existing darwin config fails on building gc #449

Closed
opened 2024-07-15 02:19:44 +00:00 by puqeko · 6 comments

Platform

  • Linux:
  • macOS (intel x86, Ventura 13.6.3)
  • WSL

Additional information

  • Followed installation instructions for Flake-based configurations to install Lix 2.90 as recommended.
  • Lix module configured with nixpkgs/24.05.
  • Might be related to #446 "gc" failure? I cannot view the build outputs referenced there.
$ nix --version
nix (Nix) 2.18.1
$ darwin-version                                    
23.11.20231129.057f9ae+darwin4.283d597

Output

Output

For command darwin-rebuild switch --flake ~/.config/nix-darwin.

building the system configuration...
error: builder for '/nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv' failed with exit code 1;
       last 10 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/nsn87chkfybpsildscrgd5mla673d11p-gc-8.2.2.tar.gz
       > source root is gc-8.2.2
       > setting SOURCE_DATE_EPOCH to timestamp 1661539506 of file gc-8.2.2/test-driver
       > patching sources
       > applying patch /nix/store/yh1x0lv9hi3j90b2cnczd1mf0fhijir7-boehmgc-coroutine-sp-fallback.diff
       > patching file pthread_stop_world.c
       > Hunk #1 succeeded at 768 (offset -8 lines).
       > Hunk #2 FAILED at 870.
       > 1 out of 2 hunks FAILED -- saving rejects to file pthread_stop_world.c.rej
       For full logs, run 'nix log /nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv'.
error: 1 dependencies of derivation '/nix/store/h0ls2xaxv9cwn5b57sghdmj4fn4d4xz9-lix-2.90.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7659zpnj0invqkm3hsb266z81ac0mk7s-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1dywpxf6k85y3hva0nfqskqbwn55xswb-nix.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/88hvlzam6msf6mrcl7m0q025fvpl8mxz-org.nixos.nix-daemon.plist.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pnhxhngsmlrwndx3prb9j9z9mn5kzx45-system-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hcf453l2g3dj5lpr70vrza6jkn0kqz21-darwin-system-23.11.20231129.057f9ae+darwin4.283d597

## Platform <!-- select the platform on which you tried to install Lix --> - [ ] Linux: <!-- state your distribution, e.g. Arch Linux, Ubuntu, ... --> - [x] macOS (intel x86, Ventura 13.6.3) - [ ] WSL ## Additional information <!-- state special circumstances on your system or additional steps you have taken prior to installation --> * Followed installation instructions for [Flake-based configurations](https://lix.systems/add-to-config/#flake-based-configurations) to install Lix 2.90 as [recommended](https://lix.systems/install/). * Lix module configured with nixpkgs/24.05. * Might be related to #446 "gc" failure? I cannot view the build outputs referenced there. ```shell $ nix --version nix (Nix) 2.18.1 $ darwin-version 23.11.20231129.057f9ae+darwin4.283d597 ``` ## Output <details><summary>Output</summary> For command `darwin-rebuild switch --flake ~/.config/nix-darwin`. ```log building the system configuration... error: builder for '/nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv' failed with exit code 1; last 10 log lines: > unpacking sources > unpacking source archive /nix/store/nsn87chkfybpsildscrgd5mla673d11p-gc-8.2.2.tar.gz > source root is gc-8.2.2 > setting SOURCE_DATE_EPOCH to timestamp 1661539506 of file gc-8.2.2/test-driver > patching sources > applying patch /nix/store/yh1x0lv9hi3j90b2cnczd1mf0fhijir7-boehmgc-coroutine-sp-fallback.diff > patching file pthread_stop_world.c > Hunk #1 succeeded at 768 (offset -8 lines). > Hunk #2 FAILED at 870. > 1 out of 2 hunks FAILED -- saving rejects to file pthread_stop_world.c.rej For full logs, run 'nix log /nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv'. error: 1 dependencies of derivation '/nix/store/h0ls2xaxv9cwn5b57sghdmj4fn4d4xz9-lix-2.90.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/7659zpnj0invqkm3hsb266z81ac0mk7s-activation-script.drv' failed to build error: 1 dependencies of derivation '/nix/store/1dywpxf6k85y3hva0nfqskqbwn55xswb-nix.conf.drv' failed to build error: 1 dependencies of derivation '/nix/store/88hvlzam6msf6mrcl7m0q025fvpl8mxz-org.nixos.nix-daemon.plist.drv' failed to build error: 1 dependencies of derivation '/nix/store/pnhxhngsmlrwndx3prb9j9z9mn5kzx45-system-applications.drv' failed to build error: 1 dependencies of derivation '/nix/store/hcf453l2g3dj5lpr70vrza6jkn0kqz21-darwin-system-23.11.20231129.057f9ae+darwin4.283d597 ``` </details>
Owner

we're not super familiar with nix-darwin, but if darwin-version claims to be 23.11 and you're setting flake follows for lix, are you actually getting nixpkgs 24.05 for building lix? (23.11 is no longer supported for building lix due to gc compat issues that look exactly like what you're running into: f7b6552699)

we're not super familiar with nix-darwin, but if darwin-version claims to be 23.11 and you're setting flake follows for lix, are you actually getting nixpkgs 24.05 for building lix? (23.11 is no longer supported for building lix due to gc compat issues that look exactly like what you're running into: f7b655269965ed30d2fb15d2da5f5e1b0c0a61b5)
Author

Lix is following 24.05 as best I can tell. It's configured as

next.url = "nixpkgs/24.05";
lix = {
  url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
  inputs.nixpkgs.follows = "next";
};

Below it shows Lix following nixpkgs commit 7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9.

Output
warning: updating lock file '/Users/puqeko/.config/nix-darwin/flake.lock':
• Updated input 'lix/nixpkgs':
    'github:nixos/nixpkgs/7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9' (2024-07-12)
  → follows 'next'
warning: Git tree '/Users/puqeko/.config/nix-darwin' is dirty
building the system configuration...
warning: Git tree '/Users/puqeko/.config/nix-darwin' is dirty
error: builder for '/nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv' failed with exit code 1;
       last 10 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/nsn87chkfybpsildscrgd5mla673d11p-gc-8.2.2.tar.gz
       > source root is gc-8.2.2
       > setting SOURCE_DATE_EPOCH to timestamp 1661539506 of file gc-8.2.2/test-driver
       > patching sources
       > applying patch /nix/store/yh1x0lv9hi3j90b2cnczd1mf0fhijir7-boehmgc-coroutine-sp-fallback.diff
       > patching file pthread_stop_world.c
       > Hunk #1 succeeded at 768 (offset -8 lines).
       > Hunk #2 FAILED at 870.
       > 1 out of 2 hunks FAILED -- saving rejects to file pthread_stop_world.c.rej
       For full logs, run 'nix log /nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv'.
error: 1 dependencies of derivation '/nix/store/h0ls2xaxv9cwn5b57sghdmj4fn4d4xz9-lix-2.90.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7659zpnj0invqkm3hsb266z81ac0mk7s-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1dywpxf6k85y3hva0nfqskqbwn55xswb-nix.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/88hvlzam6msf6mrcl7m0q025fvpl8mxz-org.nixos.nix-daemon.plist.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pnhxhngsmlrwndx3prb9j9z9mn5kzx45-system-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n21yxx57ix69nglg2cini2rvrvxjrngn-darwin-system-23.11.20231129.057f9ae+darwin4.283d597.drv' failed to build

You're right though that it does seem like I'm running into exactly that issue. Unfortunately, I can't move darwin itself to 24.05 yet, pending fixes

Lix is following 24.05 as best I can tell. It's configured as ```nix next.url = "nixpkgs/24.05"; lix = { url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; inputs.nixpkgs.follows = "next"; }; ``` Below it shows Lix following nixpkgs commit `7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9`. <details> <summary>Output</summary> ``` warning: updating lock file '/Users/puqeko/.config/nix-darwin/flake.lock': • Updated input 'lix/nixpkgs': 'github:nixos/nixpkgs/7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9' (2024-07-12) → follows 'next' warning: Git tree '/Users/puqeko/.config/nix-darwin' is dirty building the system configuration... warning: Git tree '/Users/puqeko/.config/nix-darwin' is dirty error: builder for '/nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv' failed with exit code 1; last 10 log lines: > unpacking sources > unpacking source archive /nix/store/nsn87chkfybpsildscrgd5mla673d11p-gc-8.2.2.tar.gz > source root is gc-8.2.2 > setting SOURCE_DATE_EPOCH to timestamp 1661539506 of file gc-8.2.2/test-driver > patching sources > applying patch /nix/store/yh1x0lv9hi3j90b2cnczd1mf0fhijir7-boehmgc-coroutine-sp-fallback.diff > patching file pthread_stop_world.c > Hunk #1 succeeded at 768 (offset -8 lines). > Hunk #2 FAILED at 870. > 1 out of 2 hunks FAILED -- saving rejects to file pthread_stop_world.c.rej For full logs, run 'nix log /nix/store/830qs1nl0xnn8l8waz9wyhwfcqlcndhf-boehm-gc-8.2.2.drv'. error: 1 dependencies of derivation '/nix/store/h0ls2xaxv9cwn5b57sghdmj4fn4d4xz9-lix-2.90.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/7659zpnj0invqkm3hsb266z81ac0mk7s-activation-script.drv' failed to build error: 1 dependencies of derivation '/nix/store/1dywpxf6k85y3hva0nfqskqbwn55xswb-nix.conf.drv' failed to build error: 1 dependencies of derivation '/nix/store/88hvlzam6msf6mrcl7m0q025fvpl8mxz-org.nixos.nix-daemon.plist.drv' failed to build error: 1 dependencies of derivation '/nix/store/pnhxhngsmlrwndx3prb9j9z9mn5kzx45-system-applications.drv' failed to build error: 1 dependencies of derivation '/nix/store/n21yxx57ix69nglg2cini2rvrvxjrngn-darwin-system-23.11.20231129.057f9ae+darwin4.283d597.drv' failed to build ``` </details> You're right though that it does seem like I'm running into exactly that issue. Unfortunately, I can't move darwin itself to 24.05 yet, pending fixes
Owner

you're clearly getting boehmgc from 23.11 though. no idea why that would be, we're entirely unfamiliar with nix-darwin and how that may interact. :/ actually scratch that bit, if you're just using the overlay the nixpkgs input to lix-project/nixos-module doesn't matter at all. you'll have to update nix-darwin (or do some really bad overlay tricks pulling a flake-built lix into your 23.11 nixpkgs-based system, which we cannot recommend)

you're clearly getting boehmgc from 23.11 though. ~~no idea why that would be, we're entirely unfamiliar with nix-darwin and how that may interact. :/~~ actually scratch that bit, if you're just using the overlay the nixpkgs input to lix-project/nixos-module doesn't matter *at all*. you'll have to update nix-darwin (or do some really bad overlay tricks pulling a flake-built lix into your 23.11 nixpkgs-based system, which we cannot recommend)
Author

I agree. Cheers for the replies though. I'll investigate to see if it's a nix-darwin issue and report back if I find anything

Interesting. I'll see what I can do about upgrading nix-darwin. Thank you for the help

<del>I agree. Cheers for the replies though. I'll investigate to see if it's a nix-darwin issue and report back if I find anything</del> Interesting. I'll see what I can do about upgrading nix-darwin. Thank you for the help
Author

Install successful with upgrade to nix-darwin 24.05.

Install successful with upgrade to nix-darwin 24.05.
Owner

for future context: the version of nixpkgs used by lix and the lix-module do not affect anything if you are using it as an overlay, which is how you would have to be using it here. that input exists for our own testing/validation in lix-nixos-module but the overlay is code that doesn't reference it at all, since it's handed the nixpkgs from outside as final/prev.

it is using the version of nixpkgs the overlay is evaluated into, which in this case was 23.11

for future context: the version of nixpkgs used by lix and the lix-module do not affect anything if you are using it as an overlay, which is how you would have to be using it here. that input exists for our own testing/validation in lix-nixos-module but the overlay is code that doesn't reference it at all, since it's handed the nixpkgs from outside as final/prev. it is using the version of nixpkgs the overlay is evaluated into, which in this case was 23.11
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#449
No description provided.