Vulkan-Loader icon indicating copy to clipboard operation
Vulkan-Loader copied to clipboard

Downstream packaging best practices in combination with Vulkan-Headers

Open lazka opened this issue 10 months ago • 5 comments

We have the problem that Vulkan-Loader contains the pkg-config file, which some project use for detecting how to build against vulkan, while the headers are in the separate https://github.com/KhronosGroup/Vulkan-Headers project. This results in downstream packages needing to do extra check for headers etc.

In Arch Linux for example loader and headers are separate packages, resulting in build issues:

https://github.com/mesonbuild/meson/issues/7956

In MSYS2 we follow what Arch does, leading to the same issue:

https://github.com/mesonbuild/meson/issues/13016

Some downstream projects work around that by manually checking for headers:

https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/3fc66d4525916b9301236a000a6ed03311ed25a7/render/vulkan/meson.build#L17-25

In Debian the packages are built together and the development files are split out into a separate combined package (so the .pc files and the headers are together) https://packages.debian.org/source/trixie/vulkan-loader

What would be a good strategy to handle this split downstream?

  • Make loader depend on headers?
  • Build them together as if they were the same project? (In Arch this would mean one package, while in Debian this means runtime and dev files are split, according to the distro rules)
  • Make downstream projects not assume the the .pc file is relevant for the headers and do manual header checking, in the same prefix I'd guess?

Thanks!

lazka avatar Mar 29 '24 12:03 lazka