How to install Flightgear?

I’m trying to Install Flightgear using:

yay -S flightgear

but it’s failing at this point:

-- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
CMake Error at CMakeModules/BoostTestTargets.cmake:55 (message):
  NOTE: boost::test-based targets and tests cannot be added: boost >= 1.34.0
  required but not found.  (found: '1.71.0' want >=103400) You may disable
  ENABLE_TESTS to continue without the tests.
Call Stack (most recent call first):
  CMakeLists.txt:220 (include)

I’m fairly new to installing using an arch-based OS, but that seems to be suggesting I need boost higher than v1.34.0 and I have v1.71.0 So, what’s the problem?
Also, disabling “ENABLE_TESTS” would that work, and if so how do I tell it to do that.
Thanks

https://aur.archlinux.org/packages/flightgear

@Gomaya It looks like it’s wanting version 1.34? Did it just stop installing? Or is it just giving you a warning message?

NOTE: boost::test-based targets and tests cannot be added: boost >= 1.34.0
  required but not found.  (found: '1.71.0' want >=103400) You may disable
  ENABLE_TESTS to continue without the tests.

Yeah, just stops installing. After the error that I posted above, it stops with:

==> ERROR: A failure occurred in build().
    Aborting...
Error making: simgear-git

P.S.: So how would I disable this “ENABLE_TESTS” thing?

it is necessary to put “- nocheck” to avoid that it controls

@Gomaya I don’t know if this will help you but i just realized it’s old info so probably not. :anguished:

1 Like

@Gomaya Have you looked at this?

https://www.freshports.org/games/flightgear/

1 Like

you might try to install flightgear from flatpak. Arch removed flightgear probably cause of some depency get hardtime to build/rebuild…

1 Like

Flatpak and snap are the wrong answer here :slight_smile:

I was a previous maintainer of this package, even if I’m not credited in PKGBUILD.

https://aur.archlinux.org/cgit/aur.git/log/?h=flightgear

For every package, I will provide here a fixed and working PKGBUILD you’ll have to use. Just do a yay -G name-of-package and use these PKGBUILDs.

After this, a makepkg -si will do the magic!

PKGBUILD #1, simgear:

Simgear 2019.1.1 PKGBUILD
# Maintainer: Jake <aur@ja-ke.tech>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Hans Janssen <hans@janserv.xs4all.nl>

pkgname=simgear
pkgver=2019.1.1
_pkgver=${pkgver%.*}
pkgrel=1
pkgdesc="A set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications."
arch=(x86_64)
depends=('glu' 'glut' 'freealut' 'plib' 'openscenegraph34')
makedepends=('boost' 'cmake' 'mesa')
license=("GPL")
url="http://www.flightgear.org/"
options=('makeflags' 'staticlibs')
source=("https://downloads.sourceforge.net/project/flightgear/release-${_pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('201ed4cc841aa99e1c84acb3035a95fa36a77dd96c0dca290c46d21a290a548b')

prepare() {
  cd "$srcdir"/simgear-$pkgver
  sed -i -e "s|#include <simgear/structure/map.hxx>|#include <simgear/structure/map.hxx>\n#include <boost/utility/enable_if.hpp>|g" simgear/nasal/cppbind/NasalHash.hxx
}

build() {
  cd "$srcdir"/simgear-$pkgver
  mkdir ../sgbuild && cd ../sgbuild
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../simgear-${pkgver}
  make
}

package() {
  cd "$srcdir"/simgear-$pkgver
  make DESTDIR="$pkgdir" install
}

PKGBUILD#2, Flightgear

Flightgear 2019.1.1 PKGBUILD
# Maintainer: Deon Spengler <deon at spengler dot co dot za>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Hans Janssen <hans@janserv.xs4all.nl>

pkgname=flightgear
pkgver=2019.1.1
_pkgver=${pkgver%.*}
pkgrel=1
pkgdesc="An open-source, multi-platform flight simulator"
arch=(x86_64)
depends=('libxmu' 'libxi' 'zlib' 'openscenegraph34' 'libxrandr' 'glu' 'openal')
makedepends=('boost' 'cmake' 'mesa' 'sharutils' 'simgear' 'qt5-base' 'qt5-declarative' 'qt5-svg')
optdepends=('qt5-base: fgfs --launcher'
	    'qt5-declarative: fgfs --launcher'
            'flightgear-data')
license=("GPL")
url="http://www.flightgear.org/"
options=('makeflags')
source=("http://downloads.sourceforge.net/project/flightgear/release-${_pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('d1dff396b9ee96d454dbce8e9ab1aedee9829ced5fd57bcaf999a68b00553ca1')

build() {
  cd "$srcdir"/flightgear-$pkgver
  cmake \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DFG_DATA_DIR:STRING="/usr/share/flightgear/data" \
	-DCMAKE_BUILD_TYPE=Release \
	-DFG_BUILD_TYPE=Release .
  make
  sed -i 's|Exec=.*|Exec=fgfs --fg-root=/usr/share/flightgear/data|' package/org.flightgear.FlightGear.desktop
}

package() {
  cd "$srcdir"/flightgear-$pkgver
  make DESTDIR="$pkgdir" install

  install -Dm0644 package/flightgear.ico "$pkgdir"/usr/share/icons/flightgear.ico
  install -Dm0644 scripts/completion/fg-completion.bash "$pkgdir"/usr/share/bash-completion/completions/fgfs
  install -Dm0644 scripts/completion/fg-completion.zsh "$pkgdir"/usr/share/zsh/site-functions/_fgfs
  ln -sf flightgear "$pkgdir"/usr/share/FlightGear
}

PKGBUILD#3, Flightgear-data.

It is a really heavy package, something like 1.6 Gb to download… And 20 minutes or so to package it!

Flightgear-data 2019.1.1 PKGBUILD
# Maintainer: Frederic Bezies < fredbezies at gmail dot com >
# Contributor: Deon Spengler <deon at spengler dot co dot za>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Hans Janssen <hans@janserv.xs4all.nl>

pkgname=flightgear-data
pkgver=2019.1.1
_pkgver=${pkgver%.*}
pkgrel=1
pkgdesc="Base-Data for the opensource flight-simulator."
arch=(any)
license=('GPL')
url="http://www.flightgear.org/"
options=(!strip)
source=("https://downloads.sourceforge.net/project/flightgear/release-${_pkgver}/FlightGear-${pkgver}-data.tar.bz2")
sha256sums=('0ee261a4f916554e47ccc2acf889e0825fc22e0cc3880399278a2da83f04f593')

package() {
  cd "$srcdir"
  mkdir -p "$pkgdir"/usr/share/flightgear
  mv fgdata/ "$pkgdir"/usr/share/flightgear/data
  chown root:root "$pkgdir"/usr/share/flightgear/data
}

Waiting to take a screenshot now :slight_smile:

3 Likes

Thank you everyone for your help, I’ll try @FredBezies 's solution tomorrow. Looks like the flatpak option may have worked too, but I basically just moved from Ubuntu to EndevourOS because I don’t like snaps, flatpaks are basically the same thing, right? :slight_smile:
Many thanks, cheers all!

2 Likes

Well, when you’ll look back at this thread, a screenshot of Flightgear 2019.1.1 will be added :slight_smile:

Edit: well, I tried, but it looks like having only 8 Gb of ram makes it freeze on start :frowning:

1 Like

:exploding_head:

Now you tell me. If only i had of known! :weary: I have 32GB maybe it will work.

So i am not totally understanding the instructions to download each package and build and install. Could you explain this more for me? :grinning:

In a terminal, following this order: simgear, flightgear, flightgear-data.

  1. yay -G name-of-package
  2. cd name-of-package
  3. open PKGBUILD and replace the content by what you can find in this thread and save it
  4. makepkg -si to build and install it

Hope it helps :slight_smile:

1 Like

I’ve only got 8gb too. Remember when someone said “640K is all the memory anybody would ever need on a computer”? :wink:

yay --editmenu xpackage can edit the pkgbuild also , but on depency’s it is pretty bad, for that i prefer trizen it ask directly to edit pkgbuild and change of depency worked better then with yay --editmenu :slight_smile: but like @fred told is better , more control :slight_smile:

I understand using yay to get the packages. So it downloads each in their own folder. CD into each folder and this is where i’m not sure. So then open PGKBUILD in each of the respective folders and replace with the pkgbuild you have posted? Then where do you run makepkg -si? In home ? Or Just open the terminal and run? Thanks.

Replace content in each PKGBUILD, and run makepkg -si in each directory.

Bill Gates, in 1981? Or not!

1 Like