Board index FlightGear Support Compiling

How to build flightgear on NixOS

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

How to build flightgear on NixOS

Postby turion » Tue Jun 30, 2020 5:09 pm

Hi,

I'm trying to build and update flightgear on NixOS. You can see the latest draft here: https://github.com/NixOS/nixpkgs/pull/91793 I'm not an experienced C++ dev, and no intentions to become one. But I love flightgear and would like it to work on my favourite distro.

I'm trying to build the newest version, 2020.1.3.
Currently, my build failure is:

Code: Select all
Call Stack (most recent call first):
  CMakeLists.txt:374 (include)


CMake Error at CMakeModules/Translations.cmake:38 (translation_dir_list):
  translation_dir_list Function invoked with incorrect arguments for function
  named: translation_dir_list
Call Stack (most recent call first):
  CMakeLists.txt:374 (include)

Here is the full build log: https://pastebin.com/fCdGGJ95

There are other parts of the log where I'm not sure whether they are a serious problem:
Code: Select all
CMake Warning at /nix/store/fryj85qdkbfgbcyf9yp6xji8d2plgclv-qtbase-5.12.7-dev/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  By not providing "FindQt5LinguistTools.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5LinguistTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5LinguistTools"
  with any of the following names:

    Qt5LinguistToolsConfig.cmake
    qt5linguisttools-config.cmake

  Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or
  set "Qt5LinguistTools_DIR" to a directory containing one of the above
  files.  If "Qt5LinguistTools" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeModules/Translations.cmake:15 (find_package)
  CMakeLists.txt:374 (include)


CMake Warning at CMakeModules/Translations.cmake:15 (find_package):
  Found package configuration file:

    /nix/store/fryj85qdkbfgbcyf9yp6xji8d2plgclv-qtbase-5.12.7-dev/lib/cmake/Qt5/Qt5Config.cmake

  but it set Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt5 component "LinguistTools" config file at
  "/nix/store/fryj85qdkbfgbcyf9yp6xji8d2plgclv-qtbase-5.12.7-dev/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"


In general, I'm happy about any dev help here. If people can tell me in standard linux distro terms what's going wrong and what I would have to do on, say, Debian to fix it, I'll translate that to NixOS terms. Hopefully it will soon work!
turion
 
Posts: 1
Joined: Tue Jun 30, 2020 5:01 pm

Re: How to build flightgear on NixOS

Postby ludomotico » Tue Jun 30, 2020 8:11 pm

We know the name of the packages that include the required libraries on Debian based distros, but these packages will be named differently on other Linux variants.

It might be related with this issue: Qt5 has removed "qt5_use_modules" (whatever that means) and this affects to many packages in NixOS: https://github.com/NixOS/nixpkgs/issues/43025

Some options:

- Do not build the Qt5 interface. This interface is only used in the launcher (AFAIK). You will be able to run flightgear from the command line:

Code: Select all
cmake -DENABLE_QT=OFF


- Try some of the suggestions of that link (and sublinks). I'm afraid I don't know enough about NixOS to understand these suggestions.
User avatar
ludomotico
 
Posts: 1096
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: How to build flightgear on NixOS

Postby xDraconian » Wed Jul 01, 2020 4:31 am

Hi @turion,

The error and the warning are both related to missing Qt5LinguisticTools.
You would find this at Qt/lib/cmake/Qt5LinguisticTools

Assuming you have this installed, it should be an easy fix to specify the path within CMake
Code: Select all
Qt5LinguistTools_DIR:PATH=/opt/Qt/5.15.0/gcc_64/lib/cmake/Qt5LinguistTools
.

If you are not sure where Qt5 is installed, try using...
Code: Select all
find $installdir/ -name \*Qt5LinguistTools\*
xDraconian
 
Posts: 322
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: How to build flightgear on NixOS

Postby wkitty42 » Wed Jul 01, 2020 7:03 pm

ludomotico wrote in Tue Jun 30, 2020 8:11 pm:- Do not build the Qt5 interface. This interface is only used in the launcher (AFAIK).

the in-sim Aircraft Center is the launcher with some parts disabled ;)
"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: 6397
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest