50
edits
m (Remove 2020.3 procedures) |
(Update for the current gitlab repositories and the current 2024.1 release) |
||
| Line 5: | Line 5: | ||
Here are the packages needed to build and use SimGear and FlightGear on Fedora along with some examples of build scenarios for reference. | Here are the packages needed to build and use SimGear and FlightGear on Fedora along with some examples of build scenarios for reference. | ||
== Simply Use the Current Release == | == Simply Use the Current Release == | ||
If one wishes to simply use FlightGear in its current supported form without re-compiling, the Fedora FlightGear packages are fine. To use simply download the Fedora FlightGear packages. It is not necessary to load these packages in order to compile and install your own versions from source, but it also is compatible with and does not prevent development work if they are installed. | If one wishes to simply use FlightGear in its current supported form without re-compiling, the Fedora FlightGear packages are fine. | ||
As of march 2025, the fedora 41 repository provides the current release 2024.1.1. To use simply download the Fedora FlightGear packages. It is not necessary to load these packages in order to compile and install your own versions from source, but it also is compatible with and does not prevent development work if they are installed. | |||
sudo dnf -y install FlightGear | sudo dnf -y install FlightGear | ||
sudo dnf -y install FlightGear-data | sudo dnf -y install FlightGear-data | ||
| Line 11: | Line 13: | ||
This installs FlightGear commands such as <tt>fgfs</tt> in /usr/bin and FlightGear's data, <tt>fgdata</tt>, in /usr/share/flightgear. | This installs FlightGear commands such as <tt>fgfs</tt> in /usr/bin and FlightGear's data, <tt>fgdata</tt>, in /usr/share/flightgear. | ||
== Building FlightGear == | ==Building FlightGear== | ||
If, however, one wishes to build various versions from source, several development packages are required. | If, however, one wishes to build various versions from source, several development packages are required. | ||
=== Required Packages === | |||
Different packages may be needed for different versions of FlightGear. Also the FlightGear distribution contains several other commands in ''flightgear/utils'' that may require additional packages. | |||
===Required Packages === | |||
These required packages are needed in addition to the basic configuration provided by a Fedora 41 Workstation initial installation. | |||
=====Required packages for the current 2024.1 release===== | |||
sudo dnf -y install cmake | sudo dnf -y install cmake | ||
sudo dnf -y install gcc-c++ | sudo dnf -y install gcc-c++ | ||
| Line 24: | Line 31: | ||
sudo dnf -y install freeglut-devel | sudo dnf -y install freeglut-devel | ||
== Build Examples == | =====Required packages for the development 2024.2 release===== | ||
2024.2 uses an updated version of OpenSceneGraph. If the Fedora-provided OpenSceneGraph-devel has been loaded, there is no conflict as we will tell the build system which to use. | |||
sudo dnf -y install mesa-libGL mesa-libGL-devel | |||
sudo dnf -y install mesa-libGLU mesa-libGLU-devel | |||
sudo dnf -y install glfw glfw-devel freeglut freeglut-devel | |||
sudo dnf -y install freetype freetype-devel | |||
sudo dnf -y install gdal | |||
And 2024.2 wants, but does not specifically require Qt5 | |||
sudo dnf -y install qt5-qtbase-devel | |||
sudo dnf -y install qt5-qtdeclarative-devel | |||
sudo dnf -y install qt5-qtsvg-devel | |||
sudo dnf -y install qt5-linguist | |||
==Build Examples== | |||
The required development packages listed above are sufficient for building SimGear, FlightGear, loading fgdata and installing a running flight simulator. FlightGear has several additional packages that may require additional development packages. using cmake and following its errors make it fairly straight forward to find and install additional packages for these additional FlighhtGear components. | The required development packages listed above are sufficient for building SimGear, FlightGear, loading fgdata and installing a running flight simulator. FlightGear has several additional packages that may require additional development packages. using cmake and following its errors make it fairly straight forward to find and install additional packages for these additional FlighhtGear components. | ||
| Line 30: | Line 50: | ||
Note that one shell variable is used in these examples to control the number of parallel processes allowed by make. Using this parallelism speed up the compilation process. Place this in your $HOME/.bashrc. | Note that one shell variable is used in these examples to control the number of parallel processes allowed by make. Using this parallelism speed up the compilation process. Place this in your $HOME/.bashrc. | ||
export | export nproc=`/usr/bin/nproc` | ||
Three main versions are described. | Three main versions are described. | ||
| Line 45: | Line 65: | ||
mkdir $HOME/fg2024.1 | mkdir $HOME/fg2024.1 | ||
cd $HOME/fg2024.1 | cd $HOME/fg2024.1 | ||
Two methods exist to get the required source code. Tar archives or the FlightGear git repository. | |||
====Use .tar files==== | |||
The FlightGear web page Download section https://www.flightgear.org/download/ provides access to the tar files. | |||
These tar files unpack into directories named simgear-v2024.1.1, flightgear-v2024.1.1, and fgdata_2024_1. | |||
These directories can be named anything you wish as long as the names are used consistently. Here I will rename the extracted directory names to be consistent throughout all the following examples. | |||
tar xzf simgear-v2024.1.1.tar.gz | |||
mv simgear-v2024.1.1 simgear | |||
tar xzf flightgear-v2024.1.1.tar.gz | |||
mv flightgear-v2024.1.1 flightgear | |||
tar xJf FlightGear-2024.1.1-data.txz | |||
mv fgdata_2024_1 fgdata | |||
====Use the git repository==== | |||
If you are going to compile and build your own version of FlightGear, possibly fixing a personal bug or adding a feature, please consider joining the community of developers and contributing. To start, it is best to use the gitlab repositories rather than tar files so that you might contributr inthe future. | |||
For 2024.1, we clone a single branch of the repository to have a similar configuration as with the tar files. | |||
git clone --single-branch --branch release/2024.1 https://git.code.sf.net/p/flightgear/simgear simgear | git clone --single-branch --branch release/2024.1 https://git.code.sf.net/p/flightgear/simgear simgear | ||
git clone --single-branch --branch release/2024.1 https://git.code.sf.net/p/flightgear/flightgear flightgear | git clone --single-branch --branch release/2024.1 https://git.code.sf.net/p/flightgear/flightgear flightgear | ||
git clone --single-branch --branch release/2024.1 git://git.code.sf.net/p/flightgear/fgdata fgdata | git clone --single-branch --branch release/2024.1 git://git.code.sf.net/p/flightgear/fgdata fgdata | ||
=====Building 2024.1===== | |||
Once the code is loaded we can build. The general technique is to make a separate empty build directory, use cmake to configure and then compile and link. This avoids cluttering up the source directories with build files. Also, you can have several different configurations with the same source: fgbuild-release, fgbuild-debug, fgbuild-test, etc. | |||
mkdir fgbuild | mkdir fgbuild | ||
mkdir sgbuild | mkdir sgbuild | ||
| Line 54: | Line 96: | ||
cd $HOME/fg2024.1/sgbuild | cd $HOME/fg2024.1/sgbuild | ||
cmake ../simgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.1/install -DCMAKE_BUILD_TYPE=Release | cmake ../simgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.1/install -DCMAKE_BUILD_TYPE=Release | ||
make -j$ | make -j$(nproc) | ||
make install | make install | ||
cd $HOME/fg2024.1/fgbuild | cd $HOME/fg2024.1/fgbuild | ||
cmake ../flightgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.1/install -DCMAKE_BUILD_TYPE=Release | cmake ../flightgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.1/install -DCMAKE_BUILD_TYPE=Release | ||
make -j$ | make -j$(nproc) | ||
make install | make install | ||
FlightGear should now be installed in the local install directory. The fgdata files are automagically found in the local fgdata directory at the same level as the source directories. | |||
export PATH $HOME/fg2024.1/install/bin:$PATH | export PATH $HOME/fg2024.1/install/bin:$PATH | ||
===Next development version 2024.2=== | ===Next development version 2024.2=== | ||
This version is for development of new features beyond the frozen features in 2024.1. Join the FlightGear development team. Discuss changes with core developers on the developer mailing list. | This version is for development of new features beyond the frozen features in 2024.1. This is the version where new ideas are developed for a future release. Join the FlightGear development team. Discuss changes with core developers on the developer mailing list. Depending on the state of development, this version may have bugs, may not work, or even may not compile. | ||
Make sure that the required packages listed above beyond those needed for 2024.1 have been installed. | |||
The big addition is that this version uses a local build of the OpenSceneGraph package. So there is an additional build directory for OpenSceneGraph. | |||
Note also that we download the full Flightgear repository rather than a single branch as we did for 2024.1. This means that the full range of git commands such as switching branches are available. | |||
mkdir $HOME/fg2024.2 | mkdir $HOME/fg2024.2 | ||
cd $HOME/fg2024.2 | cd $HOME/fg2024.2 | ||
git clone https:// | |||
git clone https:// | git clone https://gitlab.com/flightgear/openscenegraph.git openscenegraph | ||
git clone | git clone https://gitlab.com/flightgear/simgear.git simgear | ||
git clone https://gitlab.com/flightgear/flightgear.git flightgear | |||
git clone https://gitlab.com/flightgear/fgdata.git fgdata | |||
mkdir osgbuild | |||
mkdir fgbuild | mkdir fgbuild | ||
mkdir sgbuild | mkdir sgbuild | ||
mkdir install | mkdir install | ||
Note that we tell simgear where to find the newly constructed OpenSceneGraph. If you also loaded the fedora distribution of OpenSceneGraph to support building 2024.1 above, there is no conflict as we explictly tell simgear where to look. | |||
cd $HOME/fg2024.2/osgbuild | |||
cmake ../openscenegraph -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.2/install -DCMAKE_BUILD_TYPE=Release | |||
make -j$(nproc) | |||
make install | |||
cd $HOME/fg2024.2/sgbuild | cd $HOME/fg2024.2/sgbuild | ||
cmake ../simgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.2/install -DCMAKE_BUILD_TYPE=Release | cmake ../simgear -D OSG_INCLUDE_DIR=$HOME/fg2024/install/include -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.2/install -DCMAKE_BUILD_TYPE=Release | ||
make -j$ | make -j$(nproc) | ||
make install | make install | ||
cd $HOME/fg2024.2/fgbuild | cd $HOME/fg2024.2/fgbuild | ||
cmake ../flightgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.2/install -DCMAKE_BUILD_TYPE=Release | cmake ../flightgear -DCMAKE_INSTALL_PREFIX=$HOME/fg2024.2/install -DCMAKE_BUILD_TYPE=Release | ||
make -j$ | make -j$(nproc) | ||
make install | make install | ||
export PATH $HOME/fg2024.2/install/bin:$PATH | export PATH $HOME/fg2024.2/install/bin:$PATH | ||
[[Category:Building from source]] | [[Category:Building from source]] | ||
edits