libsdl2-2.0.12-r1 with Vulkan useflag fails due to undefined VK_RESULT_RANGE_SIZE, going through the code it i was unable to find any definition of the static VK_RESULT_RANGE_SIZE but this var seems to be used in the source code src/video/SDL_vulkan_utils.c The definition is used only to break out the switch statement and fall to an error from what i can see (correct me if im wrong) Since this definition is not there maybe it would be an idea to remove it from the switch? this will just result in an error_<unknown> if its every used or defined again. I used this simple patch ``` --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -85,7 +85,6 @@ case VK_ERROR_INVALID_SHADER_NV: return "VK_ERROR_INVALID_SHADER_NV"; case VK_RESULT_MAX_ENUM: - case VK_RESULT_RANGE_SIZE: break; } if(result < 0) ``` to solve the build issues. the ebuild use are as follows: media-libs/libsdl2-2.0.12-r1::gentoo USE="X alsa dbus gles2 haptic jack joystick nas opengl oss pulseaudio sound threads udev video vulkan wayland xinerama (-aqua) (-custom-cflags) -kms -libsamplerate -static-libs -tslib -xscreensaver" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx sse sse2 -3dnow" VIDEO_CARDS="(-vc4)" Note this is caused by the combination of Vulkan and ABI 32
I have this issue too. The patch also worked for me. However, I believe this issue lies more with upstream than with Gentoo, so someone should report it to them.
This error only happens with the latest vulkan-headers, so it is probably better to make the fix conditional. --- a/src/video/SDL_vulkan_utils.c 2020-03-10 21:36:18.000000000 -0400 +++ b/src/video/SDL_vulkan_utils.c 2020-06-14 21:49:15.780898839 -0400 @@ -85,7 +85,9 @@ case VK_ERROR_INVALID_SHADER_NV: return "VK_ERROR_INVALID_SHADER_NV"; case VK_RESULT_MAX_ENUM: +#if VK_HEADER_VERSION < 140 case VK_RESULT_RANGE_SIZE: +#endif break; } if(result < 0)
Confirming the patch submitted by cyrillic successfully compiled. using media-libs/libsdl2-2.0.10-r1 and dev-util/vulkan-headers-1.2.143
(In reply to cyrillic from comment #2) > This error only happens with the latest vulkan-headers, so it is probably > better to make the fix conditional. > > --- a/src/video/SDL_vulkan_utils.c 2020-03-10 21:36:18.000000000 -0400 > +++ b/src/video/SDL_vulkan_utils.c 2020-06-14 21:49:15.780898839 -0400 > @@ -85,7 +85,9 @@ > case VK_ERROR_INVALID_SHADER_NV: > return "VK_ERROR_INVALID_SHADER_NV"; > case VK_RESULT_MAX_ENUM: > +#if VK_HEADER_VERSION < 140 > case VK_RESULT_RANGE_SIZE: > +#endif > break; > } > if(result < 0) Confirmed that this is working, do we know that its specific to `140` an not other header versions? (at the moment I don't have the time to check)
Issue and proposed solution confirmed by me.
Same Problem, the patch made me able to build it.
(In reply to silwerspawn from comment #0) > libsdl2-2.0.12-r1 with Vulkan useflag fails due to undefined > VK_RESULT_RANGE_SIZE, ... > the ebuild use are as follows: > media-libs/libsdl2-2.0.12-r1::gentoo USE="X alsa dbus gles2 haptic jack > joystick nas opengl oss pulseaudio sound threads udev video vulkan wayland > xinerama (-aqua) (-custom-cflags) -kms -libsamplerate -static-libs -tslib > -xscreensaver" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx sse sse2 -3dnow" > VIDEO_CARDS="(-vc4)" > > Note this is caused by the combination of Vulkan and ABI 32 Re: The "ABI 32" I've just hit the same fail even with ABI_X86= -32 ... The full set of flags tried are: media-libs/libsdl2-2.0.12-r1::gentoo [2.0.10-r1::gentoo] USE="X alsa dbus joystick opengl pulseaudio sound threads udev video vulkan xscreensaver (-aqua) (-custom-cflags) -gles2 -haptic -jack% -kms -libsamplerate -nas -oss -static-libs -tslib -wayland -xinerama (-altivec%)" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="3dnow mmx sse sse2" VIDEO_CARDS="(-vc4)"
Created attachment 647320 [details, diff] Patchfile used for media-libs/libsdl2-2.0.12-r1 Confirmed fixes the compile/emerge. Thanks, Martin
*** Bug 732120 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cf54bdeb9936fbbe013e776c397933e7d04543b commit 7cf54bdeb9936fbbe013e776c397933e7d04543b Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2020-07-11 13:38:33 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2020-07-11 13:39:26 +0000 media-libs/libsdl2: Fix building against the latest Vulkan headers Closes: https://bugs.gentoo.org/721954 Package-Manager: Portage-2.3.103, Repoman-2.3.22 Signed-off-by: James Le Cuirot <chewi@gentoo.org> .../libsdl2/files/libsdl2-2.0.12-static-libs.patch | 4 ++++ .../libsdl2/files/libsdl2-2.0.12-vulkan-headers.patch | 17 +++++++++++++++++ media-libs/libsdl2/libsdl2-2.0.12-r1.ebuild | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-)
there is some background information available: https://github.com/KhronosGroup/Vulkan-Docs/issues/1230
*** Bug 732386 has been marked as a duplicate of this bug. ***
This bug also exists for 2.0.10-r1. Applying the patch works.
*** Bug 733882 has been marked as a duplicate of this bug. ***