Build STK on Linux

m (Building SuperTuxKart)
(Building SuperTuxKart: correct instructions)
Line 37: Line 37:
cd cmake_build
cd cmake_build
cmake ..
cmake ..
cd ..
make VERBOSE=1 -j2
make VERBOSE=1 -j2

Revision as of 17:36, 13 April 2013

Note that these instructions apply to STK versions more recent that 0.8 alpha. If you want to compile an older version, please use the history feature of the wiki.

If you are a packager making a package for a Linux distribution, please do not try to modify our build system to use system versions of bullet and irrlicht. In both cases we use a specific and/or modified version of the library, and linking STK against the system library will only introduce bugs (corrupted graphics, memory leaks) into SuperTuxKart. Thanks

Installing dependencies

First of all, you will need a compiler and the autotools build system. When building the current SVN, you will also need cmake. Other dependencies you will need include openal, ogg, vorbis.

yum install gcc-c++ autoconf automake libogg-devel libvorbis-devel openal-soft-devel fribidi-devel subversion libcurl-devel cmake irrlicht-devel

sudo apt-get install autoconf automake build-essential cmake libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev

Building Irrlicht

This part is required only for STK 0.8, no longer required with STK SVN.

From the STK root source directory, start by compiling irrlicht. cd lib/irrlicht/source/Irrlicht/ NDEBUG=1 make -j2 cd -

(in this sample I configure make to use 2 cores. You can use more/less depending on your configuration). Note that these steps should be repeated whenever we update irrlicht.

Building SuperTuxKart

Then build SuperTuxKart using CMake

mkdir cmake_build cd cmake_build cmake .. make VERBOSE=1 -j2

(again in this sample I configure make to use 2 cores. You can use more/less depending on your configuration).

To make a debug build add -DCMAKE_BUILD_TYPE=Debug like this:

cmake .. -DCMAKE_BUILD_TYPE=Debug

Another option is to build the regular release version with its optimizations, but with debugging symbols still enabled. Replace the Debug with RelWithDebInfo for that.

And finally, to install (optional):

sudo make install

this will install in /usr/local. If you want to install somewhere else, replace the "cmake" command with something like:

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/stk

Retrieved from ""

User Tools