The official "ZDoom on Linux" thread.

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: The official "ZDoom on Linux" thread.

Post by Blzut3 »

Xranger60 wrote:FPS, (whether with Vsync on or off), is in the hundreds.
According to various sources, X doesn't have vsync which is why ZDoom doesn't implement it. Quite a shame since the high frame rate is what's causing the stuttering problem you described. The only option you have is to turn on cl_capfps and limit it to 35fps. I've thought about adding an arbitrary frame rate limit for this reason since it seems to me if I set it to 75 the stuttering disappears (even if it's not guaranteed to be synchronised).
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: The official "ZDoom on Linux" thread.

Post by Spleen »

Blzut3 wrote:
Xranger60 wrote:FPS, (whether with Vsync on or off), is in the hundreds.
According to various sources, X doesn't have vsync which is why ZDoom doesn't implement it. Quite a shame since the high frame rate is what's causing the stuttering problem you described. The only option you have is to turn on cl_capfps and limit it to 35fps. I've thought about adding an arbitrary frame rate limit for this reason since it seems to me if I set it to 75 the stuttering disappears (even if it's not guaranteed to be synchronised).
Arbitrary frame-rate limiting would certainly be nice for Windows users too, since it limits CPU usage without the nasty input lag that vsync has on some systems.
User avatar
Remmirath
Posts: 2561
Joined: Sun Dec 23, 2007 3:53 am
Graphics Processor: nVidia with Vulkan support
Location: My house
Contact:

Re: The official "ZDoom on Linux" thread.

Post by Remmirath »

I've successfully compiled ZDoom r3003 on Fedora Core 11. But upon starting a new game from the main menu, it crashes with the following error:

Code: Select all

*** Fatal Error ***
Illegal operand (signal 4)
Address: 0x859485b
I have no idea what could be causing this. Any suggestion would be appreciated.

I've included the full crash log here:
zdoom-crash.log.tar.gz
(3.02 KiB) Downloaded 49 times
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

Hmm, I've found something funny about zdoom compiling. Do these steps in the terminal (WARNING: this will fill your terminal with warnings!):
1) clean the "debug" directory
2)cmake -DCMAKE_BUILD_TYPE=Debug ..
3)compile like this: make --warn-undefined-variables

Your terminal will be full of warnings about missing variables, like 'COLORS' and 'VERBOSE'. What causes them?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Chris »

Those variables are likely from the makefile itself (as generated by cmake), not ZDoom's code. It's probably not anything you need to worry about, though, or else make would be more verbose about it by default.
Virii
Posts: 21
Joined: Sat Dec 04, 2010 5:48 pm

Re: The official "ZDoom on Linux" thread.

Post by Virii »

I've followed the wiki article on how to compile on Linux, and I've had a couple issues.

Please go easy on me, because this has been my first attempt to compile an app. This is for Debian Linux (testing = squeeze).

FYI - I moved the extracted 'fmodapi' folder into 'trunk', instead of installing.

The problems:

- After changing to the newly created 'release' directory, I ran "cmake -DCMAKE_BUILD_TYPE=Release", but I received a message saying that no CMakeFiles.txt was found. I then changed back to the trunk directory, and ran make from there (where CMakeFiles.txt was located).

- When compiling, I received an error that it could not find Bzip2 (it used internal), or FluidSynth (which I don't need/want).

- After it finished compiling, and the zdoom binary ended up in the 'trunk' directory (instead of 'release'), I found that no BGM was present (only SFX).
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

- Just for information: did you do "cd release" after creating it and do "cmake -DCMAKE_BUILD_TYPE=Release" ? If you did that, I don't know what happened, because it works for me.

- another information: did you do this before doing "cmake" etc things?

Code: Select all

sudo apt-get install build-essential zlib1g-dev libsdl1.2-dev libjpeg62-dev nasm tar bzip2 libgtk2.0-dev cmake
-About the third point, I have the same problem as you if I use "fmod" sound option. I had to install timidity and fluidsynth (actually you can also install one of them).
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Chris »

Edward-san wrote:- Just for information: did you do "cd release" after creating it and do "cmake -DCMAKE_BUILD_TYPE=Release" ? If you did that, I don't know what happened, because it works for me.
That should be "cmake .. -DCMAKE_BUILD_TYPE=Release". The .. tells CMake to look the the parent directory for CMakeLists.txt, otherwise it will look in the current directory where it doesn't exist.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

Chris wrote:
Edward-san wrote:- Just for information: did you do "cd release" after creating it and do "cmake -DCMAKE_BUILD_TYPE=Release" ? If you did that, I don't know what happened, because it works for me.
That should be "cmake .. -DCMAKE_BUILD_TYPE=Release". The .. tells CMake to look the the parent directory for CMakeLists.txt, otherwise it will look in the current directory where it doesn't exist.
Yeah, those double dots. I forgot to mention them. That should do the trick.
Virii
Posts: 21
Joined: Sat Dec 04, 2010 5:48 pm

Re: The official "ZDoom on Linux" thread.

Post by Virii »

Edward-san wrote:- another information: did you do this before doing "cmake" etc things?

Code: Select all

sudo apt-get install build-essential zlib1g-dev libsdl1.2-dev libjpeg62-dev nasm tar bzip2 libgtk2.0-dev cmake
Yes. That's the reason I found it strange it could not find the bzip2.
Chris wrote:That should be "cmake .. -DCMAKE_BUILD_TYPE=Release". The .. tells CMake to look the the parent directory for CMakeLists.txt, otherwise it will look in the current directory where it doesn't exist.
Okay, cool.
Edward-san wrote:-About the third point, I have the same problem as you if I use "fmod" sound option. I had to install timidity and fluidsynth (actually you can also install one of them).
About this... I followed the wiki's recommendation on the basis I might be recompiling new versions all the time. Should I just directly install Fmod Ex, and does anyone know if the version linked to (in the wiki) is still current? Maybe there's a version incompatibility? I really need direct hardware acceleration, and rather not rely on Timidity/Fluidsynth.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Chris »

Should I just directly install Fmod Ex, and does anyone know if the version linked to (in the wiki) is still current?
I would recommend getting the version recommended in the wiki directly from FMOD's site, and extracting it into the fmod/ sub-directory of ZDoom's directory (so you get, eg, zdoom/fmod/api/lib/libfmodex*.so). That will prevent accidental breakage in case something updates it to an incompatible version.
Virii wrote:I really need direct hardware acceleration, and rather not rely on Timidity/Fluidsynth.
I don't think FMOD uses hardware MIDI. A quick peek at its output_alsa.so doesn't seem to show it using any of the sequencer functions, at least. ZDoom also won't use acceleration for 3D sound because it specifically requests software mixing (though even if it didnt, Linux audio APIs don't expose the necessary controls to do hardware 3D audio).
Virii
Posts: 21
Joined: Sat Dec 04, 2010 5:48 pm

Re: The official "ZDoom on Linux" thread.

Post by Virii »

Okay, so I missed the '..' in my first attempt. The second time I 'installed' FmodEx, and used this command (via the wiki) prior to building.
cmake -DCMAKE_BUILD_TYPE=Release -DFMOD_LIBRARY=/usr/local/lib/libfmodex-4.26.31.so -DFMOD_INCLUDE_DIR=/usr/local/include/fmodex/ ..
There were many error messages I saw on screen when compiling, but nothing relating to Fmod as far as I could tell. When I loaded up zdoom, there wasn't any sound. I changed the sound engine in the options to OPL emulation, and surprisingly, that worked.
Chris wrote:I would recommend getting the version recommended in the wiki directly from FMOD's site, and extracting it into the fmod/ sub-directory of ZDoom's directory (so you get, eg, zdoom/fmod/api/lib/libfmodex*.so). That will prevent accidental breakage in case something updates it to an incompatible version.
What zdoom directory are you referring to? I have it compiling in 'root/trunk/release'. When I run the instructions from the wiki, the console output asks for the location of the pre-compiled fmod libs.
Chris wrote:I don't think FMOD uses hardware MIDI. A quick peek at its output_alsa.so doesn't seem to show it using any of the sequencer functions, at least. ZDoom also won't use acceleration for 3D sound because it specifically requests software mixing (though even if it didnt, Linux audio APIs don't expose the necessary controls to do hardware 3D audio).
I'm not quite sure what the equivalent would be, but per Windows I meant DMA (direct memory access). ZDoom doesn't have a setting for using sound cards in that manner, and only uses software rendered sound/bgm?
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: The official "ZDoom on Linux" thread.

Post by Gez »

Virii wrote:About this... I followed the wiki's recommendation on the basis I might be recompiling new versions all the time. Should I just directly install Fmod Ex, and does anyone know if the version linked to (in the wiki) is still current? Maybe there's a version incompatibility?
The [wiki]FMOD Ex[/wiki] article should explain all that.
Virii wrote:I really need direct hardware acceleration, and rather not rely on Timidity/Fluidsynth.
FMOD Ex does not actually use hardware acceleration for sound rendering. It's entirely software-driven.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Chris »

Virii wrote:What zdoom directory are you referring to? I have it compiling in 'root/trunk/release'. When I run the instructions from the wiki, the console output asks for the location of the pre-compiled fmod libs.
The same directory where CMakeLists.txt is, would be where to make the fmod/ directory.
I'm not quite sure what the equivalent would be, but per Windows I meant DMA (direct memory access). ZDoom doesn't have a setting for using sound cards in that manner, and only uses software rendered sound/bgm?
DMA would be completely up to the drivers/system config/etc. It doesn't have much to do with software or hardware mixing, though.. it just specifies how the card's memory is accessed. FMOD does its own mixing of sound and MIDI, then has ALSA or something write it to the card to play. How it's written to the card depends on your system.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: The official "ZDoom on Linux" thread.

Post by Gez »

Chris wrote:FMOD does its own mixing of sound and MIDI, then has ALSA or something write it to the card to play. How it's written to the card depends on your system.
It [wiki=Sound_options#Output_system]can be modified[/wiki], though.
Post Reply

Return to “Tutorials”