mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.47k stars 1.59k forks source link

Vulkan detection fails on msys build #13016

Open benjamin-otte opened 5 months ago

benjamin-otte commented 5 months ago

When installing the mingw-w64-x86_64-vulkan and mingw-w64-x86_64-vulkan-loader packages but forgetting the mingw-w64-x86_64-vulkan-headers package, meson will behave as if Vulkan is available but then the build will fail because it can't #include <vulkan/vulkan.h>.

It should set the Vulkan dependency as not-found.

This was found after adding Vulkan support for GTK4 CI builder. See https://gitlab.gnome.org/GNOME/gtk/-/jobs/3737222 for an example build.
Adding the missing packages fixed the build.

lazka commented 5 months ago

Duplicate of #7956 it seems

To re-iterate it here, the problem is that the pkg-config file is part of the vulkan-loader project: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/loader/vulkan.pc.in the header files are in vulkan-headers: https://github.com/KhronosGroup/Vulkan-Headers.

So using the vulkan dependency to check for the headers is likely not correct (??)

As for MSYS2, we packaging them separately, same as Arch Linux.

Three options:

lazka commented 5 months ago

I've asked upstream if they have an opinion: https://github.com/KhronosGroup/Vulkan-Loader/issues/1463