I'm trying to compile locally next program: https://github.com/aejsmith/vkdevicechooser Then when I've tried to configure the project, I got this: ``` │ ~/code/experiments/vkdevicechooser │ master meson builddir The Meson build system Version: 1.5.1 Source dir: /home/paxu/code/experiments/vkdevicechooser Build dir: /home/paxu/code/experiments/vkdevicechooser/builddir Build type: native build Project name: vkdevicechooser Project version: 1 C++ compiler for the host machine: ccache c++ (gcc 13.3.1 "c++ (Gentoo 13.3.1_p20240614 p17) 13.3.1 20240614") C++ linker for the host machine: c++ ld.bfd 2.42 Host machine cpu family: x86_64 Host machine cpu: x86_64 Has header "vulkan/vulkan.h" : YES Has header "vulkan/vk_layer.h" : YES Has header "vulkan/vk_layer_dispatch_table.h" : NO meson.build:17:4: ERROR: Problem encountered: Vulkan development files not present (vulkan/vk_layer_dispatch_table.h) A full log can be found at /home/paxu/code/experiments/vkdevicechooser/builddir/meson-logs/meson-log.txt WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. ``` Then I've tried to add see where is the header on pfl https://www.portagefilelist.de/?fs=vk_layer_dispatch_table.h#panchor I've emerged vulkan-loader and vulkan-layers. But it still cannot find the header. But that what `fzf` shows me: ``` fzf --walker-root=/usr -f vk_layer_dispatch_table.h /usr/src/debug/media-libs/vulkan-loader-1.3.283.0/Vulkan-Loader-vulkan-sdk-1.3.283.0/loader/generated/vk_layer_dispatch_table.h /usr/src/debug/media-libs/vulkan-layers-1.3.283.0/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0/layers/vulkan/generated/vk_layer_dispatch_table.h /usr/src/debug/www-client/ungoogled-chromium-127.0.6533.88_p1/chromium-127.0.6533.88/third_party/vulkan-loader/src/loader/generated/vk_layer_dispatch_table.h /usr/src/debug/www-client/ungoogled-chromium-127.0.6533.88_p1/chromium-127.0.6533.88/third_party/vulkan-validation-layers/src/layers/vulkan/generated/vk_layer_dispatch_table.h ``` So, the header theoretically exists in both packages. I've checked ebuild of the packages. I don't see much about this. I see this bug: https://bugs.gentoo.org/700734 It seems Nick Sarnie somehow solved by adding something like this into ebuild of vulkan-layers ``` -DGLSLANG_INSTALL_DIR="/usr" -DCMAKE_INSTALL_INCLUDEDIR="/usr/include/vulkan/" ``` Let's check if it works if manually locally install vulkan-layers: ``` │ ~/code/experiments wget https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/vulkan-sdk-1.3.283.0.tar.gz ✔ │ 09:48:47 --2024-08-21 09:48:55-- https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/vulkan-sdk-1.3.283.0.tar.gz Resolving github.com... 140.82.121.3 Connecting to github.com|140.82.121.3|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/KhronosGroup/Vulkan-ValidationLayers/tar.gz/refs/tags/vulkan-sdk-1.3.283.0 [following] --2024-08-21 09:48:55-- https://codeload.github.com/KhronosGroup/Vulkan-ValidationLayers/tar.gz/refs/tags/vulkan-sdk-1.3.283.0 Resolving codeload.github.com... 140.82.121.10 Connecting to codeload.github.com|140.82.121.10|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/x-gzip] Saving to: ‘vulkan-sdk-1.3.283.0.tar.gz’ vulkan-sdk-1.3.283.0.tar.gz [ <=> ] 4.99M 7.01MB/s in 0.7s 2024-08-21 09:48:56 (7.01 MB/s) - ‘vulkan-sdk-1.3.283.0.tar.gz’ saved [5230566] │ ~/code/experiments tar -xpf ./vulkan-sdk-1.3.283.0.tar.gz ✔ │ 09:48:56 │ ~/code/experiments cd Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0/ ✔ │ 09:49:12 │ ~/code/experiments/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0 cmake -S . -B ./build -DCMAKE_C_FLAGS='-pipe -march=native -ggdb3 -DNDEBUG' -DCMAKE_CXX_FLAGS='-pipe -march=native -ggdb3 -DNDEBUG' -DCMAKE_SKIP_RPATH=ON -DBUILD_WERROR=OFF -DBUILD_WSI_WAYLAND_SUPPORT=YES -DBUILD_WSI_XCB_SUPPORT=YES -DBUILD_WSI_XLIB_SUPPORT=YES -DBUILD_TESTS=OFF -DBUILD_LAYER_SUPPORT_FILES=True DGLSLANG_INSTALL_DIR="/usr" -DCMAKE_INSTALL_INCLUDEDIR="/usr/include/vulkan/" CMake Warning: Ignoring extra path from command line: "DGLSLANG_INSTALL_DIR=/usr" -- The CXX compiler identification is GNU 13.3.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done (0.2s) -- Generating done (0.0s) CMake Warning: Manually-specified variables were not used by the project: BUILD_LAYER_SUPPORT_FILES CMAKE_C_FLAGS -- Build files have been written to: /home/paxu/code/experiments/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0/build ``` It seems DGLSLANG_INSTALL_DIR shouldn't be set. But ok, let's continue, because it will show it `-DCMAKE_INSTALL_INCLUDEDIR="/usr/include/vulkan/"` works. `cmake --build ./build/ -j24 --verbose ` ... build.log , nothing interesting... ``` │ ~/code/experiments/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0 cmake --install ./build/ --prefix ./install_dir -- Install configuration: "" -- Installing: /home/paxu/code/experiments/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0/./install_dir/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json -- Installing: /home/paxu/code/experiments/Vulkan-ValidationLayers-vulkan-sdk-1.3.283.0/./install_dir/lib64/libVkLayer_khronos_validation.so ``` oh no, It doesn't work ... so IDK how to solve it.
To me, this looks like vkdevicechooser is just bitrotten. See https://github.com/aejsmith/vkdevicechooser/issues/21.
I was going to say: "Ah, you need media-libs/vulkan-loader[layers], and then make the change described at https://github.com/aejsmith/vkdevicechooser/issues/15#issuecomment-1138102455." But no, that doesn't get me it either.
I didn't deeply investigate this but it seems the cmake flag was removed here: https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/7e26128eb1fb69988ca5ed7227e953e0e2a3a9dc Comments seem to suggest nobody is supposed to use those files. Unclear to me if there's a packaging issue here but seems like no.
See comments here also https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/18
Based on the comments in the GH issue comments[1], it seems like vkdevicechooser is using a header that had been removed and the code of that project needs to be updated. [1] https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/18#issuecomment-1802581086
Thank you Nick!
Thanks for the initial investigation!
Thanks you too, I've found solution to my main problem: https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/18#issuecomment-1802660890 https://www.reddit.com/r/linux_gaming/comments/lil9x7/what_is_the_proper_usage_of_mesa_vk_device_select/ I've basically found the solution without the package because you mentioned the issue. Thanks you very much!