Building FlightGear - Debian: Difference between revisions

Jump to navigation Jump to search
Update to TerraGear and minor changes throughout the article
(cosmetics and typos)
(Update to TerraGear and minor changes throughout the article)
Line 5: Line 5:
If you don't want to get your hands dirty, have a look at [[Scripted Compilation on Linux Debian/Ubuntu]].
If you don't want to get your hands dirty, have a look at [[Scripted Compilation on Linux Debian/Ubuntu]].


[[File:Zeichen_144_icon.png|21px]] For beginners with compiling it is highly recommended to follow this guide step by step. Any modification to the commands may cause trouble.
[[File:Zeichen_144_icon.png|21px]] For beginners with compiling it is highly recommended to follow this guide step by step. Any modification to most of the here used commands may cause trouble.




Line 12: Line 12:


; Tools
; Tools
  su -c "apt-get install automake cmake g++ gcc git make subversion unzip"
  su -c "apt-get install automake cmake g++ gcc git make subversion"
: Additionally install "fluid" if you intend to use [[FlightGear_Admin_Wizard|fgadmin]].
: Additionally install "fluid" if you intend to use [[FlightGear_Admin_Wizard|fgadmin]].


Line 20: Line 20:
  su -c "apt-get install  \
  su -c "apt-get install  \
   freeglut3-dev  libboost-dev  libcurl4-openssl-dev  libgtkglext1-dev \
   freeglut3-dev  libboost-dev  libcurl4-openssl-dev  libgtkglext1-dev \
   libjpeg8-dev   libopenal-dev  librsvg2-dev          libsvn-dev \
   libjpeg62-dev libopenal-dev  librsvg2-dev          libsvn-dev \
   libxml2-dev    libxrandr-dev"
   libxml2-dev    libxrandr-dev"
: 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".
: If "libjpeg62-dev" breaks package dependencies, just install one of the other versions' -dev.
: Add "libudev-dev" if you need FG's feature <code>-D EVENT_INPUT=ON</code>.
: Add "libudev-dev" if you need FG's feature <code>-D EVENT_INPUT=ON</code>.
: [[File:Zeichen_144_icon.png|21px]] During installation development packages of libraries which are going to be compiled ''must not'' be installed. They can safely be re-installed after compilation. Namely here these might be "libplib-dev", "libfltk1.1-dev", "libopenscenegraph-dev" and "simgear-dev".
: [[File:Zeichen_144_icon.png|21px]] During installation development packages of libraries which are going to be compiled ''must not'' be installed. They can safely be re-installed after compilation. Namely here these might be "libplib-dev", "libfltk1.1-dev", "libopenscenegraph-dev" and "simgear-dev".
Line 133: Line 134:
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!]]-->.  


{{WIP|Revise due to update to FG 2.10}}


== Optional Software ==
== Optional Software ==
Line 178: Line 177:


<u>2.10.0</u> and <u>GIT</u>:
<u>2.10.0</u> and <u>GIT</u>:
  mkdir $srcdir/fgrun-build; cd $srcdir/fgrun-build
  mkdir $srcdir/build-fgrun; cd $srcdir/build-fgrun
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/fgrun
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/fgrun
  make -j2 install
  make -j2 install
Line 203: Line 202:
=== [[TerraGear]] ===
=== [[TerraGear]] ===
==== Automatic Installation ====
==== Automatic Installation ====
[[BuildingTerraGear_in_Ubuntu_910_(32-_or_64-bit)#Automatic Installation|link]]
If you are familiar with "download_and_compile.sh" script from Brisa you can donwload this script: http://clemaez.fr/flightgear/terragear_download_and_compile.sh
If you are familiar with "download_and_compile.sh" script from Brisa you can donwload this script: http://clemaez.fr/flightgear/terragear_download_and_compile.sh
This script is similar to Brisa's one (only usable for Debian/Ubuntu/Mint...). This script installs TerraGear (latest version) and terragear-gui.
This script is similar to Brisa's one (only usable for Debian/Mint/Ubuntu). This script installs TerraGear (latest version) and terragear-gui.


; ''How to use it?''
; ''How to use it?''
  sh terragear_download_and_compile.sh -j 2 ALL
  sh terragear_download_and_compile.sh -j 2 ALL
-j 2 option is for Dual Core, you can tune it as you want. (personnaly I have Quad Core and I use -j 12 but I need to accept to don't use my aircraft during compilation ;) )


; ''Need some help?''
; ''Need some help?''
Line 218: Line 216:


==== Basic Installation ====
==== Basic Installation ====
To resolve some of the dependencies of [[TerraGear]] the GIT sections of steps [[#plib|plib]], [[#OpenSceneGraph|OpenSceneGraph]] and [[#SimGear|SimGear]] have to be done first. Additionally some packages and their dependencies have to be installed:
To resolve some of the dependencies of TerraGear the <u>GIT</u> sections of steps [[#plib|plib]], [[#OpenSceneGraph|OpenSceneGraph]] and [[#SimGear|SimGear]] have to be done first. Additionally some packages and their dependencies have to be installed:
* libgdal1-dev, gdal-bin
su -c "apt-get install \
* libproj-dev, libogdi3.2-dev (probably even more, please [http://wiki.flightgear.org/index.php?title=Talk:Building_FlightGear_-_Debian&action=edit&redlink=1 report]!)
  libgdal-dev libtiff4-dev libboost-signals-dev libboost-system-dev libboost-thread-dev"
<u>Wheezy</u>: As of June 2nd there is a bug ([http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617240 #617240]) in package libmysqlclient16 which causes compilation to fail. If it is not fixed by the time you're building TerraGear, upgrade to the version from Sid.


<u>Squeeze</u> users have to compile the CGAL dependency.
On <u>Wheezy</u> just install package "libcgal-dev" instead.
  cd $srcdir
  cd $srcdir
  git clone git://mapserver.flightgear.org/terragear-cs
  wget https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2
 
tar xjf CGAL-4.0.2.tar.bz2
Two of the dependencies have to be installed manually (See [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README.gpc;h=226e185b1ce1d1578006b48bb426e35848cce93b;hb=HEAD README.gpc] and [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README.newmat;h=95570b6b279d3d00bd7664cd4f00d6c4802aed1b;hb=HEAD README.newmat] for details.):
mkdir $srcdir/build-cgal; cd $srcdir/build-cgal
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/CGAL-4.0.2
make -j2 install


<!--
  # gpc install
  # gpc install
  mkdir $srcdir/gpc232 && cd $srcdir/gpc232
  mkdir $srcdir/gpc232 && cd $srcdir/gpc232
Line 237: Line 239:
  sed "s|/usr/local/include|$prefix/include|" -i Makefile
  sed "s|/usr/local/include|$prefix/include|" -i Makefile
  make -j2 install
  make -j2 install
 
  # newmat install
  # newmat install
  mkdir $srcdir/newmat11 && cd $srcdir/newmat11
  mkdir $srcdir/newmat11 && cd $srcdir/newmat11
Line 246: Line 248:
  mkdir $prefix/include/newmat
  mkdir $prefix/include/newmat
  cp *.h $prefix/include/newmat
  cp *.h $prefix/include/newmat
 
-->
Finally TerraGear itself (See [http://mapserver.flightgear.org/git/?p=terragear-cs;a=blob;f=README;h=7dae654283ca0b1447aeb3aa398287219f4b57df;hb=HEAD README] for details.):
Compile TerraGear:
  cd $srcdir/terragear-cs
cd $srcdir
./autogen.sh
git clone git://git.gitorious.org/fg/terragear.git
  ./configure --prefix=$prefix
  mkdir $srcdir/build-tg; cd $srcdir/build-tg
sed s/-O2// -i src/Lib/TriangleJRS/Makefile
  cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/terragear
  make -j2 install
  make -j2 install


392

edits

Navigation menu