BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="22.11pre381914.f1c167688a6"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 22.11 (Raccoon)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="22.11 (Raccoon)"
VERSION_CODENAME=raccoon
VERSION_ID="22.11"
In file included from /build/source/system76-io.c:39:
/build/source/system76-io_hwmon.c: In function 'io_fan_input_show':
/build/source/system76-io_hwmon.c:46:5: error: ISO C90 forbids mixed declarations and code [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeclaration-after-statement-Werror=declaration-after-statement8;;]
46 | const char * name = io_fan_name(to_sensor_dev_attr(attr)->index);
| ^~~~~
/build/source/system76-io_hwmon.c: In function 'io_pwm_show':
/build/source/system76-io_hwmon.c:82:5: error: ISO C90 forbids mixed declarations and code [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeclaration-after-statement-Werror=declaration-after-statement8;;]
82 | const char * name = io_fan_name(to_sensor_dev_attr(attr)->index);
| ^~~~~
/build/source/system76-io_hwmon.c: In function 'io_pwm_set':
/build/source/system76-io_hwmon.c:105:5: error: ISO C90 forbids mixed declarations and code [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeclaration-after-statement-Werror=declaration-after-statement8;;]
105 | const char * name = io_fan_name(to_sensor_dev_attr(attr)->index);
| ^~~~~
checking whether we are cross compiling... no
checking whether the compiler supports GNU C... yes
In file included from /build/source/system76-io.c:38:
At top level:
/build/source/system76-io_dev.c:272:12: error: 'io_dev_suspend' defined but not used [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-function-Werror=unused-function8;;]
272 | static int io_dev_suspend(struct io_dev * io_dev, u16 * value, int timeout) {
| ^~~~~~~~~~~~~~
checking for suffix of object files... o
checking whether gcc accepts -g... yes
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for gcc option to enable C11 features... none needed
cc1: all warnings being treated as errors
make[2]: *** [/nix/store/gkf4nhq306r54y7f9mfinmlpjppn04wc-linux-5.18-dev/lib/modules/5.18.0/source/scripts/Makefile.build:288: /build/source/system76-io.o] Error 1
make[1]: *** [/nix/store/gkf4nhq306r54y7f9mfinmlpjppn04wc-linux-5.18-dev/lib/modules/5.18.0/source/Makefile:1834: /build/source] Error 2
make[1]: Leaving directory '/nix/store/gkf4nhq306r54y7f9mfinmlpjppn04wc-linux-5.18-dev/lib/modules/5.18.0/build'
make: *** [Makefile:5: all] Error 2
error: builder for '/nix/store/fz7chwllww0pq8l7lj001y6d4cq5p216-system76-io-module-1.0.1-5.18.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/zka7zn1b7q2ssjamhwqivcp76i0fz1qg-hwdb.bin.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-cockpit-270.drv-1/source': Directory not empty
error: 1 dependencies of derivation '/nix/store/rfrxxcq4szy51p97zhky9yajis5gjqs6-kernel-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h3gb9vx3v163lg6qic5cfzzhlaa61dgd-linux-5.18-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1sdqc8xxf3sxmk3925rb36mvpi7xai4r-unit-systemd-udevd.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jxrcqfwls9bnhadrw3d7m6297kc8f69b-nixos-system-SBOS_Galp5-22.11pre381914.f1c167688a6.drv' failed to build
Unless I am gravley mistaken, this means the Io driver is incompatible with kernel 5.18.
Presumably you can reproduce on any system, but I am unsure of the steps required on non-nix systems.