Compile error using MSYS2

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
shoober420
Posts: 7
Joined: Sat Nov 22, 2025 12:08 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Compile error using MSYS2

Post by shoober420 »

im trying to compile GZDOOM from latest git commit as of this post (g4.15pre-645-g092b9c051 / https://github.com/ZDoom/gzdoom/commit/ ... 30a253c8b1) using MSYS2-x86_64-20250830 on Windows 11 and get a build error.

Code: Select all

[799/1385] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj
FAILED: [code=1] src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj
C:\msys64\mingw64\bin\c++.exe -DARCH_IA32 -DDYN_OPENAL -DHAVE_MMX=1 -DHAVE_VM_JIT -DTHIS_IS_GZDOOM -DUSE_LIBVPX=1 -D_WIN32 -D__forceinline=inline -IC:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32 -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/range_map/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/webp/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/ZWidget/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/ZVulkan/include -IC:/msys64/home/cr4ss/gzdoom-master/src/launcher -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering -IC:/msys64/home/cr4ss/gzdoom-master/src/scripting/zscript -IC:/msys64/home/cr4ss/gzdoom-master/src/scripting -IC:/msys64/home/cr4ss/gzdoom-master/src/utility/nodebuilder -IC:/msys64/home/cr4ss/gzdoom-master/src/utility -IC:/msys64/home/cr4ss/gzdoom-master/src/xlat -IC:/msys64/home/cr4ss/gzdoom-master/src/sound/backend -IC:/msys64/home/cr4ss/gzdoom-master/src/menu -IC:/msys64/home/cr4ss/gzdoom-master/src/sound -IC:/msys64/home/cr4ss/gzdoom-master/src/r_data -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering/2d -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering/hwrenderer -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata/fonts -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata/textures -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim/mapthinkers -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim/bots -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim -IC:/msys64/home/cr4ss/gzdoom-master/src/console -IC:/msys64/home/cr4ss/gzdoom-master/src/g_statusbar -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/backend -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/frontend -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/interface -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/core -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/jit -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/vm -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles/Mali_OpenGL_ES_Emulator/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles/glad/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gl -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gl_load -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/hwrenderer/data -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering -IC:/msys64/home/cr4ss/gzdoom-master/src/common/widgets -IC:/msys64/home/cr4ss/gzdoom-master/src/common/startscreen -IC:/msys64/home/cr4ss/gzdoom-master/src/common/objects -IC:/msys64/home/cr4ss/gzdoom-master/src/common/fonts -IC:/msys64/home/cr4ss/gzdoom-master/src/common/statusbar -IC:/msys64/home/cr4ss/gzdoom-master/src/common/menu -IC:/msys64/home/cr4ss/gzdoom-master/src/common/engine -IC:/msys64/home/cr4ss/gzdoom-master/src/common/console -IC:/msys64/home/cr4ss/gzdoom-master/src/common/utility -IC:/msys64/home/cr4ss/gzdoom-master/src/common/filesystem/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/models -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures/hires -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures/formats -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/utf8proc -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/stb -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/libsmackerdec/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/cutscenes -IC:/msys64/home/cr4ss/gzdoom-master/src/common/2d -IC:/msys64/home/cr4ss/gzdoom-master/src/common/audio/music -IC:/msys64/home/cr4ss/gzdoom-master/src/common/audio/sound -IC:/msys64/home/cr4ss/gzdoom-master/src/. -IC:/msys64/home/cr4ss/gzdoom-master/build/src -IC:/msys64/home/cr4ss/gzdoom-master/libraries/ZMusic/thirdparty/miniz -IC:/msys64/home/cr4ss/gzdoom-master/libraries/cppdap/include -IC:/msys64/home/cr4ss/gzdoom-master/libraries/ZMusic/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/lzma/C -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/zmusic/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/discordrpc/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/asmjit -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/cppdap -D_WIN32_WINNT=0x0600 -D_UNICODE -DUNICODE -Wno-unknown-pragmas -Wno-comment -Wno-format -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off -Wno-unused-result   -ffp-contract=off -DHAVE_VULKAN -DHAVE_GLES2 -g  -D_DEBUG -std=c++17 -MD -MT src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj -MF src\CMakeFiles\zdoom.dir\common\platform\win32\i_rawps2.cpp.obj.d -o src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj -c C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_rawps2.cpp
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_rawps2.cpp: In member function 'void FRawPS2Controller::AddAxes(float*)':
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_rawps2.cpp:677:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
  677 |                         axes[code] += fabs(axis_value);
      |                                       ^~~~
      |                                       labs
[800/1385] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_xinput.cpp.obj
FAILED: [code=1] src/CMakeFiles/zdoom.dir/common/platform/win32/i_xinput.cpp.obj
C:\msys64\mingw64\bin\c++.exe -DARCH_IA32 -DDYN_OPENAL -DHAVE_MMX=1 -DHAVE_VM_JIT -DTHIS_IS_GZDOOM -DUSE_LIBVPX=1 -D_WIN32 -D__forceinline=inline -IC:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32 -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/range_map/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/webp/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/ZWidget/include -IC:/msys64/home/cr4ss/gzdoom-master/src/../libraries/ZVulkan/include -IC:/msys64/home/cr4ss/gzdoom-master/src/launcher -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering -IC:/msys64/home/cr4ss/gzdoom-master/src/scripting/zscript -IC:/msys64/home/cr4ss/gzdoom-master/src/scripting -IC:/msys64/home/cr4ss/gzdoom-master/src/utility/nodebuilder -IC:/msys64/home/cr4ss/gzdoom-master/src/utility -IC:/msys64/home/cr4ss/gzdoom-master/src/xlat -IC:/msys64/home/cr4ss/gzdoom-master/src/sound/backend -IC:/msys64/home/cr4ss/gzdoom-master/src/menu -IC:/msys64/home/cr4ss/gzdoom-master/src/sound -IC:/msys64/home/cr4ss/gzdoom-master/src/r_data -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering/2d -IC:/msys64/home/cr4ss/gzdoom-master/src/rendering/hwrenderer -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata/fonts -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata/textures -IC:/msys64/home/cr4ss/gzdoom-master/src/gamedata -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim/mapthinkers -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim/bots -IC:/msys64/home/cr4ss/gzdoom-master/src/playsim -IC:/msys64/home/cr4ss/gzdoom-master/src/console -IC:/msys64/home/cr4ss/gzdoom-master/src/g_statusbar -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/backend -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/frontend -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/interface -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/core -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/jit -IC:/msys64/home/cr4ss/gzdoom-master/src/common/scripting/vm -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles/Mali_OpenGL_ES_Emulator/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles/glad/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gles -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gl -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/gl_load -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering/hwrenderer/data -IC:/msys64/home/cr4ss/gzdoom-master/src/common/rendering -IC:/msys64/home/cr4ss/gzdoom-master/src/common/widgets -IC:/msys64/home/cr4ss/gzdoom-master/src/common/startscreen -IC:/msys64/home/cr4ss/gzdoom-master/src/common/objects -IC:/msys64/home/cr4ss/gzdoom-master/src/common/fonts -IC:/msys64/home/cr4ss/gzdoom-master/src/common/statusbar -IC:/msys64/home/cr4ss/gzdoom-master/src/common/menu -IC:/msys64/home/cr4ss/gzdoom-master/src/common/engine -IC:/msys64/home/cr4ss/gzdoom-master/src/common/console -IC:/msys64/home/cr4ss/gzdoom-master/src/common/utility -IC:/msys64/home/cr4ss/gzdoom-master/src/common/filesystem/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/models -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures/hires -IC:/msys64/home/cr4ss/gzdoom-master/src/common/textures/formats -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/utf8proc -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/stb -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty -IC:/msys64/home/cr4ss/gzdoom-master/src/common/thirdparty/libsmackerdec/include -IC:/msys64/home/cr4ss/gzdoom-master/src/common/cutscenes -IC:/msys64/home/cr4ss/gzdoom-master/src/common/2d -IC:/msys64/home/cr4ss/gzdoom-master/src/common/audio/music -IC:/msys64/home/cr4ss/gzdoom-master/src/common/audio/sound -IC:/msys64/home/cr4ss/gzdoom-master/src/. -IC:/msys64/home/cr4ss/gzdoom-master/build/src -IC:/msys64/home/cr4ss/gzdoom-master/libraries/ZMusic/thirdparty/miniz -IC:/msys64/home/cr4ss/gzdoom-master/libraries/cppdap/include -IC:/msys64/home/cr4ss/gzdoom-master/libraries/ZMusic/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/lzma/C -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/zmusic/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/discordrpc/include -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/asmjit -isystem C:/msys64/home/cr4ss/gzdoom-master/libraries/cppdap -D_WIN32_WINNT=0x0600 -D_UNICODE -DUNICODE -Wno-unknown-pragmas -Wno-comment -Wno-format -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off -Wno-unused-result   -ffp-contract=off -DHAVE_VULKAN -DHAVE_GLES2 -g  -D_DEBUG -std=c++17 -MD -MT src/CMakeFiles/zdoom.dir/common/platform/win32/i_xinput.cpp.obj -MF src\CMakeFiles\zdoom.dir\common\platform\win32\i_xinput.cpp.obj.d -o src/CMakeFiles/zdoom.dir/common/platform/win32/i_xinput.cpp.obj -c C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp: In member function 'void FXInputController::AddAxes(float*)':
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:503:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
  503 |                         axes[code] += fabs(axis_value);
      |                                       ^~~~
      |                                       labs
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp: In constructor 'FXInputManager::FXInputManager()':
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:897:33: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'XInputGetStateType' {aka 'long unsigned int (*)(long unsigned int, XINPUT_STATE*)'} [-Wcast-function-type]
  897 |                 InputGetState = (XInputGetStateType)GetProcAddress(XInputDLL, "XInputGetState");
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:898:33: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'XInputSetStateType' {aka 'long unsigned int (*)(long unsigned int, XINPUT_STATE*)'} [-Wcast-function-type]
  898 |                 InputSetState = (XInputSetStateType)GetProcAddress(XInputDLL, "XInputSetState");
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:899:40: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'XInputGetCapabilitiesType' {aka 'long unsigned int (*)(long unsigned int, long unsigned int, XINPUT_CAPABILITIES*)'} [-Wcast-function-type]
  899 |                 InputGetCapabilities = (XInputGetCapabilitiesType)GetProcAddress(XInputDLL, "XInputGetCapabilities");
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:900:31: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'XInputEnableType' {aka 'void (*)(int)'} [-Wcast-function-type]
  900 |                 InputEnable = (XInputEnableType)GetProcAddress(XInputDLL, "XInputEnable");
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[804/1385] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_system.cpp.obj
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_system.cpp: In function 'unsigned int I_MakeRNGSeed()':
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_system.cpp:675:25: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOLEAN (*)(void*, ULONG)' {aka 'unsigned char (*)(void*, long unsigned int)'} [-Wcast-function-type]
  675 |                         (BOOLEAN (APIENTRY *)(void *, ULONG))GetProcAddress(advapi, "SystemFunction036");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_system.cpp: In function 'void SetupNumaNodes()':
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_system.cpp:747:43: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
  747 |                         for (int i = 0; i < sizeof(DWORD_PTR) * 8; i++)
      |                                         ~~^~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
they say MSYS2 is supported for building on Windows so i dont think its an MSYS2 issue. i have the following dependencies installed

Code: Select all

pacman -S --needed base-devel git make cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-libpng mingw-w64-x86_64-cmake mingw-w64-x86_64-libvpx ninja mingw-w64-x86_64-gtk3 mingw-w64-x86_64-hicolor-icon-theme mingw-w64-x86_64-openal mingw-w64-x86_64-desktop-file-utils
this appears to be all the dependencies required for compilation, so i dont think its that either. full log is in the attachment
Attachments
gzdoombuildlog.txt
(40.63 KiB) Downloaded 15 times
shoober420
Posts: 7
Joined: Sat Nov 22, 2025 12:08 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Compile error using MSYS2

Post by shoober420 »

i should have not assumed that just because MSYS2 includes MinGW64, doesnt mean its the same thing. so this could be an issue with MSYS2. so i followed the compilation guide on the wiki more closely (https://zdoom.org/wiki/Compile_ZDoom_on_Windows) using the MinGW directions. since im building the 64bit version of GZDoom, i linked the 64bit compiler exes instead of the 32bit ones as the guide says when using cmake-gui. i now get a different error when compiling.

Code: Select all

[ 59%] Built target discord-rpc
[ 60%] Generating zcc-parse.c, zcc-parse.h
[ 60%] Generating sc_man_scanner.h
[ 60%] Generating xlat_parser.c, xlat_parser.h
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/cmake_pch.hxx.gch
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/win32/i_steam.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/hardware.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_input.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_keyboard.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_mouse.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_dijoy.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj
C:\msys64\home\cr4ss\gzdoom-master\src\common\platform\win32\i_rawps2.cpp: In member function 'void FRawPS2Controller::AddAxes(float*)':
C:\msys64\home\cr4ss\gzdoom-master\src\common\platform\win32\i_rawps2.cpp:677:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
  677 |                         axes[code] += fabs(axis_value);
      |                                       ^~~~
      |                                       labs
mingw32-make[2]: *** [src\CMakeFiles\zdoom.dir\build.make:206: src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1783: src/CMakeFiles/zdoom.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2
i dont know if the first compilation error in the first log was an issue with how i ran cmake. i simply did "cmake .." in the build directory and had it generate a default Makefile and then compiled. but this second error is from using cmake-gui and following the directions on the wiki the closest i could. for example, i did change the value of "CMAKE_BUILD_TYPE" to "Release" instead of it probably using "Debug" when i auto-generated it the first compilation. full log is in the attachment
Attachments
gzdoomlog2.txt
(51.37 KiB) Downloaded 9 times
Last edited by shoober420 on Sun Nov 23, 2025 3:21 pm, edited 1 time in total.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3279
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Compile error using MSYS2

Post by drfrag »

Compilation with MinGW was fixed not long ago but seems it has broken again recently. I think you need to include <math.h> in that file.
shoober420
Posts: 7
Joined: Sat Nov 22, 2025 12:08 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Compile error using MSYS2

Post by shoober420 »

i forgot to add the other 2 log files from the second compilation attempt. i put them in the attachments. i also have logs of the make config output

Code: Select all

FIRST CONFIGURE

The C compiler identification is GNU 15.2.0
The CXX compiler identification is GNU 15.2.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/msys64/mingw64/bin/c++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Performing Test CMAKE_HAVE_LIBC_PTHREAD
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
Found Threads: TRUE
Found BZip2: C:/msys64/mingw64/lib/libbz2.dll.a (found version "1.0.8")
Looking for BZ2_bzCompressInit
Looking for BZ2_bzCompressInit - found
Found VPX: C:/msys64/mingw64/lib/libvpx.dll.a
Could NOT find ZMusic (missing: ZMUSIC_LIBRARIES ZMUSIC_INCLUDE_DIR) 
Using internal asmjit
Using system bzip2 library, includes found at C:/msys64/mingw64/include
Using internal cppdap library
Using internal zmusic library
Performing Test COMPILER_SUPPORTS_CXX14
Performing Test COMPILER_SUPPORTS_CXX14 - Success
== Your C++ compiler supports C++14, YMFM emulators will be ENABLED
Performing Test HAVE_NO_ARRAY_BOUNDS
Performing Test HAVE_NO_ARRAY_BOUNDS - Success
Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS
Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS - Success
VGM/GYM: Nuked OPN2 emulator will be used
Looking for alloca.h
Looking for alloca.h - not found
Looking for itoa
Looking for itoa - found
Performing Test DUMB_CAN_USE_SSE
Performing Test DUMB_CAN_USE_SSE - Success
Looking for stricmp
Looking for stricmp - found
Looking for strnicmp
Looking for strnicmp - found
Looking for strdup
Looking for strdup - found
Looking for strndup
Looking for strndup - not found
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of 0i8
Check size of 0i8 - failed
Check size of 0l
Check size of 0l - done
Check size of 0ll
Check size of 0ll - done
Check size of char
Check size of char - done
Check size of short
Check size of short - done
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of long long
Check size of long long - done
Check size of void *
Check size of void * - done
Check size of __int64
Check size of __int64 - done
Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "2.5.1")
Architecture is x86_64
Performing Test HAVE_PARALLEL_FOR
Performing Test HAVE_PARALLEL_FOR - Failed
Performing Test HAVE_DISPATCH_APPLY
Performing Test HAVE_DISPATCH_APPLY - Failed
Building for target architecture: x86_64
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
CMake Warning (dev) at src/CMakeLists.txt:1438 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring done (23.4s)


SECOND CONFIGURE

Could NOT find ZMusic (missing: ZMUSIC_LIBRARIES ZMUSIC_INCLUDE_DIR) 
Using internal asmjit
Using system bzip2 library, includes found at C:/msys64/mingw64/include
Using internal cppdap library
Using internal zmusic library
== Your C++ compiler supports C++14, YMFM emulators will be ENABLED
VGM/GYM: Nuked OPN2 emulator will be used
Architecture is x86_64
Building for target architecture: x86_64
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
CMake Warning (dev) at src/CMakeLists.txt:1438 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring done (4.1s)
Generating done (1.8s)
just so its detailed how i compiled this step by step, i made a walkthrough of each thing i did. i tried compiling with default config after running "cmake --build" as well but it still will error out at the same spot. this also happens when both MSYS Makefiles and MinGW Makefiles are tried

Code: Select all

+ GZDOOM MSYS2 COMPILE
- download MSYS2 (https://www.msys2.org)
- launch mingw64.exe
- run "pacman -Syyu" until fully up to date
- download gzdoom source code zip archive (https://github.com/ZDoom/gzdoom)
- unzip into "C:\msys64\home\%USER%"
- relaunch mingw64.exe
- pacman -S --needed base-devel git make cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-libpng mingw-w64-x86_64-cmake mingw-w64-x86_64-libvpx ninja mingw-w64-x86_64-gtk3 mingw-w64-x86_64-hicolor-icon-theme mingw-w64-x86_64-openal mingw-w64-x86_64-desktop-file-utils mingw-w64-x86_64-mpg123 mingw-w64-x86_64-libsndfile mingw-w64-x86_64-cmake-gui
- relaunch mingw64.exe
- cd to gzdoom source code directory
- mkdir build && cd build
- cmake-gui ..
- Configure > Specify the generator for this project: MSYS Makefiles / Internet Doom Explorer (IDE) = CodeBlocks - MinGW Makefiles
 ++ Use default native compilers
 + NOT NEEDED: Specify native compilers: C: C:\msys2\mingw64\bin\gcc.exe / C++: C:\msys64\mingw64\bin\g++.exe
- Add Entry > Name: DX_dinput8_LIBRARY / Type: FILEPATH / Value: C:/msys64/mingw64/lib/libdinput.a
- Add Entry > Name: DX_dxguid_LIBRARY / Type: FILEPATH / Value: C:/msys64/mingw64/lib/libdxguid.a
- Add Entry > Name: CMAKE_VERBOSE_MAKEFILE / Type: BOOL / Value: Checkmarked
- CMAKE_BUILD_TYPE: Release
- FORCE_INTERNAL_CPPDAP: Untick
- HAVE_GLES2: Untick
- NO_OPENMP: Checkmark
- USE_GME_*: Checkmark (build error when Unticked)
- VULKAN_USE_XLIB: Untick
- click Configure
- click Generate
- cmake --build .
when you say include"<math.h> in that file", which file are you talking about and how can i add it?
Attachments
gzdoomlog2.txt
(38.99 KiB) Downloaded 9 times
gzdoomlog1.txt
(39.85 KiB) Downloaded 11 times
Last edited by shoober420 on Sun Nov 23, 2025 6:00 pm, edited 5 times in total.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3279
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Compile error using MSYS2

Post by drfrag »

Below // HEADER FILES and #include <limits.h> add #include <math.h> in /src/common/platform/win32/i_xinput.cpp. But it's better to use Visual Studio anyway.
shoober420
Posts: 7
Joined: Sat Nov 22, 2025 12:08 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Compile error using MSYS2

Post by shoober420 »

i still get the same error even when adding "#include <math.h>" to the i_xinput.cpp file in the spot you said. i did try to compile latest uzdoom git master though instead this time, but still get the same error. im currently suspended on github so i cant make a post about it on their github
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3279
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Compile error using MSYS2

Post by drfrag »

Now i see the error is actually on two files.
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_rawps2.cpp:677:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
C:/msys64/home/cr4ss/gzdoom-master/src/common/platform/win32/i_xinput.cpp:503:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
You could try adding it to the other file too.
shoober420
Posts: 7
Joined: Sat Nov 22, 2025 12:08 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Compile error using MSYS2

Post by shoober420 »

my apologies, i didnt catch that when looking at the build log. i made a new thread here about it.

viewtopic.php?t=81100

ill post the results on that new thread
Post Reply

Return to “Bugs [GZDoom]”