Vulkaninfo failure

~$ nix-shell -p vulkan-tools --run vulkaninfo

Vulkan Instance Version: 1.1.82

ERROR: [Loader Message] Code 0 : cannot open shared object file: No such file or directory
ERROR: [Loader Message] Code 0 : cannot open shared object file: No such file or directory
Cannot create Vulkan instance.
/build/source/vulkaninfo/vulkaninfo.c:825: failed with VK_ERROR_INCOMPATIBLE_DRIVER

Is this expected? vulkan-tools runs fine with the system package manager (Pop!_OS 18.10).

I’ve tried chasing down the dependencies, but it ends up looking for which I haven’t found anywhere yet.

I’m not familiar with non-NixOS unfortunately, I heard there are some specialties regarding graphics drivers.
I’m surprised it looks for LLVM 7, the mesa in nixpkgs master uses LLVM 9 (which is still outdated, the latest one is 11).
A similar problem turned up for amdvlk in NixOS, it loads some libraries at runtime, so they needed to be added to the rpath and dontPatchELF = true needed to be set, otherwise nix stripped them again. This kept vulkaninfo and vkcube from working, although other applications worked fine when they linked to the needed libraries anyway.

ldd /run/opengl-driver/lib/ shows for me and
env VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json vulkaninfo works fine. from vulkan-loader doesn’t link to though.

Which vulkan driver are you using?

I have libvulkan1- installed with dpkg, which works alongside vulkan-tools-

The driver I’m getting with nixpkgs-20.03 is /nix/store/c7xva3f4wk9i56wnz8lff7cx4fx97zp9-vulkan-loader-

I would look at , should allow you to use nixpkgs pkgs with gpu packages

on NixOS, the original nix-shell -p vulkan-tools --run vulkaninfo run command runs fine.

I’m on a Darter Pro running PopOS, and the suggestion to use nixGL is on point. That is exactly how I run GL and Vulkan applications on this machine

1 Like

Thanks, @jonringer! nixGL looks like what I need to get off the ground. vulkaninfo and vkcube work like a charm with the wrapper.

Unfortunately for me, that appears to mean the remaining segfault in my tester program is from the arrangement of my code…

1 Like