Ubuntu

From FlightGear wiki
Revision as of 18:09, 25 October 2013 by BotFlightGear (talk | contribs) (Update forum links)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.


Following steps walk through downloading the FlightGear source code, compile and run on Ubuntu 13.04 (x86_64)

Required Packages

Install the following packages and libraries to be able to compile FlightGear:

sudo apt-get install git subversion build-essential cmake cmake-curses-gui libpng12-dev libfreetype6-dev
libjpeg-dev libgif-dev libtiff5-dev libxmu-dev libxi-dev freeglut3-dev libalut-dev libxft-dev libxinerama-dev
libboost-dev libplib-dev libopenscenegraph-dev libsvn-dev libudev-dev libfontconfig1-dev

Download source

Create a fgsrc directory and get the source code with git:

mkdir ~/fgsrc 
cd ~/fgsrc
git clone git://gitorious.org/fg/simgear.git
git clone git://gitorious.org/fg/flightgear.git
git clone git://gitorious.org/fg/fgdata.git

Compile

Create directory to install FlightGear in and create environment variable:

export prefix=$HOME/FG-install && mkdir $prefix

Create a build directory for each package and run cmake from there:

SimGear:

cd ~/fgsrc
mkdir build-sg
cd build-sg 
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/fgsrc/simgear 
make -j2 install

FlightGear:

cd ~/fgsrc
mkdir build-fg
cd build-fg 
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/fgsrc/flightgear 
make -j2 install

Run

Link fgdata to the data directory in FG-install

cd $prefix
ln -s ~/fgsrc/fgdata data

Run executable:

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

Troubleshooting

Link error undefined reference to symbol 'dlopen@@GLIBC_2.2.5
Uninstall fltk 1.3 library
sudo apt-get remove libfltk1.3-dev
See the forum
Only-a-black-screen problem
If you are a nvidia user and only get a black screen at startup, you might suffer from Ubuntu bug 982485. Have a look at comment #24 for a possible workaround.