GZDoom 4.10.0 doesn't compile using GCC 14.2.0

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
User avatar
ergosum
Posts: 3
Joined: Tue Oct 01, 2024 10:11 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux

GZDoom 4.10.0 doesn't compile using GCC 14.2.0

Post by ergosum »

Hello! This is my first request on this forum.

I'm trying to build a GZDoom version 4.10.0 in order to keep alive an old game.
The build works fine if I compile the source code using this:

[code]$ gcc --version
gcc (GCC) 12.2.0[/code]

It doesn't work when I use the following from latest Flatpak runtime (24.08):

[code]$ gcc --version
gcc (GCC) 14.2.0[/code]

I'm not a C++ expert, but I found the following error in logs:

[code][271/691] Building CXX object src/CMakeFiles/zdoom.dir/d_main.cpp.o
FAILED: src/CMakeFiles/zdoom.dir/d_main.cpp.o
/usr/bin/c++ -DARCH_IA32 -DDYN_GTK=1 -DDYN_OPENAL -DHAVE_MMX=1 -DHAVE_VM_JIT -DUSE_LIBVPX=1 -D__forceinline=inline -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/SDL2 -I/run/build/gzdoom/libraries/lzma/C -I/run/build/gzdoom/libraries/discordrpc/include -I/run/build/gzdoom/libraries/asmjit -I/run/build/gzdoom/src -I/run/build/gzdoom/src/. -I/run/build/gzdoom/src/common/audio/sound -I/run/build/gzdoom/src/common/audio/music -I/run/build/gzdoom/src/common/2d -I/run/build/gzdoom/src/common/cutscenes -I/run/build/gzdoom/src/common/thirdparty/libsmackerdec/include -I/run/build/gzdoom/src/common/thirdparty -I/run/build/gzdoom/src/common/textures -I/run/build/gzdoom/src/common/textures/formats -I/run/build/gzdoom/src/common/textures/hires -I/run/build/gzdoom/src/common/models -I/run/build/gzdoom/src/common/filesystem -I/run/build/gzdoom/src/common/utility -I/run/build/gzdoom/src/common/console -I/run/build/gzdoom/src/common/engine -I/run/build/gzdoom/src/common/menu -I/run/build/gzdoom/src/common/statusbar -I/run/build/gzdoom/src/common/fonts -I/run/build/gzdoom/src/common/objects -I/run/build/gzdoom/src/common/startscreen -I/run/build/gzdoom/src/common/rendering -I/run/build/gzdoom/src/common/rendering/hwrenderer/data -I/run/build/gzdoom/src/common/rendering/gl_load -I/run/build/gzdoom/src/common/rendering/gl -I/run/build/gzdoom/src/common/rendering/gles -I/run/build/gzdoom/src/common/rendering/gles/glad/include -I/run/build/gzdoom/src/common/rendering/gles/Mali_OpenGL_ES_Emulator/include -I/run/build/gzdoom/src/common/rendering/vulkan/thirdparty -I/run/build/gzdoom/src/common/scripting/vm -I/run/build/gzdoom/src/common/scripting/jit -I/run/build/gzdoom/src/common/scripting/core -I/run/build/gzdoom/src/common/scripting/interface -I/run/build/gzdoom/src/common/scripting/frontend -I/run/build/gzdoom/src/common/scripting/backend -I/run/build/gzdoom/src/g_statusbar -I/run/build/gzdoom/src/console -I/run/build/gzdoom/src/playsim -I/run/build/gzdoom/src/playsim/bots -I/run/build/gzdoom/src/playsim/mapthinkers -I/run/build/gzdoom/src/gamedata -I/run/build/gzdoom/src/gamedata/textures -I/run/build/gzdoom/src/gamedata/fonts -I/run/build/gzdoom/src/rendering -I/run/build/gzdoom/src/rendering/hwrenderer -I/run/build/gzdoom/src/rendering/2d -I/run/build/gzdoom/src/r_data -I/run/build/gzdoom/src/sound -I/run/build/gzdoom/src/menu -I/run/build/gzdoom/src/sound/backend -I/run/build/gzdoom/src/xlat -I/run/build/gzdoom/src/utility -I/run/build/gzdoom/src/utility/nodebuilder -I/run/build/gzdoom/src/scripting -I/run/build/gzdoom/src/scripting/zscript -I/run/build/gzdoom/src/../libraries/gdtoa -I/run/build/gzdoom/src/../libraries/glslang/glslang/Public -I/run/build/gzdoom/src/../libraries/glslang/spirv -I/run/build/gzdoom/libraries/gdtoa -I/run/build/gzdoom/src/common/platform/posix -I/run/build/gzdoom/src/common/platform/posix/sdl -I/run/build/gzdoom/libraries/glslang/glslang/.. -I/run/build/gzdoom/libraries/glslang/spirv/.. -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off -Wno-unused-result -fno-strict-aliasing -std=c++17 -ffp-contract=off -DHAVE_VULKAN -DHAVE_GLES2 -fPIE -fopenmp -fomit-frame-pointer -O3 -DNDEBUG -std=c++17 -include g_pch.h -MD -MT src/CMakeFiles/zdoom.dir/d_main.cpp.o -MF src/CMakeFiles/zdoom.dir/d_main.cpp.o.d -o src/CMakeFiles/zdoom.dir/d_main.cpp.o -c /run/build/gzdoom/src/d_main.cpp
In file included from /run/build/gzdoom/src/g_pch.h:32,
from <command-line>:
/run/build/gzdoom/src/common/utility/tarray.h:672:9: warning: template-id not allowed for destructor in C++20 [-Wtemplate-id-cdtor]
672 | ~TDeletingArray<T, TT> ()
| ^
/run/build/gzdoom/src/common/utility/tarray.h:672:9: note: remove the ‘< >’
/run/build/gzdoom/src/d_main.cpp: In function ‘int D_DoomMain_Internal()’:
/run/build/gzdoom/src/d_main.cpp:3621:24: error: incomplete type ‘PType’ used in nested name specifier
3621 | PType::StaticInit();
| ^~~~~~~~~~
[/code]

Do you think is possible to compile it using a modern compiler?
User avatar
ergosum
Posts: 3
Joined: Tue Oct 01, 2024 10:11 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux

Re: GZDoom 4.10.0 doesn't compile using GCC 14.2.0

Post by ergosum »

FYI

After some research, I applied a patch to get it working (see [1]).

[1] https://github.com/flathub/com.moddb.To ... 9b4391b1fd

Return to “Technical Issues”