====== Tribes 2 ====== ===== Install & patch the game ===== To install the game, mount your CD & run the installer with ''linux32'' from the ''util-linux'' package : # mount /dev/cdrom /media/cdrom $ linux32 bash /media/cdrom/setup.sh Apply the last released [[https://ftp.lokigames.twolife.be/pub/updates/rt2/rt2-1.54c-unified-x86.run|patch]] : $ linux32 bash rt2-1.54c-unified-x86.run ===== Adventures in the dark age of broken toolchain ===== $ ./tribes2.dynamic Inconsistency detected by ld.so: dl-version.c: 204: _dl_check_map_versions: Assertion `needed != NULL' failed! ''./tribes2.dynamic'' is a very old ELF binary, and unfortunately it is very broken by modern standards: * it contains explicit symbol-version requirements against ''libdl.so.2'' (''readelf -V ./tribes2.dynamic'') * but it doesn't declare a dependency on ''libdl.so.2'' (''readelf -d ./tribes2.dynamic'') You can use patchelf to fix this: patchelf --add-needed libdl.so.2 ./tribes2.dynamic ===== Adventures in "undefined symbol" land - Part 1 ===== $ ./tribes2.dynamic ./tribes2.dynamic: symbol lookup error: ./tribes2.dynamic: undefined symbol: __ti9exception The missing function can be found in a //very// old ''libstdc++'' (from gcc-2.95), you can use ''libstdc++-3-libc6.2-2-2.10.0.so'' from [[https://www.improbability.net/loki/loki_compat_libs-1.5.tar.bz2|https://www.improbability.net/loki/]] ===== Adventures in "undefined symbol" land - Part 2 ===== Now that we have all the old libs required, you would think "OK let's run it!" and try: LD_PRELOAD="./libstdc++-3-libc6.2-2-2.10.0.so" ./tribes2.dynamic ./tribes2.dynamic: symbol lookup error: ./tribes2.dynamic: undefined symbol: SDL_GetGamma WTF ? In very early iterations of SDL 1.2, SDL_GetGamma was briefly implemented as a real, physically exported function in ''libSDL-1.2.so.0''. Later in the 1.2 lifecycle, the developers converted it into a macro wrapper for SDL_GetGammaRamp. ''sdl12-compat'' (the current SDL-1.2 that you are currently running) doesn't have this function. The solution I choose is simple: I created another [[https://github.com/twolife/tribes2-linux-sdl|shim library]]. Now we can start the game: LD_PRELOAD="./libstdc++-3-libc6.2-2-2.10.0.so:./tribes2shim.so" ./tribes2.dynamic -nologin