Linux Kernel 6.8.6 Build Failure

Description

Running nix flake update causes the Linux kernel build (6.8.6) to fail.

Current System

Kernel Build Error

error: builder for '/nix/store/wb9s0chxw68rkblklmhs4jb4sxxrfax6-linux-6.8.6.drv' failed with exit code 2;                                                                                                                                                                                                                     
       last 10 log lines:                                                                                                                                                                                                                                                                                                     
       >   CC [M]  drivers/iio/light/vcnl4035.o                                                                                                                                                                                                                                                                               
       >   CC [M]  drivers/iio/light/veml6030.o                                                                                                                                                                                                                                                                               
       >   CC [M]  drivers/iio/light/veml6070.o                                                                                                                                                                                                                                                                               
       >   CC [M]  drivers/iio/light/veml6075.o                                                                                                                                                                                                                                                                               
       >   LD [M]  drivers/iio/pressure/bmp280.o                                                                                                                                                                                                                                                                              
       >   LD [M]  drivers/iio/pressure/st_pressure.o                                                                                                                                                                                                                                                                         
       >   CC [M]  drivers/iio/light/vl6180.o                                                                                                                                                                                                                                                                                 
       >   CC [M]  drivers/iio/light/zopt2201.o                                                                                                                                                                                                                                                                               
       > make[1]: *** [/build/linux-6.8.6-libre-src/Makefile:1921: .] Error 2                                                                                                                                                                                                                                                 
       > make: *** [../Makefile:240: __sub-make] Error 2                                                                                                                                                                                                                                                                      
       For full logs, run 'nix log /nix/store/wb9s0chxw68rkblklmhs4jb4sxxrfax6-linux-6.8.6.drv'.                                                                                                                                                                                                                              
error: 1 dependencies of derivation '/nix/store/99jjh80rc6kr8bccjgwgg3404sns47i0-new-lg4ff-0.4.0.drv' failed to build                                                                                                                                                                                                         
error: 1 dependencies of derivation '/nix/store/ch6wnvvz39f029br8s0kwipm48qa5a5x-system-path.drv' failed to build                                                                                                                                                                                                             
error: 1 dependencies of derivation '/nix/store/nzm4y6mdb8yb5jsxr0vf5l08ziq4lb5x-nixos-system-nixos-desktop-gnome-23.11.20240415.53a2c32.drv' failed to build

The configuration, or a version of it, works on a VM and on my Framework laptop, however, this occurs on my desktop.

Troubleshooting

I’ve tried reverting to the un-updated flake.lock, building my system, rebooting, running nix flake update, then re-building.

Even after changing boot.kernelPackages to pkgs.linuxPackages_6_6 sudo nixos-rebuild switch --flake ./ still attempts to build kenerl version 6.8.6. The only way I’ve found around this is reverting to the old flake.lock.

I really don’t even know where to start. I believe this line in the Linux Makefile is the exit point of the error.

My Configuration

This is my configuration and these files are most likely to be relevant:

Workaround

If the solution isn’t obvious to others, maybe I could manually select the exact version of the kernel?

Top & Bottom of Nix Log Output

Output of nix log /nix/store/<hash>-linux-6.8.6.drv:

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/azqbrvx08fsh88znb902250zisdlii3z-linux-6.8.6-libre-src
source root is linux-6.8.6-libre-src
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/mnlqwys9dxznjcvq4w3s0435s9ql8qv8-bridge-stp-helper.patch
patching file net/bridge/br_private.h
Hunk #1 succeeded at 51 with fuzz 2 (offset 12 lines).
applying patch /nix/store/mbz5gln1q4swlzmqs2399br98qjif9kn-request-key-helper.patch
patching file security/keys/request_key.c
Hunk #1 succeeded at 117 (offset 3 lines).
applying patch /nix/store/23728y7zgh1jb55kpwxv5qnjbq0ykca6-randstruct-provide-seed-5.19.patch
patching file scripts/gen-randstruct-seed.sh
Hunk #1 succeeded at 1 with fuzz 1.
patching script interpreter paths in scripts/ld-version.sh
patching script interpreter paths in scripts
scripts/get_abi.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/checkincludes.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/kconfig/streamline_config.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/split-man.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/diffconfig: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/markup_oops.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/export_report.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/parse-maintainers.pl: interpreter directive changed from "#!/usr/bin/perl -w" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl -w"
scripts/checkdeclares.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/get_maintainer.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/tracing/draw_functrace.py: interpreter directive changed from "#!/usr/bin/env python" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python"
scripts/documentation-file-ref-check: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/checkstack.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/checkkconfigsymbols.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/rust_is_available_test.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/clang-tools/gen_compile_commands.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/clang-tools/run-clang-tools.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/bpf_doc.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/dtc/dt_to_config: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/dtc/of_unittest_expect: interpreter directive changed from "#!/usr/bin/perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/dtc/dt-extract-compatibles: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/checkpatch.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/checkversion.pl: interpreter directive changed from "#! /usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/kernel-doc: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/extract-sys-certs.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/generate_initcall_order.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/cleanpatch: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/bloat-o-meter: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/show_delta: interpreter directive changed from "#!/usr/bin/env python" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python"
scripts/generate_rust_analyzer.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/recordmcount.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/leaking_addresses.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/sphinx-pre-install: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/stackdelta: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/spdxcheck.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/get_feat.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/cleanfile: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/jobserver-exec: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8/bin/python3"
scripts/profile2linkerlist.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/headerdep.pl: interpreter directive changed from "#! /usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/bootgraph.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
scripts/extract-module-sig.pl: interpreter directive changed from "#!/usr/bin/env perl" to "/nix/store/40rr7blrifwcfzxih97y79qvh07ycakh-perl-5.38.2/bin/perl"
patching script interpreter paths in arch/riscv/boot/install.sh
patching script interpreter paths in arch/powerpc/boot/install.sh
patching script interpreter paths in arch/nios2/boot/install.sh
patching script interpreter paths in arch/s390/boot/install.sh
patching script interpreter paths in arch/arm64/boot/install.sh
patching script interpreter paths in arch/sparc/boot/install.sh
patching script interpreter paths in arch/arm/boot/install.sh
patching script interpreter paths in arch/parisc/install.sh
patching script interpreter paths in arch/x86/boot/install.sh
patching script interpreter paths in arch/m68k/install.sh
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
manual-config configurePhase buildRoot=/build/linux-6.8.6-libre-src/build pwd=/build/linux-6.8.6-libre-src
'/build/linux-6.8.6-libre-src/build/.config' -> '/nix/store/pfxpvkm1g4kw5mapindcx6ddjrryhw3a-linux-config-6.8.6'
make[1]: Entering directory '/build/linux-6.8.6-libre-src/build'
  GEN     Makefile
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# No change to .config
#
make[1]: Leaving directory '/build/linux-6.8.6-libre-src/build'
make[1]: Entering directory '/build/linux-6.8.6-libre-src/build'
  GEN     arch/x86/include/generated/asm/orc_hash.h
  GEN     Makefile
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
  HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  HOSTCC  scripts/asn1_compiler
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/errno.h
  WRAP    arch/x86/include/generated/uapi/asm/fcntl.h
  WRAP    arch/x86/include/generated/uapi/asm/ioctl.h
  WRAP    arch/x86/include/generated/uapi/asm/ioctls.h
  WRAP    arch/x86/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/x86/include/generated/uapi/asm/param.h
  WRAP    arch/x86/include/generated/uapi/asm/poll.h
  WRAP    arch/x86/include/generated/uapi/asm/resource.h
  WRAP    arch/x86/include/generated/uapi/asm/socket.h
  WRAP    arch/x86/include/generated/uapi/asm/sockios.h
  WRAP    arch/x86/include/generated/uapi/asm/termbits.h
  WRAP    arch/x86/include/generated/uapi/asm/termios.h
  WRAP    arch/x86/include/generated/uapi/asm/types.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/irq_regs.h
  WRAP    arch/x86/include/generated/asm/kmap_size.h
  WRAP    arch/x86/include/generated/asm/local64.h
  WRAP    arch/x86/include/generated/asm/mmiowb.h
  WRAP    arch/x86/include/generated/asm/module.lds.h
  WRAP    arch/x86/include/generated/asm/rwonce.h
  WRAP    arch/x86/include/generated/asm/unaligned.h
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  UPD     include/generated/compile.h
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/mod/symsearch.o
  HOSTLD  scripts/mod/modpost
  UPD     include/generated/timeconst.h
  CC      kernel/bounds.s
  UPD     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  UPD     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
  CHKSHA1 ../include/linux/atomic/atomic-arch-fallback.h
  CHKSHA1 ../include/linux/atomic/atomic-instrumented.h
  CHKSHA1 ../include/linux/atomic/atomic-long.h
  DESCEND objtool
  HOSTCC  /build/linux-6.8.6-libre-src/build/tools/objtool/fixdep.o
  HOSTLD  /build/linux-6.8.6-libre-src/build/tools/objtool/fixdep-in.o
  LINK    /build/linux-6.8.6-libre-src/build/tools/objtool/fixdep
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/exec-cmd.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/help.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/pager.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/parse-options.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/run-command.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/sigchain.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/subcmd-config.o
  LD      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/libsubcmd-in.o
  AR      /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/libsubcmd.a
  INSTALL /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/include/subcmd/exec-cmd.h
  INSTALL /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/include/subcmd/help.h
  INSTALL /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/include/subcmd/pager.h
  INSTALL /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/include/subcmd/parse-options.h
  INSTALL /build/linux-6.8.6-libre-src/build/tools/objtool/libsubcmd/include/subcmd/run-command.h
  INSTALL libsubcmd_headers
  MKDIR   /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/special.o
  MKDIR   /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/lib/
  GEN     /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/lib/inat-tables.c
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/decode.o
  LD      /build/linux-6.8.6-libre-src/build/tools/objtool/arch/x86/objtool-in.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/weak.o
  CC      /build/linux-6.8.6-libre-src/build/tools/objtool/check.o

...

  CC [M]  drivers/iio/magnetometer/hmc5843_i2c.o
  CC [M]  drivers/iio/light/gp2ap002.o
  CC [M]  drivers/iio/adc/ti-ads1015.o
  CC [M]  drivers/iio/dac/mcp4725.o
  CC [M]  drivers/iio/position/hid-sensor-custom-intel-hinge.o
  CC [M]  drivers/iio/imu/inv_icm42600/inv_icm42600_temp.o
  CC [M]  drivers/iio/position/iqs624-pos.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_ring.o
  CC [M]  drivers/iio/magnetometer/hmc5843_spi.o
  CC [M]  drivers/iio/light/gp2ap020a00f.o
  CC [M]  drivers/iio/dac/mcp4728.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.o
  CC [M]  drivers/iio/adc/ti-ads1100.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.o
  CC [M]  drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.o
  CC [M]  drivers/iio/adc/ti-ads7924.o
  CC [M]  drivers/iio/magnetometer/rm3100-core.o
  CC [M]  drivers/iio/dac/mcp4821.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_aux.o
  CC [M]  drivers/iio/potentiometer/ad5110.o
  CC [M]  drivers/iio/light/hid-sensor-als.o
  CC [M]  drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.o
  CC [M]  drivers/iio/magnetometer/rm3100-i2c.o
  CC [M]  drivers/iio/adc/ti-ads7950.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.o
  CC [M]  drivers/iio/dac/mcp4922.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_magn.o
  CC [M]  drivers/iio/potentiometer/ad5272.o
  CC [M]  drivers/iio/light/hid-sensor-prox.o
  CC [M]  drivers/iio/imu/inv_icm42600/inv_icm42600_spi.o
  CC [M]  drivers/iio/magnetometer/rm3100-spi.o
  CC [M]  drivers/iio/adc/ti-ads8344.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.o
  CC [M]  drivers/iio/dac/ti-dac082s085.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.o
  CC [M]  drivers/iio/magnetometer/tmag5273.o
  CC [M]  drivers/iio/potentiometer/ds1803.o
  LD [M]  drivers/iio/imu/inv_icm42600/inv-icm42600.o
  CC [M]  drivers/iio/light/iqs621-als.o
  LD [M]  drivers/iio/imu/inv_icm42600/inv-icm42600-i2c.o
  LD [M]  drivers/iio/imu/inv_icm42600/inv-icm42600-spi.o
  CC [M]  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.o
  CC [M]  drivers/iio/adc/ti-ads8688.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.o
  CC [M]  drivers/iio/light/isl29018.o
  CC [M]  drivers/iio/dac/ti-dac5571.o
  CC [M]  drivers/iio/potentiometer/max5432.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.o
  CC [M]  drivers/iio/magnetometer/yamaha-yas530.o
  CC [M]  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.o
  CC [M]  drivers/iio/adc/ti-ads124s08.o
  CC [M]  drivers/iio/imu/inv_mpu6050/inv_mpu_spi.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.o
  CC [M]  drivers/iio/potentiometer/max5481.o
  CC [M]  drivers/iio/dac/ti-dac7311.o
  CC [M]  drivers/iio/light/isl29028.o
  CC [M]  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.o
  CC [M]  drivers/iio/adc/ti-ads131e08.o
  CC [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.o
  LD [M]  drivers/iio/imu/inv_mpu6050/inv-mpu6050.o
  LD [M]  drivers/iio/imu/inv_mpu6050/inv-mpu6050-i2c.o
  LD [M]  drivers/iio/magnetometer/st_magn.o
  CC [M]  drivers/iio/potentiometer/max5487.o
  CC [M]  drivers/iio/dac/ti-dac7612.o
  LD [M]  drivers/iio/imu/inv_mpu6050/inv-mpu6050-spi.o
  CC [M]  drivers/iio/potentiometer/mcp4018.o
  LD [M]  drivers/iio/imu/adis_lib.o
  CC [M]  drivers/iio/light/isl29125.o
  CC [M]  drivers/iio/dac/vf610_dac.o
  LD [M]  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.o
  CC [M]  drivers/iio/potentiostat/lmp91000.o
  CC [M]  drivers/iio/adc/ti-lmp92064.o
  CC [M]  drivers/iio/pressure/abp060mg.o
  LD [M]  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.o
  CC [M]  drivers/iio/potentiometer/mcp4131.o
  CC [M]  drivers/iio/light/isl76682.o
  CC [M]  drivers/iio/pressure/rohm-bm1390.o
  CC [M]  drivers/iio/adc/ti-tlc4541.o
  CC [M]  drivers/iio/proximity/as3935.o
  CC [M]  drivers/iio/potentiometer/mcp4531.o
  CC [M]  drivers/iio/potentiometer/mcp41010.o
  CC [M]  drivers/iio/light/jsa1212.o
  CC [M]  drivers/iio/adc/ti-tsc2046.o
  CC [M]  drivers/iio/potentiometer/tpl0102.o
  CC [M]  drivers/iio/pressure/bmp280-core.o
  CC [M]  drivers/iio/resolver/ad2s90.o
  CC [M]  drivers/iio/proximity/cros_ec_mkbp_proximity.o
  CC [M]  drivers/iio/resolver/ad2s1200.o
  CC [M]  drivers/iio/temperature/iqs620at-temp.o
  CC [M]  drivers/iio/light/lm3533-als.o
  CC [M]  drivers/iio/temperature/ltc2983.o
  CC [M]  drivers/iio/potentiometer/x9250.o
  CC [M]  drivers/iio/adc/vf610_adc.o
  CC [M]  drivers/iio/proximity/irsd200.o
  CC [M]  drivers/iio/proximity/isl29501.o
  CC [M]  drivers/iio/resolver/ad2s1210.o
  CC [M]  drivers/iio/light/ltr390.o
  CC [M]  drivers/iio/pressure/bmp280-regmap.o
  CC [M]  drivers/iio/proximity/pulsedlight-lidar-lite-v2.o
  CC [M]  drivers/iio/temperature/hid-sensor-temperature.o
  CC [M]  drivers/iio/adc/viperboard_adc.o
  CC [M]  drivers/iio/pressure/bmp280-i2c.o
  CC [M]  drivers/iio/light/ltr501.o
  CC [M]  drivers/iio/temperature/maxim_thermocouple.o
  CC [M]  drivers/iio/temperature/max30208.o
  CC [M]  drivers/iio/trigger/iio-trig-hrtimer.o
  CC [M]  drivers/iio/adc/xilinx-xadc-core.o
  CC [M]  drivers/iio/proximity/mb1232.o
  CC [M]  drivers/iio/trigger/iio-trig-interrupt.o
  CC [M]  drivers/iio/pressure/bmp280-spi.o
  CC [M]  drivers/iio/trigger/iio-trig-sysfs.o
  LD [M]  drivers/iio/industrialio.o
  CC [M]  drivers/iio/adc/xilinx-xadc-events.o
  CC [M]  drivers/iio/temperature/max31856.o
  CC [M]  drivers/iio/light/ltrf216a.o
  CC [M]  drivers/iio/trigger/iio-trig-loop.o
  CC [M]  drivers/iio/light/lv0104cs.o
  CC [M]  drivers/iio/proximity/ping.o
  CC [M]  drivers/iio/temperature/max31865.o
  CC [M]  drivers/iio/pressure/dlhl60d.o
  CC [M]  drivers/iio/adc/sd_adc_modulator.o
  CC [M]  drivers/iio/light/max44000.o
  CC [M]  drivers/iio/pressure/dps310.o
  CC [M]  drivers/iio/proximity/rfd77402.o
  CC [M]  drivers/iio/light/max44009.o
  CC [M]  drivers/iio/temperature/mcp9600.o
  CC [M]  drivers/iio/pressure/cros_ec_baro.o
  CC [M]  drivers/iio/light/noa1305.o
  CC [M]  drivers/iio/proximity/srf04.o
  CC [M]  drivers/iio/pressure/hid-sensor-press.o
  CC [M]  drivers/iio/light/opt3001.o
  LD [M]  drivers/iio/adc/xilinx-xadc.o
  CC [M]  drivers/iio/temperature/mlx90614.o
  CC [M]  drivers/iio/pressure/hp03.o
  CC [M]  drivers/iio/pressure/hsc030pa.o
  CC [M]  drivers/iio/proximity/srf08.o
  CC [M]  drivers/iio/proximity/sx9310.o
  CC [M]  drivers/iio/pressure/hsc030pa_i2c.o
  CC [M]  drivers/iio/pressure/hsc030pa_spi.o
  CC [M]  drivers/iio/pressure/icp10100.o
  CC [M]  drivers/iio/temperature/mlx90632.o
  CC [M]  drivers/iio/light/opt4001.o
  CC [M]  drivers/iio/light/pa12203001.o
  CC [M]  drivers/iio/pressure/mpl115.o
  CC [M]  drivers/iio/temperature/mlx90635.o
  CC [M]  drivers/iio/proximity/sx9324.o
  CC [M]  drivers/iio/light/rohm-bu27008.o
  CC [M]  drivers/iio/temperature/tmp006.o
  CC [M]  drivers/iio/pressure/mpl115_i2c.o
  CC [M]  drivers/iio/light/rohm-bu27034.o
  CC [M]  drivers/iio/temperature/tmp007.o
  CC [M]  drivers/iio/proximity/sx9360.o
  CC [M]  drivers/iio/temperature/tmp117.o
  CC [M]  drivers/iio/temperature/tsys01.o
  CC [M]  drivers/iio/pressure/mpl115_spi.o
  CC [M]  drivers/iio/proximity/sx_common.o
  CC [M]  drivers/iio/pressure/mpl3115.o
  CC [M]  drivers/iio/proximity/sx9500.o
  CC [M]  drivers/iio/temperature/tsys02d.o
  CC [M]  drivers/iio/light/rpr0521.o
  CC [M]  drivers/iio/pressure/mprls0025pa.o
  CC [M]  drivers/iio/proximity/vcnl3020.o
  CC [M]  drivers/iio/light/si1133.o
  CC [M]  drivers/iio/pressure/ms5611_core.o
  CC [M]  drivers/iio/light/si1145.o
  CC [M]  drivers/iio/light/stk3310.o
  CC [M]  drivers/iio/proximity/vl53l0x-i2c.o
  CC [M]  drivers/iio/pressure/ms5611_i2c.o
  CC [M]  drivers/iio/light/st_uvis25_core.o
  CC [M]  drivers/iio/pressure/ms5611_spi.o
  CC [M]  drivers/iio/pressure/ms5637.o
  CC [M]  drivers/iio/light/st_uvis25_i2c.o
  CC [M]  drivers/iio/light/st_uvis25_spi.o
  CC [M]  drivers/iio/pressure/st_pressure_core.o
  CC [M]  drivers/iio/light/tcs3414.o
  CC [M]  drivers/iio/pressure/st_pressure_buffer.o
  CC [M]  drivers/iio/pressure/t5403.o
  CC [M]  drivers/iio/pressure/hp206c.o
  CC [M]  drivers/iio/light/tcs3472.o
  CC [M]  drivers/iio/light/tsl2563.o
  CC [M]  drivers/iio/pressure/zpa2326.o
  CC [M]  drivers/iio/pressure/zpa2326_i2c.o
  CC [M]  drivers/iio/light/tsl2583.o
  CC [M]  drivers/iio/light/tsl2591.o
  CC [M]  drivers/iio/pressure/zpa2326_spi.o
  CC [M]  drivers/iio/pressure/st_pressure_i2c.o
  CC [M]  drivers/iio/light/tsl2772.o
  CC [M]  drivers/iio/pressure/st_pressure_spi.o
  CC [M]  drivers/iio/light/tsl4531.o
  CC [M]  drivers/iio/light/us5182d.o
  CC [M]  drivers/iio/light/vcnl4000.o
  CC [M]  drivers/iio/light/vcnl4035.o
  CC [M]  drivers/iio/light/veml6030.o
  CC [M]  drivers/iio/light/veml6070.o
  CC [M]  drivers/iio/light/veml6075.o
  LD [M]  drivers/iio/pressure/bmp280.o
  LD [M]  drivers/iio/pressure/st_pressure.o
  CC [M]  drivers/iio/light/vl6180.o
  CC [M]  drivers/iio/light/zopt2201.o
make[1]: *** [/build/linux-6.8.6-libre-src/Makefile:1921: .] Error 2
make: *** [../Makefile:240: __sub-make] Error 2
1 Like

This is still an ongoing issue for me. I’ve resorted to creating a branch that includes v4l2loopback and the old flake.lock file. Each time I need to get on a video call, I have to checkout the branch, rebuild my system, then restart my system. Once done with video calling, I checkout main, rebuild, and restart again.

It’s… annoying.

I cloned your repo and checked out commit 87f1713686ae89dcc6c3e69bf9599ce489d5834f linked from your “boot” link (see footnote 1), and confirmed that it wants to build 6.8.4 by doing:

nix-tree --derivation .#nixosConfigurations.nixos-desktop-gnome.config.system.build.toplevel

With a grep within the repo I found this following line in modules/boot/efi-systemd.nix:

kernelPackages = pkgs.linuxPackages_latest;

Removing that line and re-inspecting it with nix-tree confirms that it now wants to build 6.1.84 instead, which addresses this particular issue.

I haven’t got time to reproduce the build failure though. Why does it want to build a kernel locally? Is building a kernel intended or not?

Footnotes

  1. I think the commit is slightly different from the version that produced the kernel build failure log, because 87f1713 gives me linux-6.8.4.drv while the build failure log in the original post has 6.8.6. Not that it matters a lot, though.
  2. Instead of nix-tree, there are also builtin (and probably faster) ways to list derivations that’ll be built e.g. nixos-rebuild dry-build or nix build ... --dry-run.
1 Like

The real issue here is that I want to be on the latest kernel and have v4l2loopback installed. When I update flake.lock, it pulls in a newer kernel (what I want) that then causes the system build to fail (not what I want). kernelPackages set to latest works for that flake.lock file, however, any update of flake.lock, no matter the value kernelPackages is set to, will cause a build failure.

The branch that I’ve resorted to using when I need to use v4l2loopback is here. I’d like to take that branch, add the flake.lock from main, and be able to build.

1 Like

Failure to reproduce

May you provide a commit with everything set up to trigger the build failure?

I tried to reproduce it again, but it’s still not building the kernel locally. This commit is based on your v4l2loopback-freeze branch, and here’s what I did:

  • Checkout the v4l2loopback-freeze branch.
  • Run nix flake update.
  • Replace kernel 6.7 (which is EOL and refuses to build) with latest in modules/nixos/boot/efi-systemd.nix.
  • Comment out vmware due to vmware’s download site currently being down.

I then did a nixos-rebuild dry-build --flake .#nixos-desktop-gnome, and the output is at dry-build.txt. The derivation /nix/store/vfh8qvjlknnbn2zncbb5d7lvfav56i19-linux-6.8.9 comes after the line these 1730 paths will be fetched, so it’s not building the kernel locally.

Linux-libre?

I noticed that from the build error in the original post, the kernel being built locally is a dependency of new-lg4ff:

The new-lg4ff originates from logitech-whell.nix, and that file specifies linuxKernel.packages.linux_latest_libre, which is a different kernel from the mainline kernel. Did you intend to use linux-libre instead of config.boot.kernelPackages.new-lg4ff here?