Forum rules Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!
[edited thread title, previously "4.6.0 doesn't work on my computer", "4.6.0 won't work with the SDL found in Buster stable", originally "Can't compile 4.6.0 and can't figure out what to install"]
The first definitely looks Vulkan-specific so I'm not sure why it's there now? But I guess that SDL_GetWindowBordersSize is one of those things that's in the new SDL.
If only I could update just that without it getting me to completely overhaul or uninstall a huge amount of other stuff...
SDL2 in buster definitely has SDL_vulkan.h. The official deb is compiled against Ubuntu 18.04 which is using an older version of SDL2, 2.0.8 vs 2.0.9, just fine.
I've found /usr/include/SDL2/SDL_vulkan.h while searching my entire system on Seamonkey. No idea why it can't be found by the compiler. I'm guessing this file would contain whatever the blob is complaining about with that hapax legomenon error message, in which case no idea why it can't be found by GZDoom either.
And trying to add the full path for SDL_vulkan.h to sdlglvideo.cpp just gives me this unspeakable mess:
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:163:5: error: redefinition of enumerator
'SDL_FALSE'
SDL_FALSE = 0,
^
/usr/local/include/SDL2/SDL_stdinc.h:128:5: note: previous definition is here
SDL_FALSE = 0,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:164:5: error: redefinition of enumerator
'SDL_TRUE'
SDL_TRUE = 1
^
/usr/local/include/SDL2/SDL_stdinc.h:129:5: note: previous definition is here
SDL_TRUE = 1
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:165:3: error: typedef redefinition with different
types ('enum SDL_bool' vs 'enum SDL_bool')
} SDL_bool;
^
/usr/local/include/SDL2/SDL_stdinc.h:130:3: note: previous definition is here
} SDL_bool;
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:312:9: warning: 'SDL_COMPILE_TIME_ASSERT' macro
redefined [-Wmacro-redefined]
#define SDL_COMPILE_TIME_ASSERT(name, x) \
^
/usr/local/include/SDL2/SDL_stdinc.h:169:9: note: previous definition is here
#define SDL_COMPILE_TIME_ASSERT(name, x) \
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:339:5: error: redefinition of enumerator
'DUMMY_ENUM_VALUE'
DUMMY_ENUM_VALUE
^
/usr/local/include/SDL2/SDL_stdinc.h:196:5: note: previous definition is here
DUMMY_ENUM_VALUE
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:340:3: error: typedef redefinition with different
types ('enum SDL_DUMMY_ENUM' vs 'enum SDL_DUMMY_ENUM')
} SDL_DUMMY_ENUM;
^
/usr/local/include/SDL2/SDL_stdinc.h:197:3: note: previous definition is here
} SDL_DUMMY_ENUM;
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:420:23: error: redefinition of 'SDL_memset4'
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
^
/usr/local/include/SDL2/SDL_stdinc.h:268:23: note: previous definition is here
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:31:
/usr/include/SDL2/SDL_stdinc.h:594:24: error: redefinition of 'SDL_memcpy4'
SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, ...
^
/usr/local/include/SDL2/SDL_stdinc.h:299:24: note: previous definition is here
SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
In file included from /usr/include/SDL2/SDL_pixels.h:32:
/usr/include/SDL2/SDL_endian.h:78:1: error: redefinition of 'SDL_Swap16'
SDL_Swap16(Uint16 x)
^
/usr/local/include/SDL2/SDL_endian.h:78:1: note: previous definition is here
SDL_Swap16(Uint16 x)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
In file included from /usr/include/SDL2/SDL_pixels.h:32:
/usr/include/SDL2/SDL_endian.h:122:1: error: redefinition of 'SDL_Swap32'
SDL_Swap32(Uint32 x)
^
/usr/local/include/SDL2/SDL_endian.h:116:1: note: previous definition is here
SDL_Swap32(Uint32 x)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
In file included from /usr/include/SDL2/SDL_pixels.h:32:
/usr/include/SDL2/SDL_endian.h:189:1: error: redefinition of 'SDL_Swap64'
SDL_Swap64(Uint64 x)
^
/usr/local/include/SDL2/SDL_endian.h:168:1: note: previous definition is here
SDL_Swap64(Uint64 x)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
In file included from /usr/include/SDL2/SDL_pixels.h:32:
/usr/include/SDL2/SDL_endian.h:213:1: error: redefinition of 'SDL_SwapFloat'
SDL_SwapFloat(float x)
^
/usr/local/include/SDL2/SDL_endian.h:192:1: note: previous definition is here
SDL_SwapFloat(float x)
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:53:5: error: redefinition of enumerator
'SDL_PIXELTYPE_UNKNOWN'
SDL_PIXELTYPE_UNKNOWN,
^
/usr/local/include/SDL2/SDL_pixels.h:52:5: note: previous definition is here
SDL_PIXELTYPE_UNKNOWN,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:54:5: error: redefinition of enumerator
'SDL_PIXELTYPE_INDEX1'
SDL_PIXELTYPE_INDEX1,
^
/usr/local/include/SDL2/SDL_pixels.h:53:5: note: previous definition is here
SDL_PIXELTYPE_INDEX1,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:55:5: error: redefinition of enumerator
'SDL_PIXELTYPE_INDEX4'
SDL_PIXELTYPE_INDEX4,
^
/usr/local/include/SDL2/SDL_pixels.h:54:5: note: previous definition is here
SDL_PIXELTYPE_INDEX4,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:56:5: error: redefinition of enumerator
'SDL_PIXELTYPE_INDEX8'
SDL_PIXELTYPE_INDEX8,
^
/usr/local/include/SDL2/SDL_pixels.h:55:5: note: previous definition is here
SDL_PIXELTYPE_INDEX8,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:57:5: error: redefinition of enumerator
'SDL_PIXELTYPE_PACKED8'
SDL_PIXELTYPE_PACKED8,
^
/usr/local/include/SDL2/SDL_pixels.h:56:5: note: previous definition is here
SDL_PIXELTYPE_PACKED8,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:58:5: error: redefinition of enumerator
'SDL_PIXELTYPE_PACKED16'
SDL_PIXELTYPE_PACKED16,
^
/usr/local/include/SDL2/SDL_pixels.h:57:5: note: previous definition is here
SDL_PIXELTYPE_PACKED16,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:59:5: error: redefinition of enumerator
'SDL_PIXELTYPE_PACKED32'
SDL_PIXELTYPE_PACKED32,
^
/usr/local/include/SDL2/SDL_pixels.h:58:5: note: previous definition is here
SDL_PIXELTYPE_PACKED32,
^
In file included from /home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:66:
In file included from /usr/include/SDL2/SDL_vulkan.h:31:
In file included from /usr/include/SDL2/SDL_video.h:32:
/usr/include/SDL2/SDL_pixels.h:60:5: error: redefinition of enumerator
'SDL_PIXELTYPE_ARRAYU8'
SDL_PIXELTYPE_ARRAYU8,
^
/usr/local/include/SDL2/SDL_pixels.h:59:5: note: previous definition is here
SDL_PIXELTYPE_ARRAYU8,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
Looking at this more closely it seems to be finding two files that do the same thing?
For what it's worth, I have not seen anything else break running anything else that looks like it involves SDL, so it's probably not a corrupt installation but something related to paths GZDoom is using to search for the SDL Vulkan header. I have no idea how to configure that stuff.
Last edited by Matt on Sun May 23, 2021 12:29 am, edited 1 time in total.
Missing SDL_GetWindowBordersSize() declaration has not nothing to do with Vulkan support. It means that SDL2 version is older than 2.0.5. Please post output of the following command
Apparently, another installation of SDL2 was picked by CMake somehow. Please run the following command instead of just make, and post command line that triggered compilation error.
Graf Zahl wrote:You seem to have SDL headers in both /usr/include and /usr/local/include and obviously they are from different SDL versions if one is incomplete.
Turns out the one in /usr/local/include has a last modified date of 2015.
Moving it out of /usr/local/include into somewhere nonsensical (my home folder) did not fix it. wait.......
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_GetVulkanDrawableSize(int*, int*)':
sdlglvideo.cpp:(.text+0x304): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_GetVulkanPlatformExtensions(unsigned int*, char const**)':
sdlglvideo.cpp:(.text+0x325): undefined reference to `SDL_Vulkan_GetInstanceExtensions'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_CreateVulkanSurface(VkInstance_T*, VkSurfaceKHR_T**)':
sdlglvideo.cpp:(.text+0x355): undefined reference to `SDL_Vulkan_CreateSurface'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `SystemBaseFrameBuffer::GetClientWidth()':
sdlglvideo.cpp:(.text+0xacf): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `SystemBaseFrameBuffer::GetClientHeight()':
sdlglvideo.cpp:(.text+0xb3f): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `ProcessSDLWindowEvent(SDL_WindowEvent const&)':
sdlglvideo.cpp:(.text+0x10dc): undefined reference to `SDL_GetWindowBordersSize'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:7066: gzdoom] Error 1
make[1]: *** [CMakeFiles/Makefile2:1040: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:130: all] Error 2