Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan-cts: --deqp-vk-library-path=... unreliable (sensitive to LD_LIBRARY_PATH). #333523

Open
eddyb opened this issue Aug 9, 2024 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@eddyb
Copy link
Contributor

eddyb commented Aug 9, 2024

Describe the bug

The deqp-vk executable of the vulkan-cts package is pretty much guaranteed to not work if LD_LIBRARY_PATH is set (and doesn't include vulkan-loader specifically).

Steps To Reproduce

Steps to reproduce the behavior:

$ cd $(mktemp -d) && LD_LIBRARY_PATH= nix-shell -p vulkan-cts --run deqp-vk
Writing test log into TestResults.qpa
dEQP Core unknown (0xcafebabe) starting..
  target implementation = 'Default'
FATAL ERROR: Failed to open dynamic library: '/nix/store/fr89g4mi5zsplmjfl56y0ckl7pzzdskq-vulkan-loader-1.3.283.0/lib/libvulkan.so'
/tmp/nix-shell-1315847-0/rc: line 3: 1319655 Killed                  deqp-vk

(as per KhronosGroup/VK-GL-CTS#479, it actually tries dlopen("libvulkan.so") - more precisely, dlopen(basename("/nix/store/.../libvulkan.so")), throwing away absolute paths)

Expected behavior

deqp-vk should work regardless of the ambient value of LD_LIBRARY_PATH.

Additional context

I've filed an upstream report for the bizarre sensitivity to LD_LIBRARY_PATH:

Might make sense to patch it in nixpkgs than trying to work around it by e.g. appending ${vulkan-loader}/lib to LD_LIBRARY_PATH etc. (even if that might be easier for now - locally I just unset LD_LIBRARY_PATH before running deqp-vk).

Notify maintainers

cc @Flakebi

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.12, NixOS, 24.11 (Vicuna), 24.11pre662544.cb9a96f23c49`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.90.0`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

@eddyb eddyb added the 0.kind: bug Something is broken label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant