So I've been trying to successfully compile working copies of ZDoom and GZDoom 2.1.1 for the last few days with no real luck. I recently switched to Manjaro and have been trying to get all the Doom sourceports I use up and running. I've been able to successfully compile the most recent version of GZDoom and it works great. However, I like using ZDoom every now and again and I like to use GZDoom 2.1.1 for certain mods like Final Doomer and DoomRLA. However, I've run into the same problem trying to compile the source for both of these. Since these old versions require the fmod files, I run cmake like this:
cmake -DFMOD_LIBRARY=fmodapi44464linux/api/lib/libfmodex64-4.44.64.so -DFMOD_INCLUDE_DIR=fmodapi44464linux/api/inc
However, when I do that I get an error:
CMake Error at game-music-emu/CMakeLists.txt:90 (if):
if given arguments:
"(" "VERSION_GREATER" "4.1" ")" "OR" "(" "VERSION_EQUAL" "4.1" ")"
Unknown arguments specified
The issue seems to be the block of if statements in CMakeLists for game-music-emu that checks what version of gcc I'm using. I checked my package manager and I have 10.2.0-3. Now this might have been a bad idea, but I ended up just commenting out this whole block in the file and trying again. After doing this, cmake was successful and I was able to run make. This was the case for both ZDoom and GZDoom 2.1.1. However, now when I try running either ZDoom or GZDoom 2.1.1, I get no music in either one unless I switch the MIDI device to OPL Synth Emulation (other sounds work fine). This kind of sounds terrible, and would prefer to use something like Timidity++, which is the device that is set by default. Every other Midi device in sound options shows an error in the ZDoom/GZDoom console. When I run ZDoom I get messages in the terminal like:
No instrument mapped to tone bank 0, program 29 - this instrument will not be heard
Which sounds like maybe it can't find a soundfont? I have however tried placing gzdoom.sf2 in several of the directories shown in the .ini specifying where it looks for soundfonts but with no luck. Basically I'm wondering if anybody can help me out with getting proper music in both ZDoom and GZDoom 2.1.1. Is what I did in game-music-emu's CMakeLists.txt what might have caused this? Or is there a solution I can use with the versions I've already compiled? I'd appreciate any help, thanks.
Problems compiling ZDoom/old version of GZDoom on Linux
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Problems compiling ZDoom/old version of GZDoom on Linux
The entire sound setup in these old versions is very different from what's there now. This code was totally overhauled and made more user friendly for the 3.x versions.
First, Timidity++ back then was using an external version to pipe its output back to GZDoom, and therefore needed that external timidity executable set up properly. For FluidSynth you also need to specify a full path to a sound font via CVAR - and FMod itself needs to find gm.dls for its player to work.
First, Timidity++ back then was using an external version to pipe its output back to GZDoom, and therefore needed that external timidity executable set up properly. For FluidSynth you also need to specify a full path to a sound font via CVAR - and FMod itself needs to find gm.dls for its player to work.
-
- Posts: 2
- Joined: Sun Dec 06, 2020 8:34 am
Re: Problems compiling ZDoom/old version of GZDoom on Linux
So would a possible solution be to compile timidity4zdoomsrc so I can get the executable and config file to put in zdoom/gzdoom's directory? Unfortunately I can't exactly use the windows executable since I'm on Linux.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Problems compiling ZDoom/old version of GZDoom on Linux
It should be able to pick up a system-provided timidity++ executable on Linux.
-
- Posts: 2
- Joined: Sun Dec 06, 2020 8:34 am
Re: Problems compiling ZDoom/old version of GZDoom on Linux
You're right, and the fix for my problem was as simple as telling Timidity where the gzdoom.sf2 soundfont was in its config file. Thanks for the help, cheers buddy.
- MartinHowe
- Posts: 2027
- Joined: Mon Aug 11, 2003 1:50 pm
- Location: Waveney, United Kingdom
- Contact:
Re: Problems compiling ZDoom/old version of GZDoom on Linux
In case it helps anyone, the macro _gcc_version isn't defined in newer compilers. It can be replaced with CMAKE_C_COMPILER_VERSION (as I just did):
Code: Select all
# Check for GCC "visibility" support.
if (CMAKE_COMPILER_IS_GNUCXX)
check_cxx_compiler_flag (-fvisibility=hidden __LIBGME_TEST_VISIBILITY)
set (ENABLE_VISIBILITY OFF)
if (__LIBGME_TEST_VISIBILITY)
# get the gcc version
exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
# gcc <4.1 had poor support for symbol visibility
if ((${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "4.1") OR (${CMAKE_C_COMPILER_VERSION} VERSION_EQUAL "4.1"))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
set (ENABLE_VISIBILITY ON)
add_definitions (-DLIBGME_VISIBILITY)
# GCC >= 4.2 also correctly supports making inline members have hidden
# visibility by default.
if ((${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "4.2") OR (${CMAKE_C_COMPILER_VERSION} VERSION_EQUAL "4.2"))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
endif()
endif()
endif() # test visibility
endif (CMAKE_COMPILER_IS_GNUCXX)