Build failure: vulkan-validation-layers
┃ > make[2]: *** [layers/CMakeFiles/vvl.dir/build.make:286: layers/CMakeFiles/vvl.dir/best_practices/bp_video.c…
┃ > make[2]: *** [layers/CMakeFiles/vvl.dir/build.make:272: layers/CMakeFiles/vvl.dir/best_practices/bp_synchro…
┃ > 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_pipeline.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>
┃ > | ^~~~~~~~~~~~~~~~~~~~~~~~
error: builder for '/nix/store/45k0fjdy7p87z7kkqcpwf62mcdcm728z-vulkan-validation-layers-1.3.283.0.drv' failed with exit code 2;
last 10 log lines:
> 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_synchronization.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:272: layers/CMakeFiles/vvl.dir/best_practices/bp_synchronization.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:162: layers/CMakeFiles/vvl.dir/all] Error 2
> make: *** [Makefile:136: all] Error 2
For full logs, run 'nix log /nix/store/45k0fjdy7p87z7kkqcpwf62mcdcm728z-vulkan-validation-layers-1.3.283.0.drv'.
error: 1 dependencies of derivation '/nix/store/d6vqlnmpv1w6q688i2v3gxkbrfjn2yav-nixVulkanIntel.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dr6fh2lih5ghm9qi10ikn8ld9gw5fba4-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/r44qfrd3kww6v6wvj179r8bai6dfy5hz-nixos-system-host-zeph.drv' failed to build
Looks like it would compile if spirv-tools are added into buildInputs, but I'm not sure why.
Looks like it would compile if
spirv-toolsare added intobuildInputs, but I'm not sure why.
Can confirm with an overlay and overrideAttrs where I simply added spirv-tools into buildInputs, the package then succeeds to build. Though, looking at the actual package source, it doesn't seem like it has been touched in a while, so I am uncertain as to why this has popped up now.
(self: super: {
vulkan-validation-layers = super.vulkan-validation-layers.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [pkgs.spirv-tools];
});
})
Confirm, this fix build for me.
And here's the fix it seems: #334929
Seeing fix has been long-merged, I'm closing this issue. Feel free to re-open it if the issue does persist.