Build STK on Linux


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

Installing Irrlicht

Start by installing Irrlicht from your repositories, if it is found there. Otherwise check out How to Install Irrlicht from the Irrlicht wiki.

The SVN repository of irrlicht may be found at

Go in /source/Irrlicht inside that. Note that it's recommended to build Irrlicht in release mode for full performance (default is debug mode) NDEBUG=1 make

The build environment can use Irrlicht either from an installed package (e.g. in /usr/local), or directly from the source tree. CMake should automatically detect Irrlicht if it is installed in default directories (/usr, /usr/local). It is recommended not to install irrlicht to /usr or /usr/local if you build it from source. Just leave it in place, this will be cleaner. See below to help the build system find your Irrlicht.

If you have any problems with building irrlicht, please contact the irrlicht developers in their forum, since we most likely won't have the expertise to help with that.

Building SuperTuxKart

As of 0.7.3, you may use either CMake or autotools to build SuperTuxKart. In the current SVN, autotools isn't actively being maintained any more. As such, use of CMake is encouraged.


mkdir cmake_build cd cmake_build cmake .. make

or, if Irrlicht is not installed system-wide, replace the 'cmake' part with:

cmake .. -DIRRLICHT_DIR=/full/path/to/irrlicht

Note: if Irrlicht is installed system-wide, it may sometimes be necessary to also add -DIRRLICHT_INCLUDE_DIR and -DIRRLICHT_LIBRARY. This would then be set to the include directory in your Irrlicht directory, eg

cmake .. -DIRRLICHT_DIR=/full/path/to/irrlicht -DIRRLICHT_INCLUDE_DIR=/full/path/to/irrlicht/include -DIRRLICHT_LIBRARY=/full/path/to/irrlicht/lib/Linux/libIrrlicht.a

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 (optionally) to install:

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

Our CMake build system is younger so we welcome success/failure stories :)


Note: This method is not actively being maintained in the current SVN. While it will often still work, the use of cmake is strongly advised.

Simply use the usual autotools build triplet : ./configure make

and optionally

sudo make install

(if you obtained the STK source code from SVN, you will first need to run ./

If irrlicht is not installed system-wide, replace the './configure' part with :

./configure --with-irrlicht=/full/path/to/irrlicht


Depending on whether your irrlicht build uses internal or external libpng/libjpeg dependencies, you may need to configure STK this way :

./configure LDFLAGS="-lpng -ljpeg -lbz2"

Retrieved from ""

User Tools