Compiling Sources under Linux

From Rigs of Rods Wiki

Jump to:navigation, search

Tip: Shell scripts for automatic building

If you just want to install RoR without much hassle then have a look at these shell scripts, they bundle all necessary steps:


1. Getting the required build dependencies

1.1 Installing required packages usually found in repositories

sudo apt-get update
sudo apt-get -q install build-essential git cmake pkg-config libboost-all-dev mercurial \
libfreetype6-dev libfreeimage-dev libzzip-dev libois-dev \
libgl1-mesa-dev libglu1-mesa-dev nvidia-cg-toolkit libopenal-dev  \
libx11-dev libxt-dev libxaw7-dev libxrandr-dev \
libssl-dev libcurl4-openssl-dev libgtk2.0-dev libwxgtk3.0-dev \
libasound2-dev libpulse-dev wget
mkdir /etc/portage
echo "media-libs/freeimage ~x86" >> /etc/portage/package.keywords
echo "media-libs/freeimage" >> /etc/portage/package.unmask
emerge -av cmake devil boost nvidia-cg-toolkit subversion wxGTK freeimage zziplib
eselect wxwidgets set 1

1.2. Compiling and installing missing packages

You have to install all software which is not available in your distributions' repository by hand. See Compiling 3rd party libraries. This is necessary to fulfill the required dependencies.

Please note: OGRE shipped with some distributions does not have support for Cg enabled which is needed for Rigs of Rods (otherwise shaders will be missing, e.g. completely white cars) which is why you should compile it yourself.

2. Downloading the source code

Download the source code:

git clone
cd rigs-of-rods

3. Configuring the source code

There are two different ways to configure your RoR build, either via Command Line Interface (aka CLI) or via GUI interface. CLI is the most straight forward. If you are only interested in compiling standard RoR, this is the recommended method.




The cmake GUI might not be provided on all in systems.
To start the cmake gui run:

cmake-gui .
  • click "Configure"
  • select "Unix Makefiles" and "Use default native compilers" (that are the default options) and press "Finish"
  • click "Configure" again until all list entries are white
  • look at the log window for information and errors (look for red lines with " > " in front)
  • enable the components you want to compile in: ROR_*
  • click "Configure" again until the "Generate" button is click-able
  • click "Generate"
  • close cmake-gui

4. Building the source code

To start building simply run:


Note: For those not familiar with make you can add a -jx flag where x is the number of simultaneous build jobs you want (basic rule: one job per cpu core) to make use of multiple cores to speed up the building process.

Updating existing sources

If you already got the sources and just want to update, follow the steps below:

cd rigs-of-rods
git pull
rm -f CMakeCache.txt
rm -rf CmakeFiles/
cmake-gui .

If you are done compiling you may want to continue to read Starting RoR under Linux