User:EoD/Ubuntu GutsyGibbon
I've created this page to write a tutorial based on Ubuntu GutsyGibbon which is still in alpha stadium. Feel free to change/correct anything you want to. I'll probably copy and paste this page later and merge it with the main compile page.
Contents
Compiling in Linux
Each linux distribution will come with varying components already installed. Hopefully the notes below will help to identify what is required for your particular distribution.
Compiler
GCC 4.x is required. See this forum thread.
Bogus build errors
You may see errors during the build process like this:
Checking for fmod >= 3.75... no Checking fmod version >= 3.75... yes Checking for C header file fmod.h... yes Checking for FSOUND_GetVersion() in C library fmod-3.75... yes Checking for graphviz >= 0.15.0... no Checking for libdotneato >= 0.15.0... no Checking for C header file graphviz/render.h... yes Checking for begin_component() in C library dotgen... yes
These failed messages refer to scons not finding an installed package for these components. The subsequent successful checks show that despite there being no pkg-config ".pc" file, the required header and library files were successfully located.
Platform specifics (Ubuntu)
To build gigi or FreeOrion you first need to install the following packages using Synaptic (you will need to have the Universe repository included):
- python (should already be installed)
- scons
- libfreetype6 and libfreetype6-dev
- bcp
- libdevil1c2 and libdevil-dev
- libsdl1.2debian (should already be installed), libsdl1.2-dev
- graphviz and graphviz-dev
- libogre-dev and dependencies
- libois-dev and dependencies
- libopenal-dev and dependencies
- libalut-dev and dependencies
Ubuntu (GutsyGibbon)
You can install all of the packages (including dependencies) from the command line using this:
sudo apt-get install python scons libfreetype6-dev bcp libdevil-dev libsdl1.2-dev libsdl-mixer1.2-dev \ graphviz-dev liblog4cpp4 liblog4cpp4-dev libogre-dev libois-dev libopenal-dev
Ubuntu (FeistyFawn and EdgyEft)
You can install most of the packages (including dependencies) from the command line using this:
sudo apt-get install python scons libfreetype6-dev bcp libdevil-dev libsdl1.2-dev libsdl-mixer1.2-dev \ graphviz-dev liblog4cpp4 liblog4cpp4-dev libopenal-dev
Your boost, alut (libalut-dev) and ogre (libogre-dev) packages are outdated and you don't have an OIS package. There are the topics about the following packages in the forum:
Ubuntu (DapperDrake and before)
You can install most of the packages (including dependencies) from the command line using this:
sudo apt-get install python scons libfreetype6-dev bcp libdevil-dev libsdl1.2-dev libsdl-mixer1.2-dev \ graphviz-dev libopenal-dev
Your Ubuntu log4cpp package is too old so you will need to download the required version from the Debian archive (liblog4cpp4 and liblog4cpp4-dev) then install them:
sudo dpkg --install liblog4cpp4_0.3.5-rc3-1_i386.deb sudo dpkg --install liblog4cpp4-dev_0.3.5-rc3-1_i386.deb
Your boost, alut (libalut-dev) and ogre (libogre-dev) packages are outdated and you don't have an OIS package. Try to compile them yourself or upgrade to GutsyGibbon.
GiGi
Before attempting to build FreeOrion you will first need to build and install the gigi library.
The GiGi source should be automatically downloaded from SVN along with the FreeOrion source code. If not, it can be manually downloaded:
svn co https://gigi.svn.sourceforge.net/svnroot/gigi/trunk gigi
Change into the gigi directory and build the library:
cd FreeOrion/GG scons sudo scons install
Since gigi will be periodically updated, you should refresh the files occasionally to keep it up to date:
cd FreeOrion/GG svn update scons sudo scons install
FreeOrion
To build freeorion or rebuild after gigi or the freeorion source code has changed:
cd freeorion/FreeOrion scons
If SCons can't find a dependency (eg. boost) and you do have it, then you may need to configure the dependency directories before actually compiling. The command:
scons -h
lists the command-line options for SCons, including how to configure each dependency directories.
Clean After Dependency Changes
It has been reported that on Gentoo, it may be necessary to clean your old build before rebuilding GiGi or FreeOrion after updates that make changes to dependencies or versions of dependencies used, including as Boost. To do this:
scons --clean
Common Problem
Segmentation Fault
If after compiling everything, you run freeorion and get a segmentation fault:
$ ./freeorion Segmentation fault
You might be mixing dependencies compiled with different versions of GCC. See this forum post, this other forum post, this third post and this section of Harm's Debian User Story.
libGiGiSDL.so missing
After successfully compiling everything, you run freeorion and get the following error:
$ ./freeorion ./freeorion: error while loading shared libraries: libGiGiSDL.so: cannot open shared object file: No such file or directory
If you your problem is exactly the same as described in this post, just follow oneof the instructions in the following posts.
User stories
- Ubuntu 7.10 Gutsy Gibbon (September 10, 2007)
- Ubuntu 6.10 Edgy Eft (February 26, 2007)
- Ubuntu 5.04 Hoary Hedgehog (December 26, 2006)
- Gentoo (August 27, 2007)
- Debian (August 29, 2007)
- Fedora (June 5, 2006)