ETQW oddities with glibc 2.15+ [FIX]


(ressected) #21

[QUOTE=REA987;565790]Sorry for necromancy. But glibc related crashes makes the game unbearable on Linux. Unfortunately, those Dropbox uploads are down at the moment. Can they be reuploaded please? Thank you.

Regards.[/QUOTE]

It just looks like a patched and re-compiled glibc that removes SSE optimization (the code with the bug according to them). It seems to me simply using LD_PRELOAD pointing to a pre-bug glibc in a startup script would be the best approach, at this point. I haven’t experienced “unbearable” though every now and then it locks up the display and I have to switch to a VT to kill it.


(REA987) #22

Yeah, it is nowhere near unplayable but if I try to connect a server after a disconnection, the game simply freezes (greys out). My solution is to use in-game console to connect a server; if I receive “Trying to exit gracefully” message, I enter quit command to avoid screen lock. It works but makes me sad…

Can you please share that pre-bug glibc with a little bit usage explanation? I am familiar with LD_PRELOAD but last time I tried an old glibc, the game could not be launched due to missing dependencies… I am using Ubuntu Mate 17.04 x64 at the moment.


(edxot) #23

curious how this thread got back to life at the same day this broke out (OutlawCountry):
https://wikileaks.org/vault7/

and just a few days after this:

probably not related, but you never know.

PS: Nail, this is the correct time to come here and talk about hidden agendas.


(rorgoroth) #24

[QUOTE=REA987;565790]Sorry for necromancy. But glibc related crashes makes the game unbearable on Linux. Unfortunately, those Dropbox uploads are down at the moment. Can they be reuploaded please? Thank you.

Regards.[/QUOTE]

Unfortunately they are gone for good, I haven’t played this game in years and even then I’ve stopped using Linux years ago as well so couldn’t make you new ones.

The original patch is here: bug report // patch file and you will have to apply it against glibc-2.15 since I remember it not working with 2.16.
Warning: A glibc that old will most likely not build any any distro released in the past 4 years without you going through the configure script to disable numerous version checks since glibc is quite picky if memory serves me right.

You could always try building a recent glibc and hope that #6 still works though so you can get working libc.so.6, libpthread.so.0 and librt.so.1 to dump in the folder containing etqw executables.


(REA987) #25

All right, I indefinitely gave up trying to fix glibc problem. This time I grabbed libraries from Linux Mint 12 which uses glibc 1.13; I somehow managed to corrupt the game directory and the game wouldn’t launched due to SDL crashes. Renaming configuration directory didn’t help, so I needed to uninstall and reinstall the game…

Fine, I will keep using in-game console to avoid screen locks on Linux…

What bothers me the most is the inability to play the game out of box with most recent versions of all 3 OS.

  • Linux: Linux build of the game was compiled with Pentium III for earth sake; current build cannot benefit any of modern CPU and GPU features. Even if I ignore ancient SDL libraries and 32 architecture, the game keeps crashing in the case of frequent connections and disconnections.

  • Windows: It was all good until Windows 10 Creators Update; now, mods crash the game due to dll extraction prevention of the OS. If you are into clan matches; good luck dual booting with Windows 7…

  • Mac: Aspyr’s choice of physically mounted DVD requirement doomed the game on Macs from the beginning. Now, no laptop is shipped with optical drive any longer. Besides, most recent update of the game cannot be installed on new releases of macOS; data needed to be extracted and manually applied to game’s folder. Good luck letting an Apple user do that…

Shame, such a great game is deliberately left to rot.


(rorgoroth) #26

The latest version not requiring patching would be 2.14 so you could try grab the needed library files from an old binary package, you could try glibc-2.14.1-14.12.2.i686.rpm which I’ve checked contains the old libraries so possibly works, worth a try at least. Just remember to back-up the original files and only copy libc.so.6, libpthread.so.0 and librt.so.1 in to place with the game executables and you shouldn’t corrupt anything.


(REA987) #27

Unfortunately, that didn’t work either. First, it complained about libX11.so.6 which was not compatible with glibc 2.14. So, I extracted libX11.so.6 from xorg-x11-libX11-7.6-23.1.2.i586.rpm; direct segfault without explanation. I usually launch the game via etqw-rthread launcher; both etqw-rthread and etqw launchers wouldn’t launch the game. When I tried etqw.x86 binary, it launched but as it turned out, it refuses to use glibc 2.14 even if I force with LD_PRELOAD; so crash/screen lock in case of frequent connection/disconnection is still there. Well, thanks for the help. At least I am convinced that fixing that error is beyond my capabilities. Besides, using in-game console does not kill me. :stuck_out_tongue:

Regards.


(ressected) #28

[QUOTE=REA987;565849]Unfortunately, that didn’t work either. First, it complained about libX11.so.6 which was not compatible with glibc 2.14. So, I extracted libX11.so.6 from xorg-x11-libX11-7.6-23.1.2.i586.rpm; direct segfault without explanation. I usually launch the game via etqw-rthread launcher; both etqw-rthread and etqw launchers wouldn’t launch the game. When I tried etqw.x86 binary, it launched but as it turned out, it refuses to use glibc 2.14 even if I force with LD_PRELOAD; so crash/screen lock in case of frequent connection/disconnection is still there. Well, thanks for the help. At least I am convinced that fixing that error is beyond my capabilities. Besides, using in-game console does not kill me. :stuck_out_tongue:

Regards.[/QUOTE]

Hey REA don’t lose hope just yet. I’m sorry my previous “just use LD_PRELOAD” comment was way oversimplified. What it looks like you need to do is containerize etqw by running it in a chroot, or some equivalent setup. Some users have reported success is running other opengl games in a 32bit chroot. You need go back in time and recreate the environment that existing around it’s release. This is the trick I do to compile the SDK. ETQW also runs well in WINE, which I believe can also be installed on OSX but I’ve never tried it. I don’t remember OSX ever requiring the DVD to run or install. Doesn’t OSX mount images as if they were disks? I think what I did was install the update DMG (which is a full install) and then copy the data files over from the ISO. It still doesn’t run bad in linux, as it won’t prevent people from getting in the game. This windows 10 issue on the other hand…


(REA987) #29

I am fine with native ETQW on Linux even if it has a tendency to crash in case of frequent connections to game servers…

macOS version does require an optical drive to run the game; mounting image doesn’t do the trick. There exists a nodvd c… ahem binary for Mac that is not legal despite the fact the game requires legitimate license key to play online anyway.

Windows 10 would be the worst thing that happened to PC gaming. It is deliberately broken in order to force people use Xbone and Windows Store. Few days ago I tried Win 10 in Vmware environment; user permissions were all over the place… Even vanilla ETQW wouldn’t start an offline campaign due to directory permissions; WTF! I will try to install Win 10 to a backup HDD to figure out the problems soon…


(you_is_me) #30

[QUOTE=REA987;565945]I am fine with native ETQW on Linux even if it has a tendency to crash in case of frequent connections to game servers…
[/QUOTE]

Is there any chance your using Arch Linux?

After a lot of hours of compiling glibc (32bit) I think I did it! I copied the needed .so files (the ones named from this thread + bug report) to my installation folder and started etqw with “LD_PRELOAD=”/opt/etqw/libc-2.26.so" ./etqw.x86" and it works! :slight_smile:

No longer missing letter and I can switch between Servers without a single crash!
So the fix still applies, I just needed to change/edit the PKGBUILD (like described in this thread) and compile… for hours :stuck_out_tongue: but it works fine so far.


(REA987) #31

[QUOTE=you_is_me;570188]Is there any chance your using Arch Linux?

After a lot of hours of compiling glibc (32bit) I think I did it! I copied the needed .so files (the ones named from this thread + bug report) to my installation folder and started etqw with “LD_PRELOAD=”/opt/etqw/libc-2.26.so" ./etqw.x86" and it works! :slight_smile:

No longer missing letter and I can switch between Servers without a single crash!
So the fix still applies, I just needed to change/edit the PKGBUILD (like described in this thread) and compile… for hours :stuck_out_tongue: but it works fine so far.[/QUOTE]

Wow! I use Ubuntu Mate 17.10 and Linux Mint 18.2 Mate; it’s been almost a decade since I use Debian based distros, I don’t think I can change even if I wanted.

Can you please upload the files and assist us with a step by step instruction? Cause, as Windows 10 and macOS issues are kinda tweaked with workarounds or mods, Linux remained problematic; I can hardly suggest it to Linux users due to its tendency to screenlock.

My info:

Kernel Linux 4.10.0-35-generic x86_64
libc6: 2.23-0ubuntu9

Thank you!


(you_is_me) #32

After a bit more testing I can say: The missing last letter is fixed, but the segfault when switching servers… not completly. It still does happen for me after staying long on an server (thats why I first thought it is completly gone).
Maybe the libgcc_s.so.1 is the problem. As suggested I deleted it from the game dir to make the game use the standard .so file but the segfault still happens (sometimes?). Maybe I need compile this too with multiarch disabled? I could try but it will take some time for my PC :stuck_out_tongue:

I am sure I can’t share the files right now because I compiled with march=native which means it’s optimized for my architecture (and doesn’t work on others) but for sure I will build a generic package and share later.

So lets see how it goes
LAST LETTER: Fixed 100%
SEGFAULT: Still happens in some cases(?)


(REA987) #33

Please do that. Crash/screenlock issue can be avoided by using in-game console; if the game crashes, the player can quit the game by typing quit and then restarting the game. But missing last letter is getting a greater nuisance in time; without the last letter of text I missed many respawns in the limbo many due to not being able to see the remaining time. Besides, final scores at the end of each levels are missing because of lack of last digits.


(you_is_me) #34

Here is glibc 2.26 compiled with multiarch disabled:

Tell me if it works, if you get errors I could try to build against your current glibc.

Place the needed .so files inside the etqw folder (or do some softlinks) and don’t forget to Preload the glibc .so file like I described earlier.

Missing last letter should be fixed then!

Small tipp: You can use the command ldd to show you shared libraries required by any given program so for example “ldd ./etqw.x86”


(REA987) #35

Edit: Never mind, I booted Ubuntu Mate 17.10 which uses glibc 2.26; problem solved. Just like you said, missing last character problem disappeared! :smiley: Your fix is likely to work with Ubuntu 17.10 and upwards.

https://distrowatch.com/table.php?distribution=ubuntu

However, the crash/screenlock issue is still there. It might be related with glibc but cannot be solved with the patches provided in the bug report. Nevertheless, I am extremely happy with the current fix. Thank you!

PS: Please try compiling libgcc as well, I wonder about the result.

Regards.


Uh, my coding noobness strikes back. It looks like I messed it up little bit.

Here is ldd output of ETQW binary:

$ ldd ./etqw.x86
	linux-gate.so.1 =>  (0xf77a8000)
	libSDL-1.2.so.0 => /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 (0xf76dc000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76bf000)
	libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf76a3000)
	libjpeg.so.62 => /usr/lib/i386-linux-gnu/libjpeg.so.62 (0xf767d000)
	libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7532000)
	libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf751d000)
	libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf73a6000)
	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7350000)
	libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7333000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf717d000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7178000)
	libasound.so.2 => /usr/lib/i386-linux-gnu/libasound.so.2 (0xf7062000)
	libpulse-simple.so.0 => /usr/lib/i386-linux-gnu/libpulse-simple.so.0 (0xf705b000)
	libpulse.so.0 => /usr/lib/i386-linux-gnu/libpulse.so.0 (0xf7001000)
	libcaca.so.0 => /usr/lib/i386-linux-gnu/libcaca.so.0 (0xf6f37000)
	/lib/ld-linux.so.2 (0x565fb000)
	libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6f11000)
	librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf6f08000)
	libpulsecommon-8.0.so => /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-8.0.so (0xf6e7f000)
	libjson-c.so.2 => /lib/i386-linux-gnu/libjson-c.so.2 (0xf6e73000)
	libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xf6e19000)
	libslang.so.2 => /lib/i386-linux-gnu/libslang.so.2 (0xf6ced000)
	libncursesw.so.5 => /lib/i386-linux-gnu/libncursesw.so.5 (0xf6cb8000)
	libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xf6c94000)
	libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6c90000)
	libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6c89000)
	libsystemd.so.0 => /lib/i386-linux-gnu/libsystemd.so.0 (0xf6bfb000)
	libwrap.so.0 => /lib/i386-linux-gnu/libwrap.so.0 (0xf6bf1000)
	libsndfile.so.1 => /usr/lib/i386-linux-gnu/libsndfile.so.1 (0xf6b77000)
	libasyncns.so.0 => /usr/lib/i386-linux-gnu/libasyncns.so.0 (0xf6b70000)
	libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xf6b4a000)
	liblzma.so.5 => /lib/i386-linux-gnu/liblzma.so.5 (0xf6b24000)
	libgcrypt.so.20 => /lib/i386-linux-gnu/libgcrypt.so.20 (0xf6a75000)
	libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xf6a59000)
	libFLAC.so.8 => /usr/lib/i386-linux-gnu/libFLAC.so.8 (0xf69f9000)
	libvorbisenc.so.2 => /usr/lib/i386-linux-gnu/libvorbisenc.so.2 (0xf696d000)
	libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xf6954000)
	libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xf68df000)
	libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xf68c8000)
	libogg.so.0 => /usr/lib/i386-linux-gnu/libogg.so.0 (0xf68bf000)
	libvorbis.so.0 => /usr/lib/i386-linux-gnu/libvorbis.so.0 (0xf6893000)

Here are the libraries that I grabbed from …/lib32-glibc-2.26-2-x86_64.pkg/usr/lib32

ld-2.26.so
libc-2.26.so
libc.so.6
libdl.so
libm-2.26.so
libm.so.6
libnsl.so
libpthread-2.26.so
libpthread.so.0
libresolv.so
librt-2.26.so
librt.so.1
ld-linux.so.2
libc.so
libdl-2.26.so
libdl.so.2
libm.so
libnsl-2.26.so
libnsl.so.1
libpthread.so
libresolv-2.26.so
libresolv.so.2
librt.so

As I copied these libraries to the installation directory, launching etqw.x86 binary with preload attempts returned following errors:

$ LD_PRELOAD=/home/rifat/etqw/libc-2.26.so ./etqw.x86
./etqw.x86: relocation error: /home/rifat/etqw/libc-2.26.so: symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
$ LD_PRELOAD=/home/rifat/etqw/ld-2.26.so:/home/rifat/etqw/libc-2.26.so ./etqw.x86
./etqw.x86: relocation error: /lib/i386-linux-gnu/libpthread.so.0: symbol __libc_dl_error_tsd, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
$ LD_PRELOAD=/home/rifat/etqw/ld-2.26.so:/home/rifat/etqw/libc-2.26.so:/home/rifat/etqw/libpthread-2.26.so ./etqw.x86
ETQW 1.5.12663.12663  linux-x86 May  9 2008 13:50:52
found interface lo - loopback
found interface wlp2s0 - 192.168.2.50/255.255.255.0
CPU: Intel CPU with MMX & SSE & SSE2 & SSE3
ETQW using generic code for SIMD processing
enabled Flush-To-Zero mode
------ Initializing File System ------
Loaded pk4 /home/rifat/etqw/base/game000.pk4 with checksum 0x3efd73a5
Loaded pk4 /home/rifat/etqw/base/game001.pk4 with checksum 0xa02f1c18
Loaded pk4 /home/rifat/etqw/base/game002.pk4 with checksum 0x87457e61
Loaded pk4 /home/rifat/etqw/base/pak000.pk4 with checksum 0x442eb08b
Loaded pk4 /home/rifat/etqw/base/pak001.pk4 with checksum 0x10e16e6
Loaded pk4 /home/rifat/etqw/base/pak002.pk4 with checksum 0x8dbe7353
Loaded pk4 /home/rifat/etqw/base/pak003.pk4 with checksum 0x99dfcabb
Loaded pk4 /home/rifat/etqw/base/pak004.pk4 with checksum 0x7e49f838
Loaded pk4 /home/rifat/etqw/base/pak005.pk4 with checksum 0x5ccc7213
Loaded pk4 /home/rifat/etqw/base/pak006.pk4 with checksum 0x9edf1b7d
Loaded pk4 /home/rifat/etqw/base/pak007.pk4 with checksum 0x74a1a2f
Loaded pk4 /home/rifat/etqw/base/pak008.pk4 with checksum 0x71a93b80
Loaded pk4 /home/rifat/etqw/base/zpak_english000.pk4 with checksum 0x977c7bd0
Loaded pk4 /home/rifat/etqw/base/zpak_english001.pk4 with checksum 0x6583cd8
Loaded pk4 /home/rifat/etqw/base/zpak_english002.pk4 with checksum 0x8dc70e3d
Loaded pk4 /home/rifat/etqw/base/zpak_english003.pk4 with checksum 0xc2d7ed49
Loaded pk4 /home/rifat/etqw/base/zpak_french000.pk4 with checksum 0x3363fb2b
Loaded pk4 /home/rifat/etqw/base/zpak_french001.pk4 with checksum 0x3bd7a062
Loaded pk4 /home/rifat/etqw/base/zpak_french002.pk4 with checksum 0x79287190
Loaded pk4 /home/rifat/etqw/base/zpak_french003.pk4 with checksum 0x8f315c7b
Loaded pk4 /home/rifat/etqw/base/zpak_german000.pk4 with checksum 0xd42cc5af
Loaded pk4 /home/rifat/etqw/base/zpak_german001.pk4 with checksum 0xa694c3f1
Loaded pk4 /home/rifat/etqw/base/zpak_german002.pk4 with checksum 0x64bee731
Loaded pk4 /home/rifat/etqw/base/zpak_german003.pk4 with checksum 0x370e6186
Loaded pk4 /home/rifat/etqw/base/zpak_korean000.pk4 with checksum 0xd42c084
Loaded pk4 /home/rifat/etqw/base/zpak_korean001.pk4 with checksum 0x4de6a4e7
Loaded pk4 /home/rifat/etqw/base/zpak_korean002.pk4 with checksum 0x15d2c9af
Loaded pk4 /home/rifat/etqw/base/zpak_korean003.pk4 with checksum 0x4f8dfac1
Loaded pk4 /home/rifat/etqw/base/zpak_polish000.pk4 with checksum 0x4bdaa546
Loaded pk4 /home/rifat/etqw/base/zpak_polish001.pk4 with checksum 0x2575ff8e
Loaded pk4 /home/rifat/etqw/base/zpak_polish002.pk4 with checksum 0x3ab92dd6
Loaded pk4 /home/rifat/etqw/base/zpak_polish003.pk4 with checksum 0x8d9af876
Loaded pk4 /home/rifat/etqw/base/zpak_russian000.pk4 with checksum 0x7059b4d4
Loaded pk4 /home/rifat/etqw/base/zpak_russian001.pk4 with checksum 0xf3e91581
Loaded pk4 /home/rifat/etqw/base/zpak_russian002.pk4 with checksum 0x38b1a37c
Loaded pk4 /home/rifat/etqw/base/zpak_russian003.pk4 with checksum 0x7e90b040
Loaded pk4 /home/rifat/etqw/base/zpak_spanish000.pk4 with checksum 0x2cd606df
Loaded pk4 /home/rifat/etqw/base/zpak_spanish001.pk4 with checksum 0xd609566c
Loaded pk4 /home/rifat/etqw/base/zpak_spanish002.pk4 with checksum 0xcf994ada
Loaded pk4 /home/rifat/etqw/base/zpak_spanish003.pk4 with checksum 0xe7d989bc
signal caught: 'Segmentation fault', si_code 1
double fault: 'Segmentation fault', bailing out
Segmentation fault
$ LD_LIBRARY_PATH=/home/rifat/etqw ./etqw.x86
./etqw.x86: relocation error: /home/rifat/etqw/libc.so.6: symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference

It looks like it has something to do with ld-linux.so.2 but I couldn’t figure it out. Should I link your ld-linux.so.2 or ld-2.26.so somewhere else? How about …/lib32-glibc-2.26-2-x86_64.pkg/usr/lib/ld-linux.so.2 ? Is that 64 bit? Sorry for trouble. :-/


(you_is_me) #36

I am not sure what is the cause (Preloading the ld-linux did cause a segfault for me too) but while searching on the web it may could be an issue with the glibc difference of your system.
Give me some time do compile again with your glibc version and then some instructions.

And have a backup of your current etqw folder.
I would remove symlinks and its .so file step by step from the game Dir so it uses the libraries of your Distro. I am left with only the Cgx.x86 (or so habe to look the correct name later up) in my game dir at the moment.

Could you copy only the libc.so.6 and libc-2.26.so inside your game directory, start a shell and do:
export LD_PRELOAD="/home/rifat/etqw/libc.so.6"
./etqw.x86

Does it work? Same error?


(REA987) #37

No, no; I have solved the problem by switching to Ubuntu Mate 17.10. The problem was outdated glibc of Linux Mint 18.2 which is based on Ubuntu 16.04 that uses glibc 2.23. Switching to Ubuntu Mate 17.10 that uses glibc 2.26 solved the problem. I am planning to upload required libraries to PCGamingWiki; having compatible libraries with LTS release of Ubuntu is a sound idea. Would you compile against glibc 2.23 that most recent LTS release Ubuntu 16.04 uses? Thank you again.


(you_is_me) #38

So, the files provided are working for you? Nice to hear :slight_smile:
I see what I can do but when I tried to build it I had some errors. Let’s see if I can fix it.


(you_is_me) #39

So after many many fails and frustration (I actually had to fix the source cause it was not compatible anymore with my system) I’ve compiled glibc 2.23 (32 Bit).
Can you try this one:


Does it work on your LTS System?
(I know its 2.23-4 and not 2.23-0 but I thought higher subversion would be better maybe)


(REA987) #40

I will try this when I get back home on Sunday. Sorry for delay. :-/