Building Flightgear - Ubuntu

From FlightGear wiki
Revision as of 20:09, 13 April 2020 by Puchacz (talk | contribs) (Initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


A "Minimal Install" of Ubuntu 20.04 (64 bits) is needed.


All the commands are run in bash as normal user (not root). The user need sudo access to install packages.

The following packages need to be install on the the system before starting the build of FlightGear. The packages can be install using the apt command:

sudo apt install libplib-dev libopenscenegraph-dev cmake g++ libboost1.71-all-dev libopenal-dev freeglut3-dev libglew-dev \
   libcurl4-openssl-dev libudev-dev libpng-dev libfreetype-dev qtdeclarative5-dev libqt5svg5-dev qttools5-dev


The following environment variables must be set because they will be used in shell commands:

  • NR_JOBS: Number of jobs for parallel compilation. For example: NR_JOBS=$(/usr/bin/nproc).
  • FGFS_PREFIX: Prefix of the Flightgear installation. For example: FGFS_PREFIX=${HOME}/Flightgear. All the source code must be located under the directory ${FGFS_PREFIX}/src and the installation will be done under the directory ${FGFS_PREFIX} as ${FGFS_PREFIX}/bin, ${FGFS_PREFIX}/include, ${FGFS_PREFIX}/lib,...
  • FGFS_PREFIX_LIB=${FGFS_PREFIX}/lib in the specific case of Ubuntu.