[FFmpeg-trac] #10809(build system:new): libvulkan.so not linked when `--enable-vulkan`.
FFmpeg
trac at avcodec.org
Thu Jan 18 14:36:54 EET 2024
#10809: libvulkan.so not linked when `--enable-vulkan`.
--------------------------------------+----------------------------------
Reporter: Atemu | Type: defect
Status: new | Priority: normal
Component: build system | Version: 6.1
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+----------------------------------
Summary of the bug:
When building ffmpeg with `--enable-vulkan` with vulkan-loader and vulkan-
headers present, the vulkan-loader's libvulkan.so is not linked into the
ffmpeg executable and ffmpeg is unable to find it at runtime.
Adding `--enable-libplacebo` aswell as adding libplacebo to the
dependencies makes the executable linked against the vulkan-loader again.
$ ldd ./result-bin/bin/ffmpeg | rg vulkan
vs.
$ ldd ./result-bin/bin/ffmpeg | rg vulkan
libvulkan.so.1 => /nix/store/pkrmapls8xvicblivs4mr8qp4xvcm5kh-
vulkan-loader-1.3.268.0/lib/libvulkan.so.1 (0x00007f37c4efd000)
Trying to run something like `RADV_PERFTEST=video_decode ./result-
bin/bin/ffmpeg -init_hw_device "vulkan=vk:0" -hwaccel vulkan
-hwaccel_output_format vulkan -i ...` results in:
[AVHWDeviceContext @ 0x1db4280] Unable to open the libvulkan library!
Device creation failed: -1313558101.
Failed to set value 'vulkan=vk:0' for option 'init_hw_device': Unknown
error occurred
Error parsing global options: Unknown error occurred
`strace` reveals that it doesn't even attempt to look in vulkan-loader's
lib dir.
This bug does _not_ reproduce on ffmpeg 4.4.4, even without libplacebo.
libvulkan is linked there. It does repro with 5.1.3.
How to reproduce:
1. Build with `--enable-vulkan` and vulkan-loader + vulkan-headers in the
library search path
2. `ldd` the resulting executable
Discovered in: https://github.com/NixOS/nixpkgs/pull/281753
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10809>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list