UZDoom compile error using MSYS2

Need help running various source ports? Did your computer break? Ask here.

Moderators: GZDoom Developers, LZDoom Developers, UZDoom Developers

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!
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

UZDoom compile error using MSYS2

Post by shoober420 »

when compiling uzdoom from current git master commit (https://github.com/UZDoom/UZDoom/commit ... 4897819819) on the latest MSYS2-x86_64-20250830 using Windows 11, i get this compile error (this is after doing as drfrag said with i_xinput.cpp file). full build log here (https://gitlab.com/shoober420/game-conf ... gerror.txt)

[code]

[ 61%] Building CXX object src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj
In file included from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/console/c_cvars.h:36,
from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/engine/m_joy.h:4,
from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/platform/win32/i_input.h:56,
from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/platform/win32/i_rawps2.cpp:43:
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/utility/zstring.h: In member function 'const char& FString::operator[](int) const':
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/utility/zstring.h:176:39: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare]
176 | if(index < 0 || index >= Len()) ThrowStringBoundsException((int64_t)index, Len());
| ~~~~~~^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/platform/win32/i_rawps2.cpp: In member function 'void FRawPS2Controller::AddAxes(float*)':
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/platform/win32/i_rawps2.cpp:681:39: error: 'fabs' was not declared in this scope; did you mean 'labs'?
681 | axes[code] += fabs(axis_value);
| ^~~~
| labs
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:199: src/CMakeFiles/zdoom.dir/common/platform/win32/i_rawps2.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1527: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

[/code]

here is the make config output

[code]

FIRST MAKE CONFIG

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 Python3: C:/msys64/mingw64/bin/python3.12.exe (found suitable version "3.12.12", minimum required is "3.6") found components: Interpreter
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
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)
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
Configuring done (23.3s)

SECOND MAKE CONFIG

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)
Configuring done (4.3s)
Generating done (1.8s)

[/code]

i have the required dependencies installed

[code]

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-python3

[/code]

ive done the following as outlined in this post by drfrag and still get the same error

[quote=drfrag post_id=1264344 time=1763971878 user_id=570]

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.

[/quote]
Last edited by shoober420 on Wed Nov 26, 2025 3:42 pm, edited 3 times in total.
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: UZDoom compile error using MSYS2

Post by shoober420 »

after following the next instructions by drfrag here
drfrag wrote: Wed Nov 26, 2025 2:23 pm 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.
im now presented with a new build error

Code: Select all

[ 68%] Building CXX object src/CMakeFiles/zdoom.dir/playsim/p_map.cpp.obj
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/15.2.0/include/stddef.h:1,
                 from C:/msys64/mingw64/include/inttypes.h:14,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/thirdparty/sfmt/SFMT.h:31,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/thirdparty/sfmt/SFMTObj.h:3,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/engine/m_random.h:41,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/gamedata/info.h:45,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/a_sharedglobal.h:4,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:65:
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp: In function 'bool PIT_CheckThing(FMultiBlockThingsIterator&, FMultiBlockThingsIterator::CheckResult&, const FBoundingBox&, FCheckPosition&)':
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1548:42: error: ambiguous overload for 'operator=' (operand types are 'TObjPtr<AActor*>' and 'long long int')
 1548 |                 tm.thing->BlockingMobj = NULL;
      |                                          ^~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1548:42: note: there are 6 candidates
In file included from C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobject.h:174,
                 from C:/msys64/home/cr4ss/UZDoom-trunk/src/gamedata/info.h:40:
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:221:31: note: candidate 1: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(T) [with T = AActor*]'
  221 |         constexpr TObjPtr<T>& operator=(T q) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:227:31: note: candidate 2: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(std::nullptr_t) [with T = AActor*; std::nullptr_t = std::nullptr_t]'
  227 |         constexpr TObjPtr<T>& operator=(std::nullptr_t nul) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:234:21: note: candidate 3: 'TObjPtr<T>& TObjPtr<T>::operator=(int) [with T = AActor*]'
  234 |         TObjPtr<T>& operator=(const int val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:242:21: note: candidate 4: 'TObjPtr<T>& TObjPtr<T>::operator=(long int) [with T = AActor*]'
  242 |         TObjPtr<T>& operator=(const long val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp: In function 'bool P_CheckPosition(AActor*, const DVector2&, FCheckPosition&, bool)':
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1887:31: error: ambiguous overload for 'operator=' (operand types are 'TObjPtr<AActor*>' and 'long long int')
 1887 |         thing->BlockingMobj = NULL;
      |                               ^~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1887:31: note: there are 6 candidates
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:221:31: note: candidate 1: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(T) [with T = AActor*]'
  221 |         constexpr TObjPtr<T>& operator=(T q) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:227:31: note: candidate 2: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(std::nullptr_t) [with T = AActor*; std::nullptr_t = std::nullptr_t]'
  227 |         constexpr TObjPtr<T>& operator=(std::nullptr_t nul) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:234:21: note: candidate 3: 'TObjPtr<T>& TObjPtr<T>::operator=(int) [with T = AActor*]'
  234 |         TObjPtr<T>& operator=(const int val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:242:21: note: candidate 4: 'TObjPtr<T>& TObjPtr<T>::operator=(long int) [with T = AActor*]'
  242 |         TObjPtr<T>& operator=(const long val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1927:63: error: ambiguous overload for 'operator=' (operand types are 'TObjPtr<AActor*>' and 'long long int')
 1927 |                                         thing->BlockingMobj = NULL;
      |                                                               ^~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1927:63: note: there are 6 candidates
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:221:31: note: candidate 1: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(T) [with T = AActor*]'
  221 |         constexpr TObjPtr<T>& operator=(T q) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:227:31: note: candidate 2: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(std::nullptr_t) [with T = AActor*; std::nullptr_t = std::nullptr_t]'
  227 |         constexpr TObjPtr<T>& operator=(std::nullptr_t nul) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:234:21: note: candidate 3: 'TObjPtr<T>& TObjPtr<T>::operator=(int) [with T = AActor*]'
  234 |         TObjPtr<T>& operator=(const int val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:242:21: note: candidate 4: 'TObjPtr<T>& TObjPtr<T>::operator=(long int) [with T = AActor*]'
  242 |         TObjPtr<T>& operator=(const long val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1940:63: error: ambiguous overload for 'operator=' (operand types are 'TObjPtr<AActor*>' and 'long long int')
 1940 |                                         thing->BlockingMobj = NULL;
      |                                                               ^~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1940:63: note: there are 6 candidates
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:221:31: note: candidate 1: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(T) [with T = AActor*]'
  221 |         constexpr TObjPtr<T>& operator=(T q) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:227:31: note: candidate 2: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(std::nullptr_t) [with T = AActor*; std::nullptr_t = std::nullptr_t]'
  227 |         constexpr TObjPtr<T>& operator=(std::nullptr_t nul) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:234:21: note: candidate 3: 'TObjPtr<T>& TObjPtr<T>::operator=(int) [with T = AActor*]'
  234 |         TObjPtr<T>& operator=(const int val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:242:21: note: candidate 4: 'TObjPtr<T>& TObjPtr<T>::operator=(long int) [with T = AActor*]'
  242 |         TObjPtr<T>& operator=(const long val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1968:31: error: ambiguous overload for 'operator=' (operand types are 'TObjPtr<AActor*>' and 'long long int')
 1968 |         thing->BlockingMobj = NULL;
      |                               ^~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:1968:31: note: there are 6 candidates
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:221:31: note: candidate 1: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(T) [with T = AActor*]'
  221 |         constexpr TObjPtr<T>& operator=(T q) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:227:31: note: candidate 2: 'constexpr TObjPtr<T>& TObjPtr<T>::operator=(std::nullptr_t) [with T = AActor*; std::nullptr_t = std::nullptr_t]'
  227 |         constexpr TObjPtr<T>& operator=(std::nullptr_t nul) noexcept
      |                               ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:234:21: note: candidate 3: 'TObjPtr<T>& TObjPtr<T>::operator=(int) [with T = AActor*]'
  234 |         TObjPtr<T>& operator=(const int val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/common/objects/dobjgc.h:242:21: note: candidate 4: 'TObjPtr<T>& TObjPtr<T>::operator=(long int) [with T = AActor*]'
  242 |         TObjPtr<T>& operator=(const long val) noexcept
      |                     ^~~~~~~~
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp: In function 'bool P_TryMove(AActor*, const DVector2&, int, const secplane_t*, FCheckPosition&, bool)':
C:/msys64/home/cr4ss/UZDoom-trunk/src/playsim/p_map.cpp:2657:124: warning: enum constant in boolean context [-Wint-in-bool-context]
 2657 |                                         if (blocking != nullptr && (thing->player == nullptr || !(thing->player->cheats && CF_PREDICTING)))
      |
                               ^~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:1876: src/CMakeFiles/zdoom.dir/playsim/p_map.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1527: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
i see "#include <math.h>" is already present in the p_map.cpp file. is this missing another #include or is this something else?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3251
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: UZDoom compile error using MSYS2

Post by drfrag »

No, this time is a serious problem. That line is old code but seems someone has made a change to that operator and i'm afraid i cannot help. You could create an issue on GitHub. Besides those compiling instructions on the zdoom wiki are obsolete, you should use those on GitHub.
https://github.com/UZDoom/UZDoom/wiki/C ... on#windows
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: UZDoom compile error using MSYS2

Post by shoober420 »

im unfortunately suspended on github atm or i would make a github issue about it. i hope they somehow see this thread

Return to “Technical Issues”