Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Building FlightGear - Debian

From FlightGear wiki
Revision as of 17:09, 16 May 2009 by Flughund (Talk | contribs)

Jump to: navigation, search

HowTo build on Debian checklist

HowTo build FG-CVS (and also 1.9.1) on Etch and Lenny.

Eine deutsche Version dieses HowTos findet man im http://wiki.debianforum.de/FlightgearOnEtch.

If you don't want to make your hands dirty, have a look at this: http://wiki.flightgear.org/index.php/Scripted_Compilation_on_Linux_Debian/Ubuntu

Requirements and Preparations

You need an OpenGL capable graphics including a proper installed driver.

Also a bunch of packages (and some of their dependencies) are required:

  • gcc, g++, make, automake1.9
  • mawk (or gawk)
  • cmake min. version 2.6.0-5, for Etch available on backports.org!
  • cvs, subversion
  • freeglut3-dev, libgl1-mesa-dev, libxrandr-dev
  • libxi-dev, libxmu-dev, libxext-dev
  • libopenal-dev, libalut-dev
  • libjpeg62-dev, libtiff4-dev, zlib1g-dev
  • libboost1.35-dev for Etch available on backports.org!

During installation packages simgear-dev and openscenegraph-dev must not be installed. They can safely be re-installed after compilation.

Add backports.org repository

(only needed on Etch)

hardcore: add this line to /etc/apt/sources.list:

deb http://ftp.de.debian.org/backports.org/ etch-backports main contrib


Binaries (deb)
Address:       http://ftp.de.debian.org/backports.org/
Distribution:  etch-backports
Section(s):    main contrib

More mirrors can be found on: http://www.backports.org/debian/README.mirrors.html

Fetch the Sources

No need to fetch it by CVS because there was no update for a long time...

For CVS one may use the latest developer release (for FG 1.9.1 OSG 2.7.8 is known to work):
or fetch it via SVN:

svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph

1.9.1: ftp://ftp.simgear.org/pub/simgear/Source/SimGear-1.9.1.tar.gz
or CVS:

cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
#CVS passwd: guest
cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source

FlightGear source
1.9.1: http://www.very-clever.com/download/flightgear/Source/
or CVS:

cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
#CVS passwd: guest
cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source

FlightGear data
1.9.1: http://www.very-clever.com/download/flightgear/Shared/FlightGear-data-1.9.0.tar.bz2
or CVS:

cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data

While data (CVS: ~ 2 GB / 1.9.1: 230 MB) gets downloaded we have plenty of time to...

Build and install

Because we are going to install versions different to the ones in the repositries it is hardly recommended to install FG-CVS in a place independet to the base system such as /usr/local/fg-cvs, /opt/fg-cvs or in a subdirectory of your $HOME. I suggest to make this directory writeable by the user that there is no need to become root for the 'make install' commands. I'll use $prefix as a placeholder for this, so in the following instructions one have to replace it by the local path.

Subsequent the commands to build each source. Execute them in the according source directory, except for OSG.


./configure --prefix=$prefix
make install

Here you'll encounter another placeholder $osgsrcdir which has to be replaced by path of the OSG source directory. This is because cmake demands a build directory separate to its source directory. So 'mkdir' one and 'cd' into it.

   -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $osgsrcdir
make install


./configure --prefix=$prefix --with-jpeg-factory
make install


./configure --prefix=$prefix
make install

Trial run:

$prefix/bin/fgfs --fg-root=/path/to/data


To build fgrun some more packages are required:

  • libfltk1.1-dev
  • fluid

Fetch the source:

svn co http://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun

Build it:
$prefix like above

./configure --prefix=$prefix
make install