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.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

I noticed a big performance regression with zdoom compiled with GCC 6 in release mode. When I load Ancient Aliens map29, just the starting area is so slow that each frame is separated by around 1 sec and half, while with GCC 5 and less the frame rate is more or less 15 fps. It's even slower than debug mode.

I hope somebody can help with the real issue (could be a compiler regression, indeed!). Using Ubuntu 16.04 x86_64.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: The official "ZDoom on Linux" thread.

Post by Marisa the Magician »

I can confirm it on Arch here. My entire system slowed down to a stuttery mess while the map loaded, and afterwards I was getting about 2 seconds per frame on average.

ZDoom 2.9pre-1443-gd2a9f7a and GCC 6.2.1, for the reference.
Blzut3
 
 
Posts: 3167
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Blzut3 »

If either of you have time, what you should probably do is record a demo, enable profiling and build with both GCC 6 and GCC 5. Playing back the demo and looking at the profiler results should theoretically show a change in hotspots which could narrow down what changed. At least assuming the change is some fairly localized thing.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

I made the profile of both, I can show the flat profile for the top functions with at least 0.01% of profile time:

GCC5:
Spoiler:
GCC6:
Spoiler:
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

Attached the disassemble of GCC 5 and 6, can't be diffed easily because the two function offsets are different attached also the diff between both after manually fixing the offset.
You do not have the required permissions to view the files attached to this post.
Blzut3
 
 
Posts: 3167
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Blzut3 »

Fixed. I haven't a clue how it caused performance to outright tank like that, but it was the result of using a stack object after it was freed and thus undefined behavior.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

Can confirm the fps now looks normal (no difference between gcc 5 and gcc 6), thanks!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49140
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: The official "ZDoom on Linux" thread.

Post by Graf Zahl »

I think it may have been clobbered by another local variable, like a loop counter, so that the code went haywire with incorrect values somewhere. The assembly without source is too messy to analyze so I can only guess.
User avatar
MartinHowe
Posts: 2041
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: The official "ZDoom on Linux" thread.

Post by MartinHowe »

Help please - trying to build ZDoom (on Ubuntu variant: Mint Cinnamon 18)

Does anyone have an up-to-date version of the guide to building ZDoom?
The one on the Wiki refers to a "make clean" command that has no rule; it also results in FMOD Ex 4.36 being required for compatibility with OpenAL.
Is this guide massively out of date?
For that matter, does anyone here build ZDoom on Linux and how does what they do differ from the guide on the Wiki?

EDIT:
I had to set NO_OPENAL (after finding HOW to set it), also to download and install libmpg123 and libsndfile as the Wiki guide doesn't install those.
Build zdoom in the end and it does play doom2 at least.
However, I don't know what bugs or incompatibilities lurk due to lack of OpenAL.

So any guidance from somebody who has built a fully-fledged ZDoom with openal and all the trimmings would be welcome :)
User avatar
Rachael
Posts: 13726
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: The official "ZDoom on Linux" thread.

Post by Rachael »

Yes, I have noticed that OpenAL support is broken in Linux, now, too, but since I never use it I just tick the "NO_OPENAL" box on cmake_gui.

It really needs to auto set itself, though. I have a feeling nary a soul tests on Linux without proper OpenAL support which doesn't come out of the box as it is (at least on Ubuntu).
Blzut3
 
 
Posts: 3167
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: The official "ZDoom on Linux" thread.

Post by Blzut3 »

I'm confused, ZDoom builds and runs fine for me with or without OpenAL support.

@MartinHowe: I'm running Kubuntu 16.10 and all I do is:

Code: Select all

mkdir build
cmake .. -G Ninja -DFMOD_INCLUDE_DIR=... -DFMOD_LIBRARY=... -DCMAKE_BUILD_TYPE=Release
ninja
User avatar
Rachael
Posts: 13726
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: The official "ZDoom on Linux" thread.

Post by Rachael »

Have you tested that on a fresh Kubuntu install, following the instructions on the wiki?

Because last time I did, it didn't work for me, it errored out. (I used 16.04 though)
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: The official "ZDoom on Linux" thread.

Post by Danfun64 »

Blzut3 wrote:
Graf Zahl wrote:because the headers it comes with are too outdated.
While I agree with the rest of the post, but just so you know: MinGW-w64 is not the same as MinGW in this regard. I don't recall any significant changes being required for w64 to work (in fact I think it was just fixing an ifdef), but vanilla required a bit of work (certainly doable since that's the only way to do C++11/14 on Win98 which I already did). The system I did these changes on wasn't set up to commit so I didn't get around to submitting the fixes.
So...what is necessary to compile (G)ZDoom on MinGW-W64 as of this very moment? Would these fixes cause netplay incompatibilities with non patched gcc compiled binaries?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: The official "ZDoom on Linux" thread.

Post by Edward-san »

Eruanna wrote:Have you tested that on a fresh Kubuntu install, following the instructions on the wiki?

Because last time I did, it didn't work for me, it errored out. (I used 16.04 though)
Do you mind telling which errors?

But yeah, regarding the dependencies the wiki must be updated because openal requires also libsndfile1-dev and libmpg123-dev (at least on Ubuntu, I don't know about the other distributions).
Danfun64
Posts: 93
Joined: Tue Apr 23, 2013 4:33 pm

Re: The official "ZDoom on Linux" thread.

Post by Danfun64 »

MartinHowe wrote:FMOD Ex 4.36 being required for compatibility with OpenAL.
That makes no sense at all. The opposite is true (FMOD Ex 4.36 breaks compatibility with OpenAL), and you need a version of FMOD Ex that's a lot more recent than what the wiki has linked to for the two to co-exist (I use the last version, 4.44.63 , and both coexist just fine.)

Return to “Tutorials”