NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.72k stars 13.85k forks source link

Build failure: qemu #344013

Closed plaflamme closed 2 weeks ago

plaflamme commented 2 weeks ago

Steps To Reproduce

In my case, this is happening when trying to switch to my configuration after updating flake dependencies, so, something like:

darwin-rebuild switch --flake .

I believe qemu is being brough in from pkgs.colima

Build log

error: builder for '/nix/store/czyw7yx2ywwf7bzndsdkmc9zlfsh5qpa-qemu-9.1.0.drv' failed with exit code 1;
       last 10 log lines:
       > [960/6499] Compiling C object libblock.a.p/block_stream.c.o
       > [961/6499] Compiling C object libblock.a.p/block_curl.c.o
       > [962/6499] Compiling C object libblockdev.a.p/block_export_export.c.o
       > [963/6499] Compiling C object libblockdev.a.p/job-qmp.c.o
       > [964/6499] Compiling C object libblockdev.a.p/blockdev-nbd.c.o
       > [965/6499] Compiling C object libblockdev.a.p/iothread.c.o
       > [966/6499] Compiling C object libblock.a.p/block_iscsi.c.o
       > [967/6499] Compiling C object libblockdev.a.p/blockdev.c.o
       > [968/6499] Compiling C object libblockdev.a.p/nbd_server.c.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/czyw7yx2ywwf7bzndsdkmc9zlfsh5qpa-qemu-9.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/lwjxxnslgdfcdq5lj9mlcm0004lgmc6y-colima-0.7.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g9cvlygapzawvr89kjs1d92p61hbrb5g-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qp1bvhb3grqzprd8rvy0k9hpqh8965ac-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8v28nchmdnjvgfgaparbd9fk29ax7mnx-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/77pr1fbwwfd8fbirzjv5rn3j8hp1lqx7-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7acyh4vrxkq983kgq736rd5h9gpn0vrb-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qwsqlkl1hcggwpw4wkkpwqlrsjj3mh4w-activation-philippe.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hv1l74jma035y9znf6x5ilk5ykxps9j2-darwin-system-24.11.20240906.574d1ea+darwin4.7655918.drv' failed to build

And the derivation log itself is attached:

build.txt

Additional context

N/A

Notify maintainers

Metadata

❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.7`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

ghpzin commented 2 weeks ago

You probably need to update, this is the failure on hydra (2024-09-05): /nix/store/czyw7yx2ywwf7bzndsdkmc9zlfsh5qpa-qemu-9.1.0.drv https://hydra.nixos.org/build/271629971 There should be 2 new builds after that were successful: https://hydra.nixos.org/job/nixpkgs/trunk/qemu.aarch64-darwin

plaflamme commented 2 weeks ago

@ghpzin Thanks, yeah, I'm pretty sure my flake is on the latest, I did:

> nix flake update
> git add -A && git commit -m "nix flake update"
> darwin-rebuild switch --flake .

And I get the same error. Not sure what else I need to do here. As far as I can tell, my flake.lock file says my nixpkgs-unstable dependency is using revision 9357f4f23713673f310988025d9dc261c20e70c6

NotAShelf commented 2 weeks ago

What channel are you following? Latest nixos-unstable buildspkgs.colima` just fine in my case.

plaflamme commented 2 weeks ago

Here's my flake inputs:

inputs = {
  nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
  nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
  nixpkgs.follows = "nixpkgs-unstable";
  flakelight = {
    url = "github:nix-community/flakelight";
    inputs.nixpkgs.follows = "nixpkgs-unstable";
  };
  flakelight-darwin.url = "github:cmacrae/flakelight-darwin";
  home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs-unstable";
  };
  nixos-generators = {
    url = "github:nix-community/nixos-generators";
    inputs.nixpkgs.follows = "nixpkgs-stable";
  };
  k0s.url = "github:johbo/k0s-nix";
  lanzaboote = {
    url = "github:nix-community/lanzaboote";
    inputs.nixpkgs.follows = "nixpkgs-unstable";
  };
};

Probably did something wrong, my nix-foo is not particularly good.

ghpzin commented 2 weeks ago

flakelight-darwin.url = "github:cmacrae/flakelight-darwin";

This does not have follows and uses nixpkgs from 3 weeks ago (around the time that qemu build failure happened): https://github.com/cmacrae/flakelight-darwin/blob/3e211e1cf6e4b08e1669dd96db911809c027f273/flake.lock#L48 But after looking, it seems to take nixpkgs in some other input there. You probably want follows there with something that uses your pinned nixpkgs (nix-darwin and flakelight ?)

plaflamme commented 2 weeks ago

I see. I misread this line; I assumed this meant it was using whatever flakelight was following. I'll dig around to see how to specify its nixpkgs dependency. Sorry for the noise.

ghpzin commented 2 weeks ago

That may be correct, but your flakelight-darwin does not follow your flakelight either. It is just what was there at the time they generated flake.lock.

plaflamme commented 2 weeks ago

Indeed! Looks like adding inputs.flakelight.follows = "flakelight"; to flakelight-darwin did the trick. Thanks!