Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666596 - =media-libs/vulkan-layers- fails to compile
Summary: =media-libs/vulkan-layers- fails to compile
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nick Sarnie
Depends on:
Reported: 2018-09-19 22:59 UTC by Bernd
Modified: 2018-09-22 17:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info (emerge-info.txt,12.46 KB, text/plain)
2018-09-19 22:59 UTC, Bernd
build log (vulkan-layers-,110.41 KB, text/x-log)
2018-09-19 23:00 UTC, Bernd
spirv.hpp (spirv.hpp,33.13 KB, text/x-c++hdr)
2018-09-22 15:20 UTC, Charo del Genio
SPIRV/spirv.hpp (spirv.hpp,33.13 KB, text/x-c++hdr)
2018-09-22 17:18 UTC, Bernd

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2018-09-19 22:59:01 UTC
Created attachment 547354 [details]
emerge --info

The package fails to compile with

 94%] Building CXX object layers/CMakeFiles/VkLayer_core_validation.dir/shader_validation.cpp.o
cd /var/tmp/portage/media-libs/vulkan-layers- && /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -DAPI_NAME=\"Vulkan\" -DFALLBACK_CONFIG_DIRS=\"/etc/xdg\" -DFALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\" -DSYSCONFDIR=\"/etc\" -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_WAYLAND_KHX -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XCB_KHX -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_KHX -DVK_USE_PLATFORM_XLIB_XRANDR_EXT -DVkLayer_core_validation_EXPORTS -I/var/tmp/portage/media-libs/vulkan-layers- -I/var/tmp/portage/media-libs/vulkan-layers- -I/var/tmp/portage/media-libs/vulkan-layers-   -DNDEBUG -O2 -pipe -march=bdver2 -mprefer-avx128 -mvzeroupper -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp -Wimplicit-fallthrough=0 -std=c++11 -fno-rtti -fvisibility=hidden -Wpointer-arith -Wno-unused-function -Wno-sign-compare -fPIC   -o CMakeFiles/VkLayer_core_validation.dir/shader_validation.cpp.o -c /var/tmp/portage/media-libs/vulkan-layers-
/var/tmp/portage/media-libs/vulkan-layers- In function ‘bool ValidateShaderCapabilities(core_validation::layer_data*, const shader_module*, VkShaderStageFlagBits, bool)’:
/var/tmp/portage/media-libs/vulkan-layers- error: ‘CapabilityShaderNonUniformEXT’ is not a member of ‘spv’
         {spv::CapabilityShaderNonUniformEXT, {VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, nullptr, &DeviceExtensions::vk_ext_descriptor_indexing}},
/var/tmp/portage/media-libs/vulkan-layers- note: suggested alternative: ‘CapabilityGroupNonUniform’
         {spv::CapabilityShaderNonUniformEXT, {VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, nullptr, &DeviceExtensions::vk_ext_descriptor_indexing}},

and additional similar errors (see buildlog)

For emerge --info see attached file.
emerge -pqv '=media-libs/vulkan-layers-'
[ebuild  N    ] media-libs/vulkan-layers-  USE="X wayland" ABI_X86="32 (64) (-x32)"
Comment 1 Bernd 2018-09-19 23:00:24 UTC
Created attachment 547356 [details]
build log
Comment 2 Nick Sarnie gentoo-dev 2018-09-20 22:12:25 UTC
Hi Bernd, 

What version of vulkan-headers is installed on your system?

Comment 3 Charo del Genio 2018-09-22 10:51:54 UTC
I can confirm this, with the same exact error. For that matters, in my case I have vulkan-headers- installed.
Comment 4 Nick Sarnie gentoo-dev 2018-09-22 14:12:36 UTC
Based on the error, there is missing information in spirv.hpp which is installed by dev-util/spirv-headers which is part of the dependency tree.

I could not reproduce this with any in-tree version of spirv-headers.

Can either of you please upload your /usr/include/SPIRV/spirv.hpp file and/or try reinstalling spriv-headers?

Thank you,
Comment 5 Charo del Genio 2018-09-22 15:19:29 UTC
So, I had no spirv-headers installed at all. I believe this is because all the versions in the portage tree are currently keyworded ~amd64, and somehow the necessity of the package did not get detected by any ebuild.

Thus, I emerged dev-util/spirv-headers-1.3 and tried again, but I got the very same error. Then, I emerged the latest version of spirv-headers available, namely spirv-headers-1.3.4_pre20180917, but emerging vulkan-layers still fails with the same error.

I'm attaching /usr/include/SPIRV/spirv.hpp in the next comment.
Comment 6 Charo del Genio 2018-09-22 15:20:38 UTC
Created attachment 547518 [details]

/usr/include/SPIRV/spirv.hpp, as requested.
Comment 7 Nick Sarnie gentoo-dev 2018-09-22 16:51:40 UTC
Thanks. I must have not been paying attention earlier. spirv.hpp is installed by glslang, not spirv-headers.

Can you confirm installing glslang-7.9.2888 fixes the issue?

Comment 8 Bernd 2018-09-22 17:17:35 UTC
Hi Nick,

I too have vulkan-headers- installed.

For the spirv.hpp file, I have 5 versions installed.

First there's /usr/include/SPIRV/spirv.hpp which belongs to dev-util/glslang, then there are 4 files /usr/include/spirv/{1.{0,1,2},unified1}/spirv.hpp which all belong to dev-util/spirv-headers.

I have glslang-6.2.2596 and spirv-headers-1.3.4_pre20180917 installed.
Comment 9 Bernd 2018-09-22 17:18:33 UTC
Created attachment 547524 [details]

That's what is included in the shader_validation.cpp file.
Comment 10 Nick Sarnie gentoo-dev 2018-09-22 17:19:06 UTC
Thanks Bernd. I expect glslang-7.9.2888 fixes the issue. Can you try installing it and recompiling vulkan-layers?

If so I will fix the ebuild.

Comment 11 Charo del Genio 2018-09-22 17:34:24 UTC
Yes, I can confirm that glslang-7.9.2888 fixes the issue.

Comment 12 Larry the Git Cow gentoo-dev 2018-09-22 17:37:46 UTC
The bug has been closed via the following commit(s):

commit 6fab3a3ddf6976a6cafe6cb6fb8e62441771c4fa
Author:     Nick Sarnie <>
AuthorDate: 2018-09-22 17:35:57 +0000
Commit:     Nick Sarnie <>
CommitDate: 2018-09-22 17:35:57 +0000

    media-libs/vulkan-layers: Fix glslang dependency
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 media-libs/vulkan-layers/vulkan-layers- | 4 ++--
 media-libs/vulkan-layers/vulkan-layers-9999.ebuild     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 13 Bernd 2018-09-22 17:47:48 UTC
Sarnex, I can also confirm glslang-7.9.2888 fixes the issue.

Comment 14 Nick Sarnie gentoo-dev 2018-09-22 17:48:14 UTC
Thanks all, I've pushed the fix.