392
edits
m (Dependencies overhaul, clone fgdata before compiling FG) |
(Update for Devuan Daedalus / Debian Bookworm) |
||
Line 1: | Line 1: | ||
How-To build [[FlightGear]] on [https://devuan.org/ Devuan] GNU/Linux Stable (Daedalus). Instructions probably apply to [https://debian.org/ Debian] GNU/Linux Bookworm, too. | |||
The meaning of this article is to be a short, ''checklist'' like, overview of the specific steps to compile FlightGear and components on Devuan. For more detailed information please refer to the main article [[Building_FlightGear_-_Linux | Building FlightGear on Linux]]. | The meaning of this article is to be a short, ''checklist'' like, overview of the specific steps to compile FlightGear and components on Devuan. For more detailed information please refer to the main article [[Building_FlightGear_-_Linux | Building FlightGear on Linux]]. | ||
[[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 | [[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 herein used commands will cause trouble. | ||
Line 11: | Line 11: | ||
'''Tools''' | '''Tools''' | ||
su - -c "apt-get install cmake g++ | : On Devuan Chimaera (Debian Bullseye) packages <code>g++-9</code> and <code>gcc-9</code> are required additionally. To utilize these older versions apply environment variables to SimGear's and FlightGear's cmake commands like so: <code>CC=gcc-9 CXX=g++-9 cmake [...]</code>. | ||
su - -c "apt-get install cmake g++ gcc git make sed" | |||
'''Dependencies''' | '''Dependencies''' | ||
: If you prefer you might replace | : If you prefer you might replace <code>libcurl4-openssl-dev</code> by <code>libcurl4-gnutls-dev</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 these are libplib-dev and | : [[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 these are <code>libplib-dev</code> and <code>libsimgear-dev</code>. | ||
su - -c "apt-get install freeglut3-dev libboost-dev libcurl4-openssl-dev libdbus-1-dev | su - -c "apt-get install freeglut3-dev libboost-dev libcurl4-openssl-dev libdbus-1-dev libeudev-dev libevent-dev libfreetype6-dev libglew-dev liblzma-dev libopenal-dev libopenscenegraph-dev libqt5quick5 libqt5svg5-dev libxi-dev libxmu-dev pkg-config qtbase5-dev qtbase5-private-dev qtdeclarative5-dev qttools5-dev zlib1g-dev" | ||
== Build and install == | == Build and install == | ||
Some things require customisation. We'll use [http://www.cmiss.org/cmgui/wiki/SettingEnvironmentVariablesInBash environment variables] for them: <br /> | Some things require customisation. We'll use [http://www.cmiss.org/cmgui/wiki/SettingEnvironmentVariablesInBash environment variables] for them: <br /> | ||
: '''FG_VERSION''' | : '''FG_VERSION''' – The version of FlightGear to build and install. This is either <code>next</code> (for the bleeding edge development branch) or a release number in the form <code>release/2020.3</code>. For a list of valid releases see [https://sourceforge.net/p/flightgear/flightgear/ref/next/branches/ here]. <br /> | ||
: '''FG_SRC_DIR''' | : '''FG_SRC_DIR''' – The absolute path to the directory which is supposed to hold the source codes. In case your user belongs to the group ''staff'', <code>/usr/local/src/</code> would be an appropriate location. But any location is fine, too, e.g. <code>$HOME/src/</code>. In any case the user has to have write access there.<br /> | ||
: '''FG_INSTALL_DIR''' | : '''FG_INSTALL_DIR''' – The absolute path to where FlightGear is going to be installed. Again, <code>/usr/local/</code> is appropriate, if your user belongs to ''staff''. But any location where the user has write access is ok, e.g. <code>$HOME/FlightGear/</code>. <br /> | ||
# Examples, adapt to your own needs: | # Examples, adapt to your own needs: | ||
Line 57: | Line 51: | ||
sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h | sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h | ||
git commit --all --message "Increase tiny version to 6." | git commit --all --message "Increase tiny version to 6." | ||
mkdir $FG_SRC_DIR/build-plib && cd $FG_SRC_DIR/build-plib | mkdir -p $FG_SRC_DIR/build-plib && cd $FG_SRC_DIR/build-plib | ||
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/libplib.git | |||
make -j$(nproc) | make -j$(nproc) | ||
make install | make install | ||
Line 70: | Line 64: | ||
cd $FG_SRC_DIR | cd $FG_SRC_DIR | ||
<nowiki>git clone --branch OpenSceneGraph-3.4.1 git://github.com/openscenegraph/OpenSceneGraph.git OpenSceneGraph.git</nowiki> | <nowiki>git clone --branch OpenSceneGraph-3.4.1 git://github.com/openscenegraph/OpenSceneGraph.git OpenSceneGraph.git</nowiki> | ||
mkdir $FG_SRC_DIR/build-osg && cd $FG_SRC_DIR/build-osg | mkdir -p $FG_SRC_DIR/build-osg && cd $FG_SRC_DIR/build-osg | ||
cmake -D LIB_POSTFIX="" -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph.git | cmake -D LIB_POSTFIX="" -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph.git | ||
make -j$(nproc) | make -j$(nproc) | ||
Line 81: | Line 75: | ||
cd simgear.git | cd simgear.git | ||
git checkout $FG_VERSION | git checkout $FG_VERSION | ||
mkdir $FG_SRC_DIR/build-sg && cd $FG_SRC_DIR/build-sg | mkdir -p $FG_SRC_DIR/build-sg && cd $FG_SRC_DIR/build-sg | ||
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git | |||
make -j$(nproc) | make -j$(nproc) | ||
make install | make install | ||
Line 89: | Line 82: | ||
=== FlightGear data === | === [[FGData|FlightGear data]] === | ||
mkdir -p $FG_INSTALL_DIR/share && cd $FG_INSTALL_DIR/share | mkdir -p $FG_INSTALL_DIR/share && cd $FG_INSTALL_DIR/share | ||
<nowiki>git clone git://git.code.sf.net/p/flightgear/fgdata fgdata</nowiki> | <nowiki>git clone git://git.code.sf.net/p/flightgear/fgdata fgdata</nowiki> | ||
Line 101: | Line 94: | ||
cd flightgear.git | cd flightgear.git | ||
git checkout $FG_VERSION | git checkout $FG_VERSION | ||
mkdir $FG_SRC_DIR/build-fg && cd $FG_SRC_DIR/build-fg | mkdir -p $FG_SRC_DIR/build-fg && cd $FG_SRC_DIR/build-fg | ||
cmake -D CMAKE_BUILD_TYPE=Release -D FG_BUILD_TYPE=Release -D FG_DATA_DIR:PATH="$FG_INSTALL_DIR/share/fgdata" -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git | |||
make -j$(nproc) | make -j$(nproc) | ||
make install | make install |
edits