Fatal linker error when trying to link Vulkan SDK libvulkan.so on Linux

I’m trying to link with Vulkan on Linux, and I’m getting the following error when linking:

error: fatal linker error: unhandled relocation type R_X86_64_JUMP_SLOT at offset 0x....

…where the libvulkan.so path is coming from the installed Vulkan SDK, e.g.:

/home/floh/vulkansdk/1.4.328.1/x86_64/lib/pkgconfig/../../lib/libvulkan.so

Searching for R_X86_64_JUMP_SLOT (on the archived Github issue list) didn’t yield any results (except this one which looks unrelated: pthread_sigmask relocation error · Issue #9899 · ziglang/zig · GitHub ).

Any ideas what’s going on there? Is this a missing Zig linker feature?

PS: it works fine when linking the system’s Vulkan DLL (e.g. not sourcing the Vulkan SDK’s setup-env.sh script in .zshrc which I guess overrides the DLL paths).

PS: also sort of a semi-announcement: you can now try the new experimental sokol-gfx Vulkan backend on Linux with the sokol-zig bindings:

sudo apt install libvulkan-dev
git clone https://github.com/floooh/sokol-zig
cd sokol-zig
zig build -Dvulkan run-clear

(just make sure there’s no Vulkan-SDK in the path)