Build failure: nvidia-persistenced
Nixpkgs version
- Unstable (25.11)
Steps to reproduce
- Set
hardware.nvidia.nvidiaPersistenced = true - Attempt to rebuild
Can Hydra reproduce this build failure?
I don't believe hydra builds this.
Relevant log output
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/4n4bmcrhfwfnskjf2n2y0zsfh6sx71bc-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/4bacfs7zrg714ffffbjp57nsvcz6zfkq-bash-5.3p3/bin/bash CC=/nix/store/qdknxw57cwy1jkrhq7fzmiis73j42jv6-gcc-14.3.0/bin/gcc LD=/nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld AR=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/ar NM=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/nm STRIP=/nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/strip OBJCOPY=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/objcopy OBJDUMP=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/objdump READELF=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/readelf HOSTCC=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/cc HOSTCXX=/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/c++ HOSTAR=/nix/store/ky2x48xfid0nn5arablpwlnsngj70gws-binutils-wrapper-2.44/bin/ar HOSTLD=/nix/store/ky2x48xfid0nn5arablpwlnsngj70gws-binutils-wrapper-2.44/bin/ld ARCH=x86_64 CROSS_COMPILE= KBUILD_OUTPUT=/nix/store/gnm03zm851h35x6fwypcgw4v95l45i7i-linux-zen-6.16.1-dev/lib/modules/6.16.1-zen1/build IGNORE_PREEMPT_RT_PRESENCE=1 NV_BUILD_SUPPORTS_HMM=1 SYSSRC=/nix/store/gnm03zm851h35x6fwypcgw4v95l45i7i-linux-zen-6.16.1-dev/lib/modules/6.16.1-zen1/source SYSOUT=/nix/store/gnm03zm851h35x6fwypcgw4v95l45i7i-linux-zen-6.16.1-dev/lib/modules/6.16.1-zen1/build DATE=true
/nix/store/4bacfs7zrg714ffffbjp57nsvcz6zfkq-bash-5.3p3/bin/bash: line 1: pkg-config: command not found
CC command_server.c
In file included from/nix/store/9ly5qx1lbj0q1rcsf1dc0m9n3db6ii60-glibc-2.40-66-dev/include/bits/libc-header-start.h:33,
from /nix/store/9ly5qx1lbj0q1rcsf1dc0m9n3db6ii60-glibc-2.40-66-dev/include/stdlib.h:26,
from command_server.c:29:
/nix/store/9ly5qx1lbj0q1rcsf1dc0m9n3db6ii60-glibc-2.40-66-dev/include/features.h:197:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
197 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
| ^~~~~~~
In file included from nvidia-persistenced.h:33,
from command_server.c:34:
nvpd_rpc.h:9:10: fatal error: rpc/rpc.h: No such file or directory
9 | #include <rpc/rpc.h>
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:144: _out/Linux_x86_64/command_server.o] Error 1
Additional context
No response
System metadata
- system:
"x86_64-linux" - host os:
Linux 6.16.1-zen1, NixOS, 25.11 (Xantusia), 25.11.20250819.2007595 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Lix, like Nix) 2.93.3 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/racci/.config/nix/nix.conf:/nix/store/r8jq1rginj1qc4yrpjgl8a3r0b254n49-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/racci/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/racci/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/racci/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/gzla1q2xfin7r8gnwpfdskhrihcig6l4-lix-2.93.3/share - channels(root):
"nixos" - nixpkgs:
/nix/store/pxnx7dbr0pz3qpgw2r315wdbb00afdw7-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
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a duplicate of an existing issue.
- [x] I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a :+1: reaction to issues you find important.
Concerned with the lack of activity here - tagging @NixOS/cuda-maintainers (I believe that's the right team?).
CUDA maintainers don't maintain the NVIDIA drivers or associated packages. I'm not sure if there's a team for it specifically or people adding them as needed.
I encountered this error earlier today and have been trying to solve this for a while. The error in OP is about missing pkg-config, which was easy enough to solve with the following.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta.overrideAttrs (oldAttrs: {
passthru =
oldAttrs.passthru
// {
persistenced = oldAttrs.passthru.persistenced.overrideAttrs (perAttrs: {
nativeBuildInputs = perAttrs.nativeBuildInputs ++ [pkgs.pkg-config];
});
};
});
But after doing this, I kept running into a few linker errors (shown below) that I just could not figure out. I looked up the missing crt1.o errors online and found multiple stack overflow answers for Ubuntu suggesting to install gcc-multilib. So, I tried to override stdenv with gccMultiStdenv to no avail. I also tried overriding it with gcc_multi.stdenv but that produced an even stranger as not found error. I even tried to install a newer version using mkDriver but the results were the same.
If anyone knows more about these errors and how to solve them, that would be great.
...
LINK _out/Linux_x86_64/nvidia-persistenced.unstripped
/nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: cannot find crt1.o: No such file or directory
/nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: cannot find crti.o: No such file or directory
/nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: cannot find -lgcc_s: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:139: _out/Linux_x86_64/nvidia-persistenced.unstripped] Error 1
I got it to build succesfully, https://github.com/NixOS/nixpkgs/pull/439514, could use some help testing.
I rolled forward from nixos-unstable to master but I'm still getting the same build failure when setting the nvidia package like this:
nvidiaPackage = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "580.65.06";
sha256_64bit = "sha256-BLEIZ69YXnZc+/3POe1fS9ESN1vrqwFy6qGHxqpQJP8=";
sha256_aarch64 = "sha256-4CrNwNINSlQapQJr/dsbm0/GvGSuOwT/nLnIknAM+cQ=";
openSha256 = "sha256-BKe6LQ1ZSrHUOSoV6UCksUE0+TIa0WcCHZv4lagfIgA=";
settingsSha256 = "sha256-9PWmj9qG/Ms8Ol5vLQD3Dlhuw4iaFtVHNC0hSyMCU24=";
persistencedSha256 = "sha256-ETRfj2/kPbKYX1NzE0dGr/ulMuzbICIpceXdCRDkAxA=";
};
...
hardware.nvidia = {
forceFullCompositionPipeline = true;
modesetting.enable = true;
powerManagement.enable = true;
open = true;
nvidiaSettings = false;
nvidiaPersistenced = true;
package = nvidiaPackage;
};
Edit: Its possible that this error still exists for me due to my kernel choice from a third party flake. I'll look in to that.
I'm still getting the same build failure when setting the nvidia package like this:
could it be due to open = true;?
I'm still getting the same build failure when setting the nvidia package like this:
could it be due to
open = true;?
No, it still fails with open = false. I've confirmed that it doesn't happen when I switch to the default kernel -- it's still happening when I use boot.kernelPackages = pkgs.linuxPackages_cachyos from chaotic-cx/nyx. I've opened an issue there to track.