Nixos-rebuild fails on nixos-24.11

I try to rebuild my system based on stable channels:

sudo nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz
nixos https://nixos.org/channels/nixos-24.11

but wb-broadcom-sta-6.30 cannot be build:

sudo nixos-rebuild switch --no-build-output --show-trace --upgrade-all
building '/nix/store/iwdriswbi4p5swgbv2j58n9cw394yh74-firmware.drv'...
copying path '/nix/store/0qwhcwww5vgja4kgzn2zh64kljkm14v4-idea-community-2024.3.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/0429wgx7prqr2h2y4kx2wlmfw6g1nwjk-scala-3.3.3' from 'https://cache.nixos.org'...
copying path '/nix/store/nd32yr5qv7mk9rdkpj27x3lxasr8d915-libreoffice-24.2.7.2-wrapped' from 'https://cache.nixos.org'...
building '/nix/store/rfsavd4gcnm0wwzmb1ws414kxfhz97wb-broadcom-sta-6.30.223.271-6.14.3.drv'...
building '/nix/store/cirvzyp3d381693d4wgmd94q2c09d7rh-etc-modprobe.d-firmware.conf.drv'...
error: builder for '/nix/store/rfsavd4gcnm0wwzmb1ws414kxfhz97wb-broadcom-sta-6.30.223.271-6.14.3.drv' failed with exit code 2;
       last 25 log lines:
       >                  from /nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/include/linux/kmod.h:9,
       >                  from /nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/include/linux/module.h:17,
       >                  from ././src/include/linuxver.h:40,
       >                  from src/wl/sys/wl_linux.c:27:
       > src/wl/sys/wl_linux.c: In function 'wl_down':
       > /nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/include/linux/workqueue.h:765:9: warning: call to '__warn_flushing_systemwide_wq' declared with attribute warning: Please avoid flushing system-wide workqueues. []
       >   765 |         __warn_flushing_systemwide_wq();                                \
       >       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       > src/wl/sys/wl_linux.c:1499:25: note: in expansion of macro 'flush_scheduled_work'
       >  1499 |                         flush_scheduled_work();
       >       |                         ^~~~~~~~~~~~~~~~~~~~
       >   CC [M]  src/wl/sys/wl_iw.o
       >   CC [M]  src/wl/sys/wl_cfg80211_hybrid.o
       > src/wl/sys/wl_cfg80211_hybrid.c:1898:25: error: initialization of 'int (*)(struct wiphy *, struct wireless_dev *, unsigned int,  int *)' from incompatible pointer type 's32 (*)(struct wiphy *, struct wireless_dev *, s32 *)' {aka 'int (*)(struct wiphy *, struct wireless_dev *, int *)'} []
       >  1898 |         .get_tx_power = wl_cfg80211_get_tx_power,
       >       |                         ^~~~~~~~~~~~~~~~~~~~~~~~
       > src/wl/sys/wl_cfg80211_hybrid.c:1898:25: note: (near initialization for 'wl_cfg80211_ops.get_tx_power')
       > cc1: some warnings being treated as errors
       > make[4]: *** [/nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/scripts/Makefile.build:207: src/wl/sys/wl_cfg80211_hybrid.o] Error 1
       > make[3]: *** [/nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/Makefile:1997: .] Error 2
       > make[2]: *** [/nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/Makefile:251: __sub-make] Error 2
       > make[2]: Leaving directory '/build/broadcom-sta'
       > make[1]: *** [/nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/source/Makefile:251: __sub-make] Error 2
       > make[1]: Leaving directory '/nix/store/891qcsv4m0plkrqcpgk3p1qxbqbs97vy-linux-6.14.3-dev/lib/modules/6.14.3/build'
       > make: *** [Makefile:173: all] Error 2
       For full logs, run 'nix-store -l /nix/store/rfsavd4gcnm0wwzmb1ws414kxfhz97wb-broadcom-sta-6.30.223.271-6.14.3.drv'.
error: 1 dependencies of derivation '/nix/store/5fxhyrjbk8mns5hdjh6zl2lad860pgn2-linux-6.14.3-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/93qk490j445355v17918x09323m0ljg4-nixos-system-EiMaegg-24.11.717196.9684b53175fc.drv' failed to build

How can I solve this problem ?

1 Like

I can reproduce with

nix-build \
  -A linuxKernel.packages.linux_6_14.broadcom_sta --arg config '{ allowUnfree = true; }' \
  "https://releases.nixos.org/nixos/24.11/nixos-24.11.717196.9684b53175fc/nixexprs.tar.xz"

you can try temporarily downgrading the kernel until 25.05.

https://wiki.nixos.org/wiki/Linux_kernel

Maybe boot.kernelPackages = pkgs.linuxPackages_6_13;

I never tired this and there is likely a better solution. so maybe wait for more responses.

Thanks @phanirithvij that allows to rebuild: