Hi all.
I have known about FlightGear for many years but am just getting around to trying it.
I am not able to use a linux package manager, or the AppImage, to run Flightgear because both my distribution and c++ runtime are severely out of date. I have not updated my machine for a number of reasons, the primary one being, once I get things working, I usually just want to leave it alone! I have updated my kernel and a few security related things, but most of my system is sitting around 2014 somewhere. I've kept it going for a long time. This, as well as being excited about the project and possibly wanting to contribute, has led me to try and compile on this machine.
The distribution is a very dated Arch Linux install, with most packages on it having been compiled by gcc4.8.0. I had updated my compiler years ago to build a project that needed C++11 support, but it was not necessary for me to update the C++ runtime at that time (this was pre-gcc5.0). In order to compile FlightGear, I have built and installed gcc7.1.0 and a libstdc++ from that same version in a non-standard directory.
I am trying to build the 2020.3.12 versions of simgear and flightgear (I used git-archive from my local repo and put the source in the eventual game directory, as explained on the wiki). It was necessary for me to update boost and OSG in order to get through the simgear compile. I did have those libraries already, but the versions lacked things needed to compile simgear. I thought I did my best to configure them to use the new runtime, but I am not sure if I did things correctly. In a nutshell, I have been able to compile simgear successfully (although all of the tests fail). When I move on to flightgear, I get to about 20% and it fails, I believe because I am not specifying the new runtime correctly, and many of my shared libs are using the old runtime. With the exceptions of OSG and boost, all of the other dependencies are present on my machine, although built years ago with an older gcc version (and using my standard system runtime!).
My first problem was that I was not specifying the gcc macro (_GLIBCXX_USE_CXX11_ABI=0) to use the old ABI, so I went back and recompiled the updated boost, OSG, simgear, and with all that done, flightgear failed again with a different, although similar error. Googling at the time made me realize it had not been trying to link to the appropriate runtime, but I deleted all of my builds (so unfortunately I don't have the exact error message). After several late, bleary-eyed nights at the computer, when my wife and kids were in bed, I had added so many things to my CMakeCache in hacky attempts to get running that I decided to give it a rest until I knew if this was even possible.
Before I try again, I am wondering if I need to forget about all of the current dependencies that already exist, and recompile everything with my new build chain (after I figure out how to properly configure the non-standard-location libstdc++), or if I am just misconfiguring my new builds of OSG and boost, or if this will not even be possible in this trashed environment. I am positive I could go back to an older version of the code and get it compiled without issues, but I was pretty intent on trying the latest stable version.
Do I even need to use the libstdc++ from my gcc7.1.0 or is simply using the gcc7.1.0 version of the compiler enough? (I am also specifying -std=c++17 btw)
What are the failed simgear tests (make test) telling me?
Is it possible to have shared libraries and the simgear/flightgear stuff using different c++ runtimes if they are using the same ABI?
Has anyone tried compiling in a situation like this?
I'm just a little lost at this point and looking for a nudge in the right direction. With my new family responsibilities, I am definitely considering a move to a more pain-free setup, but it would be nice to get everything working on the existing install. Thanks.