diff mbox series

vulkan-validation-layers: fix compile failure with DEBUG_BUILD = 1

Message ID 20250716073233.3020439-1-hongxu.jia@windriver.com
State New
Headers show
Series vulkan-validation-layers: fix compile failure with DEBUG_BUILD = 1 | expand

Commit Message

Hongxu Jia July 16, 2025, 7:32 a.m. UTC
When building with GCC 14+ using -Og (DEBUG_BUILD = 1), got
the following errors:

$ echo 'DEBUG_BUILD = "1"' >> conf/local.conf
$ echo 'DISTRO_FEATURES:append = " vulkan"' >> conf/local.conf
$ bitbake vulkan-validation-layers
...
|tmp/work/core2-64-poky-linux/vulkan-validation-layers/1.4.313.0/sources/
vulkan-validation-layers-1.4.313.0/layers/./external/xxhash.h:4822:1: error:
inlining failed in call to 'always_inline' 'void XXH3_scrambleAcc_sse2(void*,
const void*)': function not considered for inlining
...

Refer [1], using XXH_NO_INLINE_HINTS when compiling with -Og (DEBUG_BUILD = 1)

[1] https://github.com/Cyan4973/xxHash/issues/943

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../vulkan/vulkan-validation-layers_1.4.313.0.bb                | 2 ++
 1 file changed, 2 insertions(+)

Comments

Randy MacLeod Aug. 4, 2025, 4:47 p.m. UTC | #1
On 2025-07-16 3:32 a.m., hongxu via lists.openembedded.org wrote:
> When building with GCC 14+ using -Og (DEBUG_BUILD = 1), got
> the following errors:
>
> $ echo 'DEBUG_BUILD = "1"' >> conf/local.conf
> $ echo 'DISTRO_FEATURES:append = " vulkan"' >> conf/local.conf
> $ bitbake vulkan-validation-layers
> ...
> |tmp/work/core2-64-poky-linux/vulkan-validation-layers/1.4.313.0/sources/
> vulkan-validation-layers-1.4.313.0/layers/./external/xxhash.h:4822:1: error:
> inlining failed in call to 'always_inline' 'void XXH3_scrambleAcc_sse2(void*,
> const void*)': function not considered for inlining
> ...
>
> Refer [1], using XXH_NO_INLINE_HINTS when compiling with -Og (DEBUG_BUILD = 1)
>
> [1]https://github.com/Cyan4973/xxHash/issues/943
>
> Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com>
> ---
>   .../vulkan/vulkan-validation-layers_1.4.313.0.bb                | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
> index 63a3aa4ae64..c05a1d87007 100644
> --- a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
> +++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
> @@ -26,6 +26,8 @@ EXTRA_OECMAKE = "\
>       -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
>       "
>   
> +CXXFLAGS:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '-DXXH_NO_INLINE_HINTS=1', '', d)}"
> +
>   PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
>   PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
>   
>
Hi Hongxu,

The issue was resolved upstream but fixed in a slightly different way.

Rather than carry this change in oe-core and have to remember to remove 
it or rather forgetting about it for a release or two,
can you  get upstream vulkan to update to pull in the xxHash change and 
then update vulkan for oe-core/master?

Meanwhile, we should carry this in WR Linux until the vulkan update gets 
into oe-core.

This is probably a good approach for DEBUG_BUILD issues in general 
unless other people
on this list speak up and explain why they are also interested in the 
DEBUG_BUILD working.

../Randy



> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#220435):https://lists.openembedded.org/g/openembedded-core/message/220435
> Mute This Topic:https://lists.openembedded.org/mt/114181365/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
index 63a3aa4ae64..c05a1d87007 100644
--- a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.313.0.bb
@@ -26,6 +26,8 @@  EXTRA_OECMAKE = "\
     -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
     "
 
+CXXFLAGS:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '-DXXH_NO_INLINE_HINTS=1', '', d)}"
+
 PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
 PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"