Building FlightGear - Debian: Difference between revisions

2nd review
(1st review for FG 2.6.0)
(2nd review)
Line 1: Line 1:
[[File:Zeichen_101_icon.png|42px]] Article is under construction though only minor details are missing, it should work in ''most'' cases.
[[User:Flughund|Flughund]] 21:02, 28 February 2012 (EST)
----
HowTo build FlightGear [[Changelog_2.6.0|2.6.0]] or bleeding edge development version, hereinafter simply called ''[[GIT]]'', on GNU/Linux [http://www.debian.org/ Debian] '''Stable''' 6.x (Squeeze) and '''Testing''' (Wheezy).
HowTo build FlightGear [[Changelog_2.6.0|2.6.0]] or bleeding edge development version, hereinafter simply called ''[[GIT]]'', on GNU/Linux [http://www.debian.org/ Debian] '''Stable''' 6.x (Squeeze) and '''Testing''' (Wheezy).


Line 13: Line 7:


== Requirements and Preparations ==
== Requirements and Preparations ==
You need an [[OpenGL]] capable graphics card including a proper installed driver supporting direct rendering.<br />
You need more than just an [[OpenGL]] capable graphics card including a proper installed driver supporting direct rendering.<br />
Also a bunch of packages (as well as some of their dependencies) are required to compile FlightGear:
Also a bunch of packages (as well as some of their dependencies) are required to compile FlightGear:


; Tools
; Tools
  su -c "apt-get install automake bzip2 cmake g++ gcc git make subversion tar"
  su -c "apt-get install automake bzip2 cmake fluid g++ gcc git make \
  subversion tar"
: cmake: At least version 2.6.0-5 required!
: cmake: At least version 2.6.0-5 required!
: fluid: needed for [[FlightGear_Admin_Wizard|fgadmin]] only.


; Libs
; Libs
  su -c "apt-get install libc6-dev libgl1-mesa-dev freeglut3-dev libalut-dev \
  su -c "apt-get install libalut-dev libboost1.42-dev libc6-dev \
    libboost1.42-dev libsvn-dev libxml2-dev libcurl4-openssl-dev libgtkglext1-dev \
  libcurl4-openssl-dev libfltk1.1-dev libgl1-mesa-dev freeglut3-dev \
    libopenal-dev libpng12-dev librsvg2-dev libtiff4-dev libfltk1.1-dev"
  libgtkglext1-dev libopenal-dev libpng12-dev librsvg2-dev libsvn-dev \
  libtiff4-dev libxml2-dev"
: libfltk1.1-dev: needed for fgadmin only.
: Add libudev-dev if you need FG's feature <code>-DEVENT_INPUT=ON</code>.
: [[File:Zeichen_144_icon.png|21px]]During installation packages simgear-dev and openscenegraph-dev ''must not'' be installed. They can safely be re-installed after compilation.
: If you prefer you might replace libcurl4-openssl-dev by libcurl4-gnutls-dev.
: If you prefer you might replace libcurl4-openssl-dev by libcurl4-gnutls-dev.
<!--
<!--
osg: libxml2-dev libcurl4-gnutls-dev/libcurl4-openssl-dev libgtkglext1-dev libopenal-dev libpng12-dev librsvg2-dev libtiff4-dev  
osg: libxml2-dev libcurl4-gnutls-dev/libcurl4-openssl-dev libgtkglext1-dev libopenal-dev libpng12-dev librsvg2-dev libtiff4-dev
sg: libalut-dev libboost1.42-dev libsvn-dev
sg: libalut-dev libboost1.42-dev libsvn-dev
fg: freeglut3-dev (libfltk1.1-dev, option für fgadmin; udev?)
fg: freeglut3-dev (libfltk1.1-dev fluid) (libudev-dev)
-->
-->
: [[File:Zeichen_144_icon.png|21px]]During installation packages ''simgear-dev'' and ''openscenegraph-dev'' must not be installed. They can safely be re-installed after compilation.




Line 37: Line 35:
Because we are going to install versions different to the ones in the repositories, it is recommended to install FlightGear in a place independent of the base system, such as <code>/usr/local/FG-2.6.0</code> or <code>$HOME/FG-2.6.0</code>. This way also has the advantage of easily managing several FlightGear versions, even with different versions of OpenSceneGraph and/or plib. I suggest to make this directory writeable by the user so there is no need to become root for the <code>make install</code> commands. We'll use <code>$prefix</code> as a placeholder for this directory. <br />
Because we are going to install versions different to the ones in the repositories, it is recommended to install FlightGear in a place independent of the base system, such as <code>/usr/local/FG-2.6.0</code> or <code>$HOME/FG-2.6.0</code>. This way also has the advantage of easily managing several FlightGear versions, even with different versions of OpenSceneGraph and/or plib. I suggest to make this directory writeable by the user so there is no need to become root for the <code>make install</code> commands. We'll use <code>$prefix</code> as a placeholder for this directory. <br />
Another placeholder will be <code>$srcdir</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So, in the following instructions, you have to replace these with the local paths or even <code>export</code> them during the process:
Another placeholder will be <code>$srcdir</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So, in the following instructions, you have to replace these with the local paths or even <code>export</code> them during the process:
  export prefix=$HOME/FG-2.6.0; mkdir $prefix
  export prefix=$HOME/FG-2.6.0 && mkdir $prefix
  export srcdir=$HOME/src; mkdir $srcdir
  export srcdir=$HOME/src && mkdir $srcdir


Have in mind that the data is a relatively large download (GIT about 4.4 GB and 2.6.0 540 MB). So, to save some time, it is a good idea to fetch it while building the sources.
Have in mind that the data is a relatively large download (GIT about 4.4 GB and 2.6.0 540 MB). So, to save some time, it is a good idea to [[#FlightGear data|fetch]] it while building the sources.


For some basic info on git commands for FlightGear users we have a [[Git#For dummies|git for dummies]] section.
For some basic info on git commands for FlightGear users we have a [[Git#For dummies|git for dummies]] section.
Line 46: Line 44:


=== libopenal ===
=== libopenal ===
<!-- To be removed in summer 2012 -->
<u>Lenny only!</u> The libopenal-dev package in Lenny is too old for [[fgcom]]. For FlightGear it does work but not all features (like doppler) are available, so installing an up to date version is recommended anyway.
<u>Lenny only!</u> The libopenal-dev package in Lenny is too old for [[fgcom]]. For FlightGear it does work but not all features (like doppler) are available, so installing an up to date version is recommended anyway.
  cd $srcdir
  cd $srcdir
Line 126: Line 125:
Have in mind that <code>fgfs</code> need to find our self compiled libraries and therefore we have to tell the linker (ld) where to find them. That is what the first line here does. You might want to add this line to your <code>$HOME/.bashrc</code> to have this as a persistent setting.
Have in mind that <code>fgfs</code> need to find our self compiled libraries and therefore we have to tell the linker (ld) where to find them. That is what the first line here does. You might want to add this line to your <code>$HOME/.bashrc</code> to have this as a persistent setting.


To avoid the need to give the path to the <code>fgfs</code> command in the second line, you might consider to create a symlink to place that is listed in $PATH:
To avoid the need to give the path to the <code>fgfs</code> command in the second line, you might consider to create a symlink to a place that is listed in $PATH:
  ln -s $HOME/FG-2.6.0/bin/fgfs $HOME/bin/fgfs
  ln -s $prefix/bin/fgfs $HOME/bin/fgfs


For the future, if you want to start FlightGear from command line have a look at [[fgfsrc]], if you prefer a graphical user interface continue with [[#fgrun|compiling fgrun]] or check [[FGo!]].  
For the future, if you want to start FlightGear from command line have a look at [[fgfsrc]], if you prefer a graphical user interface continue with [[#fgrun|compiling fgrun]] or check [[FGo!]].  
392

edits