Compiling 3rd party libraries

From Rigs of Rods Wiki

Jump to:navigation, search


Summary

This is the first step needed for packaging RoR so it can be included in a Linux repository, since this will allow you to package and update each component of RoR individually. The motivation for writing this article is that some devs (including the initial author of this page) feel that dealing with the current cmake system is too cumbersome as the 3rd party library should rarely if ever be altered, and thus not included in the source tree.

Hopefully a script can released to automate the process of retrieving and compiling all these sources.

This Page assumes that you have already been able to compile RoR and have all the required supporting libraries already installed but are still compiling all the libraries included in SVN.

Versions

Libraries required for RoR:

  • AngelScript: SDK 2.22.1 (latest stable)
  • Caelum: version 0.6.1 at least
  • mygui: svn revision 4344 (specific SVN version)
  • mysocketw: latest, patched, see build instructions
  • ogre: 1.7.x or 1.8.x
  • OIS: 1.3 (any version >= 1.2 should work)
  • openal-soft-1.8.466 (older versions could work)
  • paged geometry-1.1.3 (latest stable)
  • wxWidgets >= 2.6 (older versions could work)

Notes:

  • replace the -j2 with the appropriate CPU core number (-j4 for quadcore, etc)
  • when using sudo, be prepared to enter your password. Sudo is used to install the compiled software most of the time.
  • on gentoo you need to change the installation prefix of all packages to /usr instead of the default /usr/local (EDIT: not really, see this page for more info. At that page, slightly different versions are reported to work, too)

Libraries

These sections are listed in the order they should be done. Ogre should be done first since several of the other libraries require that it is installed such as Caelum, MyGUI, and Paged Geometry

it is recommended to create a dependencies directory and work in that:

mkdir ~/ror-deps
cd ~/ror-deps


Freeimage

You will need freeimage for Ogre. Its not a direct Dependency of RoR. if your distribution does not have a package for freeimage, you have to compile it by hand:

wget http://sourceforge.net/projects/freeimage/files/Source%20Distribution/3.15.0/FreeImage3150.zip/download -O FreeImage3150.zip
unzip FreeImage3150.zip 
cd FreeImage
make -j3
sudo make install
cd ..

Ogre

Let's start off with Ogre since it is required by other libraries.

Ogre3D is the graphic engine RoR uses.

wget http://sourceforge.net/projects/ogre/files/ogre/1.8/1.8.0/ogre_src_v1-8-0.tar.bz2/download -O ogre_src_v1-8-0.tar.bz2
tar xjf ogre_src_*.bz2
cd ogre_src*
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DOGRE_BUILD_SAMPLES:BOOL=OFF .
make -j2
sudo make install
cd ..

DON'T FORGET THE " ." at the end of "...BOOL=OFF"

OIS

compile from hand (latest stable):

wget http://sourceforge.net/projects/wgois/files/Source%20Release/1.3/ois_v1-3.tar.gz/download -O ois_v1-3.tar.gz
tar xvfz ois_v1-3.tar.gz
cd ois-v1-3/
sh bootstrap
./configure
make -j2
sudo make install
cd ..

NOTE: you might need to replace

export WANT_AUTOMAKE='1.7'
export WANT_AUTOCONF='2.5'

with

#export WANT_AUTOMAKE='1.7'
#export WANT_AUTOCONF='2.5'

in bootstrap to get it working

compile from hand (latest SVN):

svn co https://wgois.svn.sourceforge.net/svnroot/wgois/ois/trunk/ ois-trunk
cd ois-trunk
bash bootstrap
./configure
make -j2
sudo make install
cd ..

note:

  • you might need to comment out "export WANT_AUTOMAKE='1.7'" to "#export WANT_AUTOMAKE='1.7'" in the file bootstrap

MyGUI

svn co https://my-gui.svn.sourceforge.net/svnroot/my-gui/trunk my-gui -r 4344
cd my-gui
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMYGUI_BUILD_SAMPLES:BOOL=OFF -DMYGUI_INSTALL_SAMPLES:BOOL=OFF -DMYGUI_BUILD_TOOLS:BOOL=OFF -DMYGUI_BUILD_PLUGINS:BOOL=OFF .
make -j2
sudo make install
cd ..

For Ubuntu 12.04 ppa is available: http://www.ubuntuupdates.org/package/getdeb_games/precise/games/getdeb/mygui

wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu precise-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'
sudo apt-get update
sudo apt-get install libmygui3 libmygui-dev

Paged Geometry

wget http://ogre-paged.googlecode.com/files/ogre-paged-1.1.3.tar.gz
tar xvfz ogre-paged-1.1.3.tar.gz
cd ogre-paged-1.1.3
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DPAGEDGEOMETRY_BUILD_SAMPLES:BOOL=OFF .
make -j2 --silent
sudo make install
cd ..
since there is no uninstall script run this to remove PagedGeometry
sudo rm /usr/local/lib/libPagedGeometry.so
sudo rm -rf /usr/local/include/Paged

There is also ppa available for the ogre-paged for ubuntu 12.04 http://pkgs.org/ubuntu-12.04/getdeb-games-i386/libogrepaging1.8_1.8.1-1~getdeb2_i386.deb.html

sudo apt-get install libogrepaging1.8

Caelum

hg clone https://caelum.googlecode.com/hg/ caelum 
cd caelum
cmake .
make -j8
sudo make install
cd ..
 
# important step, so the plugin can load:
cp /usr/local/lib/libCaelum.so /usr/local/lib/OGRE/
since there is no uninstall script run this to remove Caelum
sudo rm /usr/local/lib/libCaelum.a
sudo rm -rf /usr/local/include/Caelum


MySocketW

NOTE: You have to install the OpenSSL development package before you compile. In Ubuntu and Debian run
sudo apt-get install libssl-dev
, in CentOS run
yum install libssl-dev
.

This needs another patch Media:Socketw.patch to fix socketw for newer compilers

wget http://www.digitalfanatics.org/cal/socketw/files/SocketW031026.tar.gz -O SocketW031026.tar.gz
tar xzf SocketW031026.tar.gz
cd SocketW031026/
wget http://wiki.rigsofrods.com/images/c/c0/Socketw.patch -O Socketw.patch
patch -p0 -d src < Socketw.patch
rm Socketw.patch
make -j2 --silent shared
sudo make install
cd ..

since there is no uninstall script run this to remove SocketW

sudo rm /usr/local/lib/libSocketW*
sudo rm /usr/local/include/SocketW.h
sudo rm /usr/local/include/sw_*.h

LUA

LUA scripting support was removed from Rigs of Rods in revision 1899.
You only need to install this if you use an older Rigs of Rods revision.

You need version 5.1+ which is provided by Ubuntu 9.10 and 10.4

sudo apt-get install liblua5.1-0 liblua5.1-0-dev

AngelScript

mkdir angelscript
cd angelscript
wget http://www.angelcode.com/angelscript/sdk/files/angelscript_2.22.1.zip
unzip angelscript_*.zip
cd sdk/angelscript/projects/gnuc
SHARED=1 VERSION=2.22.1 make -j2 --silent
 
# sudo make install fails when making the symbolic link, this removes the existing versions
rm -f ../../lib/*
sudo SHARED=1 VERSION=2.22.1 make install
 
#cleanup files made by root
rm -f ../../lib/*
cd ../../../../../

OpenAL

The correct version of open al is provided by Ubuntu 9.10 and 10.4
sudo apt-get install libopenal1 libopenal-dev

wxWidgets

RoR needs only wxWidgets 2.6 at least. Most distributions should have this old version available. Its laos compatible with 2.8 and 2.9. --Tdev 13:03, 21 August 2011 (UTC)

Hydrax

If you get errors running the make command on e.g. Debian and Ubuntu, you might need to change the makefile. Uncomment the lines marked below:

wget http://modclub.rigsofrods.com/xavi/hydrax-0.5.2-ogre-17-patched.tar.bz2
tar xvfj hydrax*
cd hydrax-*
## Fix for errors running the make command: remove the # on the lines below up to the end
#cp makefile makefile.orig
#sed 's|PREFIX =/usr|PREFIX =/usr/local|g' makefile.orig > makefile
## end of fix
make -j2
sudo make install
cd ..

Compiling RoR

see Compiling_Sources_under_Linux


Verification of the instruction on this page

  • Ubuntu 12.04 64 bit --User:emgiezet 14:14, 9 Oct 2012 (GMT+1) - cannot install MyGUI, libois (OIS) is available from apt-get repo
  • Ubuntu 11.10 64 bit --User:Blackthorn 22:37, 01 June 2012 (GMT-7) plugins.cfg is in the wrong location, it can be found in /ror-trunk/tools/linux/binaries/ it should be in /ror-trunk/bin/
  • Ubuntu 10.4 32 bit --tdev 00:13, 24 June 2010 (UTC)
  • Ubuntu 10.10 64 bit --User:berserk9779 09:09 25 January 2011 (GMT-3)

All dependencies compile fine at the time of writing, but another issue prevents from me from running the game and properly test things out at this time.

All dependencies compiled fine, but RoR svn version 1603 had a broken selector/menu, but 0.37.126 from sourceforge worked.

  • Gentoo 64 bit (x86_64) no-multilib, 2.6.36-gentoo-r5
    • --Tdev 12:04, 19 March 2011 (UTC)
    • --Tdev 11:53, 13 February 2011 (UTC)
    • --Tdev 17:56, 25 March 2011 (UTC)
      • fixed caelum installation instructions: compiling from source now
    • note: on gentoo you need to fix the installation prefix of all packages from /usr/local to /usr/
  • Gentoo 32 bit 3.2.12-gentoo - more details at User:mudrd8mz
  • Linux Mint 10 (Ubuntu 10.10) 64 bit--User:KingBeetle 03:04 03 March 2011 (GMT-5)
    • Had to change install prefix in makefile for Hydrax from /usr to /usr/local
  • Debian Squeeze (Debian 6) 64 bit User:woozy 13 April 2011:
    • Also had to change install prefix in makefile for Hydrax from /usr to /usr/local. Edited the wiki to incorporate the change
  • Debian Squeeze (/etc/debian_version "6.0.3", amd64, x86_64 GNU/Linux)
    • User:beardy Sat Jan 28 18:42:15 CET 2012 Building instructions worked.

(please extend)



About Rigs of Rods

    Rigs of Rods is a unique soft body physics simulator.


Some Tools


Partners

SourceForge.net

Follow us

Twitter youtube Facebook RSS Feed


impressum