It seems that the vulkan useflag in libplacebo doesn't fully disable vulkan. To reproduce: 1. Install media-libs/vulkan-loader and have it present in your system. 2. Disable vulkan useflag for libplacebo 3. Install libplacebo 4. Notice that the libplacebo.pc file includes `Requires.private: vulkan`. To observe the correct behavior: 1. Uninstall vulkan, make sure it's not present in your system. 2. Install libplacebo 3. Notice that the libplacebo.pc no longer contains the private requirement on vulkan. I haven't dug into whether it's just a "bug" with the pc file or goes deeper than that.
Good to know (messy) but I think we can ignore it, these would only be used when attempting to link statically but we don't provide the static lib and nothing should be attempting that. And libplacebo itself is still not linking with it, it's "probably" just some logic error with the pkgconfig generation (wouldn't be the first time it has problems with that). $ pkg-config --libs libplacebo -lplacebo $ pkg-config --libs --static libplacebo -lplacebo -lm -pthread -ldl -lshaderc_shared -lvulkan -llcms2 -llcms2_fast_float -llcms2_threaded -pthread -lm If concerned by the inconsistency, can always try to get it fixed upstream though.
If you have a system where libplacebo.pc is privately requiring vulkan, but vulkan has since then been uninstalled (obviously allowed since portage isn't counting it as a dependency as libplacebo was built with -vulkan) then libplacebo pkg-config is broken *even if* `--static` is not specified. ~> grep 'vulkan' /usr/lib64/pkgconfig/libplacebo.pc pl_has_vulkan=0 Requires.private: vulkan ~> pkgconf --libs libplacebo Package vulkan was not found in the pkg-config search path. Perhaps you should add the directory containing `vulkan.pc' to the PKG_CONFIG_PATH environment variable Package 'vulkan', required by 'libplacebo', not found ~> pkgconf --version 2.4.3 There's a bit more discussion about it here if you'd want to follow along: https://lists.sr.ht/~skeeto/public-inbox/%3Ccyzr422npxkldaoirrrelwsronyetppusxewb4y4yo5p7olnky@zwqe36nsd4tp%3E#%3Ckrmpupuaclniq7bpprqsu2mr4j6uhm2fa5xhprmuk3jakcfwnu@2qbm2qbgbarr%3E And this arguably can be considered a pkgconf regression, but regardless I don't think we should just "ignore it" since in practice, it means the user's system ends up borked (regardless of whether they use `--static` or not).
Oh right, I forgot that pkgconf can complain -- did have issues with that before.
Not familiar with partial_dependency() but I think? it gets combined here, vulkan-headers are always required (hard dependency) but it adds in vulkan-loader to it: vulkan_loader = dependency('vulkan', required: false) vulkan_headers = vulkan_loader.partial_dependency(includes: true, compile_args: true) ... build_deps += vulkan_headers ^ build_deps are added as-is to pkgconfig deps The rest (for linking) has actual guards: if vulkan_build.allowed() ... if vulkan_link.allowed() build_deps += vulkan_loader
No real time atm due to priorities, but might mess with it a bit later, or be lazy and just sed vulkan out of the pkg-config until sorted out upstream.
(In reply to Ionen Wolkens from comment #4) > Not familiar with partial_dependency() but I think? it gets combined here, > vulkan-headers are always required (hard dependency) but it adds in > vulkan-loader to it: > > vulkan_headers = vulkan_loader.partial_dependency(includes: true, > compile_args: true) Not sure but apparently issue is on meson's side? CC ztrawhcse https://github.com/mesonbuild/meson/issues/11080 fwiw libplacebo upstream normally uses bundled vulkan-headers which does not have this problem
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71df98450bf4ca3dbd143cb48ba747ae670027fa commit 71df98450bf4ca3dbd143cb48ba747ae670027fa Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-03-11 22:46:14 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-03-11 23:06:14 +0000 media-libs/libplacebo: workaround vulkan leaking into .pc Is a bit of a edge case, so skipping revbump. Would've been simpler to patch the meson.build to handle all cases but ah well, at least won't need to rebase. Closes: https://bugs.gentoo.org/951125 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> media-libs/libplacebo/libplacebo-7.349.0.ebuild | 10 ++++++++++ media-libs/libplacebo/libplacebo-9999.ebuild | 10 ++++++++++ 2 files changed, 20 insertions(+)