We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5227 - libsdl2 doesn't compile anymore against recent vulkan-headers
Summary: libsdl2 doesn't compile anymore against recent vulkan-headers
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.10
Hardware: x86_64 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.14
Depends on:
Blocks:
 
Reported: 2020-07-09 17:25 UTC by herrtimson
Modified: 2020-12-09 03:06 UTC (History)
2 users (show)

See Also:


Attachments
compressed build log from libsdl2 (9.61 KB, application/gzip)
2020-07-09 17:25 UTC, herrtimson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description herrtimson 2020-07-09 17:25:19 UTC
Created attachment 4406 [details]
compressed build log from libsdl2

I got this beauty when trying to compile libsdl2 with vulkan support:

libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -O2 -march=znver1 -pipe -DUSING_GENERATED_CONFIG_H -Iinclude -I/var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/include -idirafter /var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/src/video/khronos -mmmx -msse -msse2 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -MMD -MT build/SDL_yuv.lo -c /var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/src/video/SDL_yuv.c  -fPIC -DPIC -o build/.libs/SDL_yuv.o
/var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/src/video/SDL_vulkan_utils.c: In function ‘SDL_Vulkan_GetResultString’:
/var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/src/video/SDL_vulkan_utils.c:88:10: error: ‘VK_RESULT_RANGE_SIZE’ undeclared (first use in this function)
   88 |     case VK_RESULT_RANGE_SIZE:
      |          ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-libs/libsdl2-2.0.12-r1/work/SDL2-2.0.12/src/video/SDL_vulkan_utils.c:88:10: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:560: build/SDL_vulkan_utils.lo] Error 1
make: *** Waiting for unfinished jobs....


via some arcane magic I found that VK_RESULT_RANGE_SIZE has been removed in the headers with release 1.2.140 I believe

more on the reasons can be found here: https://github.com/KhronosGroup/Vulkan-Docs/issues/1230

I'm not capable of writing a patch for this, and I don't have a usecase for libsdl2 with vulkan. So, I just wanted to let you know that there is a problem around the corner. 

the full build log is attached
Comment 1 J. Garcia 2020-07-25 08:28:06 UTC
I've the same problem on Gentoo.

libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -O2 -march=bdver3 -pipe -DUSING_GENERATED_CONFIG_H -Iinclude -I/var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/include -idirafter /var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/src/video/khronos -mmmx -msse -msse2 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -MMD -MT build/SDL_vulkan_utils.lo -c /var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/src/video/SDL_vulkan_utils.c  -fPIC -DPIC -o build/.libs/SDL_vulkan_utils.o
/var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/src/video/SDL_vulkan_utils.c: In function ‘SDL_Vulkan_GetResultString’:
/var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/src/video/SDL_vulkan_utils.c:88:10: error: ‘VK_RESULT_RANGE_SIZE’ undeclared (first use in this function)
   88 |     case VK_RESULT_RANGE_SIZE:
      |          ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-libs/libsdl2-2.0.10-r1/work/SDL2-2.0.10/src/video/SDL_vulkan_utils.c:88:10: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:554: build/SDL_vulkan_utils.lo] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: media-libs/libsdl2-2.0.10-r1::gentoo failed (compile phase):
 *   emake failed

Some people say that edit source and add conditional vulkan-headers version compatibility < 140, it's is a good idea?.


Current version of the vulkan-headers is: 1.2.143.
Comment 2 Sam Lantinga 2020-08-10 15:39:35 UTC
Maybe we should just update the headers included in SDL? Ryan, what do you think?
Comment 3 Sam Lantinga 2020-12-09 03:06:13 UTC
Fixed!
https://hg.libsdl.org/SDL/rev/b0cdfc4affed