Repository navigation
Closed
Labels
0.kind: build failureA package fails to build
Description
Nixpkgs version
- Unstable (26.11)
Steps to reproduce
Rebuilding
tp_smapi failed to build
Can Hydra reproduce this build failure?
Yes, Hydra can reproduce this build failure.
Link to Hydra build job
Relevant log output
building the system configuration...
error: Cannot build '/nix/store/bxh8n4z4r14rpafpmyqg9ni9dklgcbd2-tp_smapi-0.45-7.2.6.drv'.
Reason: builder failed with exit code 2.
Output paths:
/nix/store/7klsbvs2ls3xf7np2alc9kqmqaxzjpag-tp_smapi-0.45-7.2.6
Last 25 log lines:
> make[1]: Entering directory '/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/build'
> make[2]: Entering directory '/build/source'
> CC [M] thinkpad_ec.o
> CC [M] tp_smapi.o
> CC [M] hdaps.o
> tp_smapi.c: In function 'show_tp_ec_bat_str':
> tp_smapi.c:672:9: error: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
> 672 | strncpy(buf, (char *)row+offset, maxlen);
> | ^~~~~~~
> tp_smapi.c:47:1: note: include '<string.h>' or provide a declaration of 'strncpy'
> 46 | #include <linux/platform_device.h>
> +++ |+#include <string.h>
> 47 | #include <asm/uaccess.h>
> tp_smapi.c:672:9: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch]
> 672 | strncpy(buf, (char *)row+offset, maxlen);
> | ^~~~~~~
> tp_smapi.c:672:9: note: include '<string.h>' or provide a declaration of 'strncpy'
> make[4]: *** [/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/source/scripts/Makefile.build:289: tp_smapi.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/source/Makefile:2201: .] Error 2
> make[2]: *** [/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/source/Makefile:248: __sub-make] Error 2
> make[2]: Leaving directory '/build/source'
> make[1]: *** [/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/source/Makefile:248: __sub-make] Error 2
> make[1]: Leaving directory '/nix/store/ql1wq8602fnd8lfb1xvb6vpwpn1nvg6v-linux-zen-7.2.6-dev/lib/modules/7.2.6-zen2/build'
> make: *** [Makefile:46: modules] Error 2
For full logs, run:
nix log /nix/store/bxh8n4z4r14rpafpmyqg9ni9dklgcbd2-tp_smapi-0.45-7.2.6.drv
error: Cannot build '/nix/store/i6s3w6jan1fycq0q1bg3r9jfa3g7cfsv-linux-zen-7.2.6-modules.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/xpnbb9dphz15jjvrzx2wcwhhz4g7y5s2-linux-zen-7.2.6-modules
error: Cannot build '/nix/store/r2m9mkjy740w4c5m5xiqb3kyxsz3h8pp-nixos-system-nixos-26.11.20260920.44a9189.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/qvqdnfg67gdf01swmndycaynch613gpq-nixos-system-nixos-26.11.20260920.44a9189
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/etc/nixos#nixosConfigurations."nixos".config.system.build.toplevel' --no-link' returned non-zero exit status 1.Additional context
the build failure also occurs to other 7.2.6 kernels.
Using default kernels (not latest) fixed the issue
System metadata
- system:
"x86_64-linux" - host os:
Linux 6.18.52, NixOS, 26.11 (Zokor), 26.11.20260916.b1b8759 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.34.8 - nixpkgs:
/nix/store/0pci4p12dvimf6d7p4674ykvcjwsaq6a-source
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
- I assert that I have read the automation/AI policy and that this issue report complies with it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Metadata
Metadata
Assignees
Labels
0.kind: build failureA package fails to build
Activity
ArtifyCZ commentedon Sep 22, 2026
Seems the issue is caused by the
tp_smapipackage using a kernel-internal functionstrncpythat has been removed in v7.2Linux v7.2 has been released on 2026-08-16, and the build of this package in the
linux_latestset failed the very next day.Note that the last time this package (
tp_smapi) in nixpkgs has been updated was a year ago in 8890d3b10bfe37f584436f219fa2310b83203e77Also note that this derivation fails in most of the various Linux forks, e.g., Zen, Xanmod, and in
linux_latestandlinux_7_2.ArtifyCZ commentedon Sep 22, 2026
Upstream for this package is https://github.com/linux-thinkpad/tp_smapi
They have an open issue for Linux v7.2 compatibility linux-thinkpad/tp_smapi#82
They are working on it, there's an open PR linux-thinkpad/tp_smapi#81
I think we should mark it as incompatible with the affected kernels, and update the package once it gets merged.
linuxPackages.tp_smapi: mark as broken for kernel >= v7.2
linuxPackages.tp_smapi: patch strncpy
linuxPackages.tp_smapi: patch strncpy