I thought Mingw-w64 compiling was fixed...

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Commit 789315bb4a7a2a5701b40c4ee004336395bd452f gave me the impression that compiling in mingw-w64 worked again...but I get a xinput related error that I'm not sure how to solve, as I'm not that much of a programmer.

Note that instead of TDM-GCC I use MSYS2, as it feels more complete (containing stuff TDM-GCC is missing, most notably fluidsynth) and allows me to install some of the dependencies (like libsndfile) internally. The result is the same on both compiling suites, though.

The contents of the build directory can be found here

I attempted to build commit 5e171824acfe7e352c187517a837cc2c37b92f7d (the latest as of this writing)
Spoiler:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: I thought Mingw-w64 compiling was fixed...

Post by Graf Zahl »

Don't even try using Microsoft's headers with MinGW. It won't work.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Cmake gui is prompting for directx/xinput stuff though. What am I supposed to use instead of Microsoft's stuff?

edit: Oh.... How stupid of me, mingw64 had its own version of the directx/xinput stuff... I'm compiling again now...
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Well the good news is that I got farther than with the Microsoft stuff. As for the bad news.....

(If the problem involves a difference between TDM-GCC and MSYS2, I personally think MSYS2 should be the toolkit prioritized due to it supporting fluidsynth and pkg-config and maybe a couple other things which TDM-GCC don't.)
Spoiler:
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: I thought Mingw-w64 compiling was fixed...

Post by Blzut3 »

Just confirmed that everything compiles with MinGW-w64 TDM-GCC in 32-bit mode. 64-bit mode works but the linker crashes.

I only support TDM-GCC using mingw32-make in the windows command prompt since I assume that's most similar to how IDEs work. I'm personally only interested in the compiler and nothing is stops you from pointing to libraries built in msys2.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

...except that I'm not a programmer and don't know how to fix the code so that it works with msys2.

...also, how do I compile in 32-bit mode TDM-GCC?
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: I thought Mingw-w64 compiling was fixed...

Post by Blzut3 »

Just add -m32 to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. You may or may not need to adjust the location of some of the libraries in CMake to point to the 32-bit versions, but if that's the case the linker errors will guide you as to which ones.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

...if it compiles for you, you must have done something differently than I did.

Unfortunately, TDM-GCC-64 doesn't provide a i686-w64-mingw32 (something msys2 *does* provide, amusingly enough, though I doubt it will work better than 64-bit msys2), and the 32-bit TDM download gives me the impression that it's the old Mingw32.
Spoiler:
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: I thought Mingw-w64 compiling was fixed...

Post by Blzut3 »

My environment happened to have CMake detect the 32-bit only version of windres.exe so this didn't occur for me. Easy to fix though, set CMAKE_RC_FLAGS to: -F pe-i386
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Compiling with Fmod EX 4.44.64 turned on results in this:
Spoiler:
Attempting to use FMod Studio 1.06.20 gives an error on the CMake side of things.

Attempting to use NO_FMOD does this: https://paste.debian.net/902258/
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: I thought Mingw-w64 compiling was fixed...

Post by Blzut3 »

Your NO_FMOD build problem is the libsndfile and libmpg123 that you're linking to. What do you have set for those values in CMake?

As for FMOD, I see the problem. I was still using 4.26.36 and didn't notice that fmod_wrap needs to be updated.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Code: Select all

MPG123_INCLUDE_DIR:PATH=C:/gzdoom-compile/mpg123-1.23.8-x86

Code: Select all

MPG123_LIBRARIES:FILEPATH=C:/gzdoom-compile/mpg123-1.23.8-x86/libmpg123-0.a
As mentioned on the wiki, I renamed libmpg123-0.dll.def to libmpg123-0.def. Then, following instructions here, I went to cmd and typed in "dlltool -d libmpg123-0.def -l libmpg123-0.a"

Code: Select all

SNDFILE_INCLUDE_DIR:PATH=C:/Program Files (x86)/Mega-Nerd/libsndfile/include

Code: Select all

SNDFILE_LIBRARY:FILEPATH=C:/Program Files (x86)/Mega-Nerd/libsndfile/lib/libsndfile-1.a
edit: Something I'm not sure you know. TDM-GCC MinGW-W64 is based of GCC 5. MSYS2 MinGW-W64 is based off GCC 6. If anyone decides to get things to work with MSYS2 (which I recommend at least so that Fluidsynth works), whoever does so will need to keep this and this in mind.

Hopefully sometime in the next couple months the issues that hinder using MinGW-W64 to compile (G)ZDoom (both 32 and 64 bit) will be finally resolved...
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: I thought Mingw-w64 compiling was fixed...

Post by Blzut3 »

You don't need import libraries for MInGW. Just point to the dll file.

Fluidsynth should work with your TDM build once you have it. ZDoom dynamically links to it at run time and doesn't require the header or the library at compile time.
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

Fluidsynth is available as a MSYS2 package. If I wanted to compile Fluidsynth by hand, the dependencies...recommend using MSYS2. I don't want to mix two different toolkits.

It's too late at night for me to test your latest suggestion, but sometime tomorrow I will link mpg123 straight from the DLL instead of a .a file
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: I thought Mingw-w64 compiling was fixed...

Post by Danfun64 »

The good news is that I finally managed to compile 100%...the bad news is that it CTD.
After failing with a Release build, I compiled a Debug build (log here). When loading the Debug EXE in GDB, the game manages to load, but goes back to the Desktop five seconds into every time i try to open the fullscreen ZDoom tab.
Spoiler:
Post Reply

Return to “Closed Bugs [GZDoom]”