Issue:
Running the command:
sudo nixos-rebuild switch --upgrade .
I am getting the following message in the output:
compilation terminated.
make[2]: *** [layers/CMakeFiles/vvl.dir/build.make:146: layers/CMakeFiles/vvl.dir/best_practices/bp_descriptor.cpp.o] Error 1
make[2]: *** [layers/CMakeFiles/vvl.dir/build.make:272: layers/CMakeFiles/vvl.dir/best_practices/bp_synchronization.cpp.o] Error 1
In file included from /build/source/layers/./state_tracker/pipeline_state.h:27,
from /build/source/layers/./state_tracker/cmd_buffer_state.h:24,
from /build/source/layers/./best_practices/best_practices_validation.h:24,
from /build/source/layers/best_practices/bp_instance_device.cpp:20:
/build/source/layers/./utils/shader_utils.h:28:10: fatal error: spirv-tools/libspirv.h: No such file or directory
28 | #include <spirv-tools/libspirv.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [layers/CMakeFiles/vvl.dir/build.make:216: layers/CMakeFiles/vvl.dir/best_practices/bp_instance_device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:162: layers/CMakeFiles/vvl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
error: builder for '/nix/store/45k0fjdy7p87z7kkqcpwf62mcdcm728z-vulkan-validation-layers-1.3.283.0.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/fqs01il7xzjsfidd0ky5wg22m2va8xmm-graphics-drivers.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gwhaqfkpfwwlbsgaw5ixdiwys8d4cs19-graphics-driver.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4ilhf55nahz85klkw5sl3jxpschy3ba2-tmpfiles.d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/13mnxnq6ych78hak3q9wq7svv2qjlf5k-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sxf8d3qxf5wm2nknpspnwhbc3c78v457-nixos-system-linux-24.11pre666839.c3aa7b8938b1.drv' failed to build
nix-shell -p nix-info --run “nix-info -m”
install: cannot remove ‘/tmp/env-vars’: Operation not permitted
system: "x86_64-linux"
host os: Linux 6.10.3, NixOS, 24.11 (Vicuna), 24.11pre665011.a58bc8ad7796
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.18.5
channels(root): "nixos, nixpkgs"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
1 Like
Do you expect it to build locally at all instead of being fetched from public cache?
Do you intentionally have two channels?
I’m also experiencing this same error for the past day or so. Figured it’ll be fixed within a few days.
I had had the unstable channel at first(failed to build), and I added 24.05 but it required me to change most of my config. I added unstable back and I forgot to remove 24.05.
I don’t know why it is not fetching from public cache
Did you check what channels you have exactly? nix-channel --list
with and without sudo
.
I have fixed the double channel issue and added the correct unstable channel.
sudo nix-channel --list
nixos nixos-unstable release nixos-24.11pre666839.c3aa7b8938b1
nix-channel --list
nixos nixos-unstable release nixos-24.11pre666839.c3aa7b8938b1
I also checked hydra
hydra-check --channel unstable vulkan-validation-layers
Build Status for nixpkgs.vulkan-validation-layers.x86_64-linux on unstable
vulkan-validation-layers-1.3.283.0 from 2024-08-17 - Hydra - Build 269878850 of job nixos:trunk-combined:nixpkgs.vulkan-validation-layers.x86_64-linux
You still seem to have a double channel issue. You probably want only root to have the nixos channel.
To help more, access to your configuration might be necessary.
micheal
August 19, 2024, 11:36pm
10
Removing the double channel resolved my issue.
hardware = {
nvidia = {
modesetting.enable = true;
nvidiaSettings = false;
open = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
package = let
# Fixes framebuffer with linux 6.11
fbdev_linux_611_patch = pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/NVIDIA/open-gpu-kernel-modules/pull/692.patch";
hash = "sha256-OYw8TsHDpBE5DBzdZCBT45+AiznzO9SfECz5/uXN5Uc=";
};
in
config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "560.35.03";
sha256_64bit = "sha256-8pMskvrdQ8WyNBvkU/xPc/CtcYXCa7ekP73oGuKfH+M=";
sha256_aarch64 = "sha256-s8ZAVKvRNXpjxRYqM3E5oss5FdqW+tv1qQC2pDjfG+s=";
openSha256 = "sha256-/32Zf0dKrofTmPZ3Ratw4vDM7B+OgpC4p7s+RHUjCrg=";
settingsSha256 = "sha256-kQsvDgnxis9ANFmwIwB7HX5MkIAcpEEAHc8IBOLdXvk=";
persistencedSha256 = "sha256-E2J2wYYyRu7Kc3MMZz/8ZIemcZg68rkzvqEwFAL3fFs=";
patches = [fbdev_linux_611_patch];
};
prime = {
# nix shell nixpkgs#pciutils -c lspci | grep ' VGA '
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
];
};
};
packages:
clinfo
libva-utils
vdpauinfo
vulkan-headers # mainly
vulkan-tools
gpu-viewer
gwe
cudaPackages.cudatoolkit
nvitop
nvtopPackages.full
libva
libva-utils
glxinfo