Skip to content

Linux Build Instructions

Melvyn edited this page May 8, 2022 · 29 revisions

Building has been successful on Ubuntu/Debian and Arch/Arch-based distros - buildtime dependencies are listed below for both. Note a successful compilation doesn't mean it will run (may be due to missing runtime dependencies, or a distro quirk (Linux Mint). Fedora/RPM and Gentoo/Portage based dependencies will be added soon. Note that building requires some knowledge of the build process in general. If you aren't comfortable building, wait for precompiled binaries like the Windows version to be made.

Currently does not build on Fedora 32+ due to no lib32 packages. (no 32 bit support)

Dependencies (libraries must be i686/lib32):

  • make
  • GCC (or LLVM/clang)
  • automake
  • autoconf

Libraries:

  • libunwind
  • glibc
  • freetype2
  • fontconfig
  • libGL (should be provided by graphics drivers on all distros)
  • libX11
  • openal
  • libncurses
  • libcurl-gnutls
Easy Build Dependency Install For Arch Based Distros:

Make sure that the multilib repo is enabled.

sudo pacman -S --needed base-devel gcc binutils automake autoconf lib32-libunwind lib32-glibc lib32-freetype2 lib32-fontconfig lib32-mesa lib32-libx11 lib32-libglvnd lib32-openal lib32-ncurses lib32-libcurl-gnutls

Additionally, install lib32-gperftools and lib32-libedit from the AUR.

Easy Build Dependency Install For Debian Based Distros:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y autoconf automake build-essential g++-multilib libcurl4-gnutls-dev:i386 libedit-dev:i386 libfontconfig1-dev:i386 libfreetype-dev:i386 libgoogle-perftools-dev:i386 libncurses5:i386 libopenal-dev:i386 libsdl2-dev:i386 libunwind-dev:i386 libx11-dev:i386 mesa-common-dev:i386

Instructions:

  1. Make sure the path leading up to team-comtress-2 has no spaces in it. This will lead to errors compiling the third party libraries.
  2. Prepare for unforeseen consequences; crashes during compilation aren't common but should be expected. Make sure you're able to scroll back so you can grab error information, as it can keep spewing out info after the exact error.
  3. Run ./build.sh to compile. This can take any amount of time; it took 20 minutes on a Ryzen 5 1600. You can pass -l to build with clang (LLVM), -c number to change amount of cores used (defaults to max), -d or -dd to build with varying levels of debug, and -r to build with Steam Runtime (not working yet).
  4. To make sure it compiled correctly, run it again. If you see no errors, then it compiled. Success!
  5. Run ./link.sh to symlink your TF2 assets into the ../game folder.
  6. In the main repository directory, run ./run.sh to launch the game. If you have mangohud installed, this will also run with it.

Bug reports (crashes in game) are appreciated! Please send a full backtrace by running with LLDB and crashing - run.sh -d will launch lldb with the game. Once in LLDB at the terminal, enter r at the (lldb) prompt to run the game, then reproduce the crash. The game should freeze instead of quitting and in your terminal, LLDB should say what the error was, and be at another prompt. type bt to get a backtrace, and put it in an issue on HurricanePootis's fork with how you got there.

Also: Build time in seconds should be reported after build.sh is done the first time you run it (the first line should say real then a number). Reporting your successful build time with your hardware in an issue (if you need to make one) could also be helpful.

Troubleshooting

If you can't tell if compilation was successful, build with -c 1 so that error information is easier to retrieve (note it will be slow, so don't compile the whole source like this). Also, the build time should give a general indication if it worked or not.

If you get an error in compiling due to -lcurl-gnutls being missing, you need a symlink:

sudo ln -s /usr/lib32/libcurl-gnutls.so.4 /usr/lib32/libcurl-gnutls.so

This occurs on Arch/pacman based distros as far as we know.

If it exits cleanly after spewing info about OpenGL, this is a loading error which appears to be due to missing runtime dependencies/distro quirks (happens on Linux Mint).

Clone this wiki locally