Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through PayPal, Flattr, Liberapay or Buy us a Coffee. You can also buy games using our partner links for GOG and Humble Store.

The sad case of Unreal Engine 1 on Mesa and Linux in 2020

Posted by , | Views: 25,543

One of the great game industry battles of the turn of century was the standoff between Quake III Arena and Unreal Tournament. With both multiplayer focused first person shooters released just weeks apart from one another, that the two games would wind up going head to head was inevitable. If pressed I am always going to have to say I favour the former, but the remarkable thing for us Linux users is that, for a time, both games lived harmoniously under the same publisher.

More than any other developer, Loki Software can be credited with founding the Linux games industry, and with them still riding high at the time, they went on to publish both titles on our platform. More than just popular games, Quake III Arena and Unreal Tournament were also flagships for the engine technology within. Unreal Engine 1 and id Tech 3 would go on to be used in dozens of other titles, some of which would also be ported by Loki Software before their closure in 2002.

While Quake III Arena was granted its place in eternity when its source code was released in 2005, community support for Unreal Tournament was able to breathe some new life into the game, even with the limitations of the closed binary. By 2018 however the game was no longer launching for Mesa users. Due to certain core files being statically linked to an archaic libstdc++ library, the game can only be ran outside of Software mode on the free graphics stack with use of a hacked Mesa patch.

After spinning my own Mesa packages by use of the Arch Build System, I reinstalled Unreal Tournament using the data from GOG.com and the ut-install-436-goty.run Linux installer. I could now start the game without producing a segmentation fault, and other than some sound quality problems everything seemed to be normal. After installing a third party OpenGL rendererOpenAL audio device, and S3TC textures the game was looking and sounding better than ever before.

 

With my love of a straight bot DeathMatch, it took me a while to discover that changing to any other kind of game mode from the menu would cause the game to crash with a "Signal: SIGIOT [iot trap]" error. This, along with the need to apply Mesa patches in the first place, severely hampers the game for use at my next LAN party. With the Linux versions of Unreal Gold, such as those provided by icculus.org or Unreal 227, also relying on this game to work, that takes them out of contention as well.

As I mentioned before, Unreal Tournament was not the only Unreal Engine 1 game Loki Software worked on. Rune has to be the most fitting port they ever produced, with the company's namesake Norse trickster god even appearing as the archvillain. It was also one of the last ports that Loki Software released before closing down, and as such is just modern enough to make me wince at the fact I am no longer capable of getting it to work.

With a patched Mesa the game launches and renders fine, but you can no longer load your saved games while using OpenGL, meaning you are once again stuck with Software mode. The crackling stuttering audio I encountered with Unreal Tournament is also present here, but is now unavoidable due the game shipping only with its default OpenAL audio device. I tried using some of the alternatives available for Unreal Tournament, but Rune refused to load them.

I remember playing through the whole game close to ten years back when I was still on Fedora and having a good time with it. Rune has a very solid if lengthy campaign with tight controls that plays more like its first person shooter contemporaries than many other third person games did. The developer Human Head Studios would go on to work on the original Prey, which also supports Linux and I have written about previously.

 

If there is one silver lining in all of this, it is that all of these games can be made to work reasonably well with WINE or Proton without the need to fiddle around with Mesa to get them to launch. Performance does suffer if you do not supply an OpenGL renderer such as those by Chris Dohnal, but once properly configured the games can be made to run almost as if they were native applications. I even got a higher frame rate in Unreal Tournament.

Launching them still requires some patience, as they all seem prone to false starts, but once you do get to the main menus all seems to be well. This also allows you to reunite the games with their brethren Deus Ex, which if not for the closure of Loki Software would have become a native Linux title. I can confirm that Rune Gold, Unreal Gold, Unreal Tournament GOTY Edition, and Deus Ex GOTY Edition from GOG.com all can be made to WINE well with a few tweaks.

For an engine with such a pedigree on Linux this outcome is still disappointing. It may just be my pride getting in the way, but there is something special about being able to get the old native binaries to work, especially in the case of Rune where I have it on disc with the full retail packaging. It also makes me wonder how well my modern library of native titles is going to run in twenty years time, and if I will be forced to use a compatibility layer to run some of them too.

According to Ryan Gordon's recent Patreon post, the former Loki Software employee once came close to reviving Rune on Linux in some form but it "slipped through [his] fingers". The source code release of Quake III Arena has allowed it to transcend all the boundaries imposed by time, while its erstwhile adversary begins to languish. For those who value games as more than just ephemera, I can only hope such releases start to become the norm.

UPDATE: Since publishing this article a new modified build of Unreal Tournament has come to light. This version has been made to work around the symbol collision with recent versions of libstdc++ which in turn produced the segmentation faults with modern versions of Mesa. I have also been made aware of a Lutris script that allows their package of Unreal Gold to run with Mesa.

Also thanks to adamhm for providing a method that allows all of the Unreal Engine 1 games to start reliably with WINE.

Article taken from GamingOnLinux.com.
36 Likes, Who?
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG, Humble Store and Paradox Interactive. See more information here.
About the author -
Hamish Paul Wilson is a free software developer, game critic, amateur writer, and farm labourer living in Alberta, Canada. He is an advocate of both DRM free Linux gaming and the free software movement alongside his other causes, and more information on him can be found at his icculus.org hompage where he lists everything he is currently involved in.
See more from me
36 comments
Page: «4/4
  Go to:

docofkult 5 February 2020 at 10:32 pm UTC
Purple Library Guy
docofkultI have been contemplating doing a retro build for some time specifically for playing the Loki games. However, besides some dabbeling with Red Hat around the turn of the century, most of my Linux knowledge have been gained after Ubuntu came around. My initial idea is to do a close to contempary build with a contemporary OS as to not have to fight issues like described in the article. Hardware will likely be Pentium III and a 3dfx graphics card. Not too sure about which sound cards actually had good support at the time. I would appreciate any suggestions as to which OS to go with and any sound card recommendations.
My personal opinion, if you're going to do an old school Linux, go with Mandrake/Mandriva. They were the king of user friendly before Ubuntu came along. They were I believe the first to do for Red Hat's rpms what apt does for debs. And for someone whose early experience was Red Hat, well, Mandrake was based on Red Hat in somewhat the way Ubuntu is based on Debian.

It was actually Mandrake, not Red Hat, come to think of it So yes, probably what I should look at first.
Hamish 5 February 2020 at 11:54 pm UTC
BillFlemingThe author of this article really didn't do their research. The game runs fine without needing a patched mesa.You just need to install some extra audio packages and launch the game using a special command for the audio.
Trust me when I say that I have been aware of this issue for years and that I spent a great deal of time researching when crafting this article. I did miss your AUR package, but that is because I deliberately avoid distribution specific methods so as not to exclude people with other setups. All that being said, I am happy to say that your build of the game does work.

Looking into it, the "ut99v451-linux.2019-07-21.tar.gz" package you are using has hacked game binaries that have been made to work around the symbol collision with modern versions of libstdc++ which in turn produced the segmentation fault with Mesa. This is NOT TRUE of the last official release of the game, which is provided by the "ut-install-436-GOTY.run" installer I used.

Again, I will admit to not being aware of this hacked version, but considering that it only shows up on Google from either ./play.it or the gog-unreal-tournament-goty AUR package I can hardly be blamed for that. The vast majority of articles and sources online do not refer to this package, likely because it is not official and did not even exist before last summer.

BillFlemingThe game's old renderer is also still usable so you don't even have to mod the game to play, but it won't support super high res. (2560x1080 works, 2560x1440 didn't for me)
I never claimed that it did not work. I did need to supply a new audio device in order to get better sound, but the original OpenGL renderer did indeed work fine given its limitations.

rea987What you have linked as OpenGL renderer is same OpenAL. That's a mistake I guess. Is the third party OpenGL renderer the same Stéphan's Kochen OpenGLDrv based on Chris Donhal's enhanced OpenGL renderer?
Okay, that one is my bad. It was supposed to link to a compiled version of Stéphan Kochen's OpenGLDrv renderer like you said.

Perkeleen_VittupääSoo, could all this be possible to package somehow to a state that even a non-tech-savvy random occasional gamer could then enjoy Unreal Tournament on Linux?
Well, now that I have a binary that works without issues, I will at least be writing a guide on how to get Unreal Tournament working on modern Linux distributions as a sequel to this article.

Liam Dawe
appetrosyanSadly, not many of those games are OpenSource, and it’s only a matter of time when this issue crops up
Which is as true on Windows as it is on Linux though remember. All games eventually succumb to time, we're just in an interesting position thanks to Wine/Proton that can at times run games Windows 10 now cannot heh.
Yeah, there is nothing about Windows that makes it less susceptible to these problems than Linux. This is just one of the benefits of WINE being a compatibility layer. It grants compatibility, even for older titles.


Last edited by Hamish on 6 February 2020 at 2:44 am UTC
TheRiddick 6 February 2020 at 12:29 am UTC
BillFlemingThe author of this article really didn't do their research. The game runs fine without needing a patched mesa.
You just need...

I guess the point was that it's not a out of box experience, like many things under Linux, you need to stand on your head and rub your tummy to get some things going.. lol
Hamish 6 February 2020 at 4:02 am UTC
The README file included by ./play.it is illuminating:
Three libs from [UTPGPatch451.tar.bz2] have a [symbol conflict] with modern
libstdc++.so.6. Sadly `objcopy --redefine-sym` can't [redefine dynamic symbols]
and hexediting just delays the crash to loading Pit of Agony. Use [elfhash] to
replace the symbol with one the same length and rehash the elf.

```
for lib in System/Core.so System/NullDrv.so System/NullRender.so; do
md5sum $lib
../elfhash/elfhash -f __dynamic_cast -t __dynloki_cast $lib > /dev/null
md5sum $lib
done
```

522154c5c551de4cda673f9b75cae109  System/Core.so
fbbcff9c5e40de08acb7c98f364a9707  System/Core.so
7600d224c7614c7f6a07c5eef8c66015  System/NullDrv.so
3b075a8a3c4773759fe6f7c935cb4ff0  System/NullDrv.so
89f4cc264c97fe5f97d6c63dd6a05e26  System/NullRender.so
c317de7117e78b9e16becc8583c3752a  System/NullRender.so

[UTPGPatch451.tar.bz2]: https://web.archive.org/web/20160803031207/http://www.utpg.org/patches/UTPGPatch451.tar.bz2
[symbol conflict]: https://bugs.freedesktop.org/show_bug.cgi?id=108933
[redefine dynamic symbols]: https://sourceware.org/ml/binutils/2006-03/msg00005.html
[elfhash]: https://github.com/cjacker/elfhash


It should also be noted that this build is based on the unofficial UTPG 451 patch.

I can also now confirm that the "Signal: SIGIOT [iot trap]" error when changing game modes is a product of using Stéphan Kochen's OpenGLDrv renderer. When using SDLGLDrv it works fine.


Last edited by Hamish on 6 February 2020 at 5:57 am UTC
calvin 7 February 2020 at 4:06 am UTC
Sometimes I wonder if Win32 becomes the stable Linux userland ABI... (well, for desktop at least)
Perkeleen_Vittupää 14 February 2020 at 11:01 am UTC
TheRiddick
BillFlemingThe author of this article really didn't do their research. The game runs fine without needing a patched mesa.
You just need...

I guess the point was that it's not a out of box experience, like many things under Linux, you need to stand on your head and rub your tummy to get some things going.. lol

The universal packaging is one thing helping towards our "promised land"
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon, Liberapay or Paypal. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!

You need to Register and Login to comment, submit articles and more.


Or login with...

Livestreams & Videos
Community Livestreams
  • Puzzle Tiles: „The Room Two“ (Proton)
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts