Re: The official "ZDoom on Linux" thread.

Mon Oct 17, 2016 10:58 am

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.

Re: The official "ZDoom on Linux" thread.

Tue Oct 18, 2016 4:07 pm

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.

Re: The official "ZDoom on Linux" thread.

Tue Oct 18, 2016 9:00 pm

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.

Re: The official "ZDoom on Linux" thread.

Sun Oct 30, 2016 3:06 pm

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:

Re: The official "ZDoom on Linux" thread.

Sun Oct 30, 2016 3:32 pm

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.

Re: The official "ZDoom on Linux" thread.

Sun Oct 30, 2016 9:37 pm

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.

Re: The official "ZDoom on Linux" thread.

Mon Oct 31, 2016 2:50 am

Can confirm the fps now looks normal (no difference between gcc 5 and gcc 6), thanks!

Re: The official "ZDoom on Linux" thread.

Thu Nov 03, 2016 6:44 am

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.

Re: The official "ZDoom on Linux" thread.

Thu Nov 17, 2016 2:31 pm

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 :)

Re: The official "ZDoom on Linux" thread.

Thu Nov 17, 2016 7:10 pm

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).

Re: The official "ZDoom on Linux" thread.

Thu Nov 17, 2016 9:03 pm

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:
mkdir build
cmake .. -G Ninja -DFMOD_INCLUDE_DIR=... -DFMOD_LIBRARY=... -DCMAKE_BUILD_TYPE=Release
ninja

Re: The official "ZDoom on Linux" thread.

Thu Nov 17, 2016 9:46 pm

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)

Re: The official "ZDoom on Linux" thread.

Thu Nov 17, 2016 11:13 pm

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?

Re: The official "ZDoom on Linux" thread.

Fri Nov 18, 2016 4:12 am

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).

Re: The official "ZDoom on Linux" thread.

Fri Nov 18, 2016 11:18 am

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.)