Board index FlightGear Support Compiling

Error compiling nightly on Garuda Linux (Arch based)

Building FlightGear from source, and in the need for help?

Error compiling nightly on Garuda Linux (Arch based)

Postby tldrc » Sat Oct 16, 2021 3:13 pm

Hi,
I am trying to compile the nightly build on my Arch-based linux.

I have attempted 3 methods with no success.

Method 1:
first thing I tried was using fgmeta's
download_and_compile.sh

this was using "apt-get" as package manager assuming that a Debian based system
even after changing "apt-get update" and "apt-get install" to Arch's
"pacman -Syyu" and "pacman -S"
I am still stuck at where it tries to install dctrl-tools which I believe is not available for Arch.
I could not find this package in through my package manager and all the searches I found always were associated with Ubuntu or some Debian system.
So I gave up on this route


Method 2:
fgmeta's fg-from-scratch.sh
out of the box, the script would throw this error


CMake Error:
Running
'/usr/bin/ninja' '-C' '/home/tl/code/fgmeta.git/fg-from-scratch/scratch-build/simgear/CMakeFiles/CMakeTmp' '-t' 'recompact'
failed with:
ninja: error: build.ninja:74: expected '=', got identifier
Known valid arguments for -march= option: -mtune=znver1
^ near here

I soon figured that this line
CHIPSET=$(gcc -march=native -Q --help=target | grep -- '-march=' | cut -f3)
returned an unexpected line "Known valid arguments for -march= option: -mtune=znver1"
My patch fix is adding this line below the previous
CHIPSET="znver1"

after that, this new error appeared

[42/99] Building CXX object src/Lib/terragear/CMakeFiles/terragear.dir/tg_polygon.cxx.o
In file included from /home/tl/code/fgmeta.git/fg-from-scratch/scratch-source/terragear-git/src/Lib/terragear/tg_polygon.cxx:27:
/usr/include/simgear/threads/SGGuard.hxx:2:76: note: ‘#pragma message: : warning<deprecated> use std::lock_guard and std::mutex.’
2 | #pragma message(": warning<deprecated> use std::lock_guard and std::mutex.")
| ^
[48/99] Building CXX object src/Lib/terragear/CMakeFiles/terragear.dir/tg_polygon_tesselate.cxx.o
In file included from /usr/include/boost/math/tools/cxx03_warn.hpp:9,
from /usr/include/boost/math/constants/constants.hpp:11,
from /usr/include/boost/math/special_functions/asinh.hpp:25,
from /usr/include/boost/multiprecision/gmp.hpp:21,
from /usr/include/CGAL/boost_mp.h:44,
from /usr/include/CGAL/internal/Exact_type_selector.h:27,
from /usr/include/CGAL/Exact_kernel_selector.h:26,
from /usr/include/CGAL/Filtered_kernel.h:22,
from /usr/include/CGAL/Exact_predicates_exact_constructions_kernel.h:21,
from /home/tl/code/fgmeta.git/fg-from-scratch/scratch-source/terragear-git/src/Lib/terragear/tg_polygon_tesselate.cxx:4:
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
13 | BOOST_HEADER_DEPRECATED("<iterator>")
| ^~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
All done!

So I have been stuck ever since on this route.

Method 3:
Arch AUR (Arch Linux User Repository) : flightgear-git
I get a different error
Code: Select all
[  9%] Building CXX object CMakeFiles/fgfsObjects.dir/src/Environment/metarproperties.cxx.o
/var/tmp/pamac-build-tl/flightgear-git/src/flightgear/src/Environment/metarproperties.cxx: In member function ‘const char* Environment::MetarProperties::get_metar() const’:
/var/tmp/pamac-build-tl/flightgear-git/src/flightgear/src/Environment/metarproperties.cxx:208:20: error: ‘class FGMetar’ has no member named ‘getRawDataPtr’
  208 |     return _metar->getRawDataPtr();
      |                    ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/fgfsObjects.dir/build.make:1140: CMakeFiles/fgfsObjects.dir/src/Environment/metarproperties.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1677: CMakeFiles/fgfsObjects.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
tldrc
 
Posts: 19
Joined: Wed May 19, 2021 2:49 am

Re: Error compiling nightly on Garuda Linux (Arch based)

Postby MariuszXC » Sun Oct 17, 2021 8:53 pm

tldrc wrote in Sat Oct 16, 2021 3:13 pm:Hi,
I am trying to compile the nightly build on my Arch-based linux.


1. what is your version of g++? I ask, because I had to upgrade gcc/g++ on my system before it would compile next (now I have ver. 9.4.0 and it gets the job done).
2. just a suggestion, but maybe try to compile stable first and ensure your toolchain and environment is OK?
INOP
MariuszXC
 
Posts: 1061
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: Error compiling nightly on Garuda Linux (Arch based)

Postby wkitty42 » Mon Oct 18, 2021 12:58 pm

tldrc wrote in Sat Oct 16, 2021 3:13 pm:
Code: Select all
[  9%] Building CXX object CMakeFiles/fgfsObjects.dir/src/Environment/metarproperties.cxx.o
/var/tmp/pamac-build-tl/flightgear-git/src/flightgear/src/Environment/metarproperties.cxx: In member function ‘const char* Environment::MetarProperties::get_metar() const’:
/var/tmp/pamac-build-tl/flightgear-git/src/flightgear/src/Environment/metarproperties.cxx:208:20: error: ‘class FGMetar’ has no member named ‘getRawDataPtr’
  208 |     return _metar->getRawDataPtr();
      |                    ^~~~~~~~~~~~~

this is a known defect... it was introduced the other day during refactoring... there is a temporary fix posted on the mailing list but there should be a proper fix inbound shortly-ish*...

FWIW: if one is going to build the next branch, i highly recommend they join the dev mailing list so they can keep up with developments as well as also joining the commits (read-only) mailing list... yes, these posts are all emails... it is easy enough to use filters in email clients to move the posts to appropriate folders to keep the in-box traffic down... or one could elect to take the painful route and use the SF mailing list interface... either way, staying informed on developments is recommended... links to the mailing lists are in the "mailing lists" link at the top of all pages (above the graphic) in these forums...






*: aka as soon as james finds time to fix and commit it to the repo...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Compiling

Who is online

Users browsing this forum: No registered users and 6 guests