You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you checked that no other similar issue already exists?
I have searched and not found similar issues.
A clear and concise description of what the bug is.
gzdoom 4.10.0 does not compile with gcc 13. Of course, gcc 13 is not released yet.
The issue is a missing include.
Proposed patch:
--- a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h.orig 2023-02-03 11:34:29.412152601 +0200
+++ b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h 2023-02-03 11:34:46.549675907 +0200
@@ -20,6 +20,7 @@
// THE SOFTWARE.
//
Compilation fails with:
In file included from /var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp:8:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaUint32ToStr(char*, size_t, uint32_t)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2410:9: error: ‘snprintf’ was not declared in this scope
2410 | snprintf(outStr, strLen, "%u", static_cast(num));
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2262:1: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
2261 | #include
+++ |+#include
2262 |
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaUint64ToStr(char*, size_t, uint64_t)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2414:9: error: ‘snprintf’ was not declared in this scope
2414 | snprintf(outStr, strLen, "%llu", static_cast(num));
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2414:9: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaPtrToStr(char*, size_t, const void*)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2418:9: error: ‘snprintf’ was not declared in this scope
2418 | snprintf(outStr, strLen, "%p", ptr);
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2418:9: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In member function ‘virtual bool VmaBlockMetadata_Generic::Validate() const’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:7561:40: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
7561 | VMA_VALIDATE(subAlloc.size >= VMA_DEBUG_MARGIN);
| ^
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:4938:38: note: in definition of macro ‘VMA_VALIDATE’
4938 | #define VMA_VALIDATE(cond) do { if(!(cond)) {
| ^~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In member function ‘bool VmaBlockMetadata_Linear::CreateAllocationRequest_UpperAddress(uint32_t, uint32_t, VkDeviceSize, VkDeviceSize, VkDeviceSize, VmaSuballocationType, bool, uint32_t, VmaAllocationRequest*)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:9436:25: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
9436 | if(resultOffset < VMA_DEBUG_MARGIN)
| ^
The text was updated successfully, but these errors were encountered:
That patch is not good, because it modifies a file from a third party library.
In any case, it may be better to report it here: https://github.com/dpjudas/ZVulkan
I was able to compile with gcc version 13.1.1 20230714 on ArchLinux (I wasn't aware of this bug at the time so did not take notes. Perhaps the cmake or make file specifies an older gcc version, but my mastery of makefile syntax is incomplete.) Is this still an active bug?
Edit: gzdoom build g4.11pre-222-g62f37079a
GZDoom version
No response
Which game are you running with GZDoom?
Doom 2
What Operating System are you using?
Linux x86_64
Please describe your specific OS version
Gentoo Linux
Relevant hardware info
No response
Have you checked that no other similar issue already exists?
A clear and concise description of what the bug is.
gzdoom 4.10.0 does not compile with gcc 13. Of course, gcc 13 is not released yet.
The issue is a missing include.
Proposed patch:
--- a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h.orig 2023-02-03 11:34:29.412152601 +0200
+++ b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h 2023-02-03 11:34:46.549675907 +0200
@@ -20,6 +20,7 @@
// THE SOFTWARE.
//
+#include
#ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H
#define AMD_VULKAN_MEMORY_ALLOCATOR_H
Steps to reproduce the behaviour.
Explain how to reproduce
1.
2.
3.
Your configuration
No response
Provide a Log
Compilation fails with:
In file included from /var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp:8:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaUint32ToStr(char*, size_t, uint32_t)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2410:9: error: ‘snprintf’ was not declared in this scope
2410 | snprintf(outStr, strLen, "%u", static_cast(num));
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2262:1: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
2261 | #include
+++ |+#include
2262 |
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaUint64ToStr(char*, size_t, uint64_t)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2414:9: error: ‘snprintf’ was not declared in this scope
2414 | snprintf(outStr, strLen, "%llu", static_cast(num));
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2414:9: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaPtrToStr(char*, size_t, const void*)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2418:9: error: ‘snprintf’ was not declared in this scope
2418 | snprintf(outStr, strLen, "%p", ptr);
| ^~~~~~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:2418:9: note: ‘snprintf’ is defined in header ‘’; did you forget to ‘#include ’?
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In member function ‘virtual bool VmaBlockMetadata_Generic::Validate() const’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:7561:40: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
7561 | VMA_VALIDATE(subAlloc.size >= VMA_DEBUG_MARGIN);
| ^
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:4938:38: note: in definition of macro ‘VMA_VALIDATE’
4938 | #define VMA_VALIDATE(cond) do { if(!(cond)) {
| ^~~~
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h: In member function ‘bool VmaBlockMetadata_Linear::CreateAllocationRequest_UpperAddress(uint32_t, uint32_t, VkDeviceSize, VkDeviceSize, VkDeviceSize, VmaSuballocationType, bool, uint32_t, VmaAllocationRequest*)’:
/var/tmp/portage/games-fps/gzdoom-4.10.0/work/gzdoom-g4.10.0/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h:9436:25: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
9436 | if(resultOffset < VMA_DEBUG_MARGIN)
| ^
The text was updated successfully, but these errors were encountered: