I've been trying to compile FG from the latest Git source (done this many times in the past before). But I really can't figure out the errors I'm getting..I don't really want to post the whole lot because it's a really, really long list, but it seems possibly related to OSG, it starts like:

I have tried the OSG that comes with my distro (Ubuntu 16.04) and I have manually compiled and OSG 3.2.3 and 3.4.0 and it makes no difference. OSG compiled with no issues.Simgear compiled and installed with no issues either. I have also deleted and re-downloaded flightgear from git to just make sure that it wasn't a download corruption or something.Anything obvious I'm missing?

The "undefined references" you show in the first box are related to SimGear (SG-) functions, not to OpenSceneGraph.

Since you are compiling both SimGear and FlightGear from source, did you uninstall any SimGear version you had installed previously (e.g. because you originally installed FlightGear + SimGear from your package manager, then decided to compile them from source, uninstalled FlightGear but forgot to uninstall SimGear)? If you have both the version packaged by your distribution and the one you compiled from source installed, it might be that CMake is picking the first (older) one instead of the second (correct) one.

If that is not the case, try performing a clean build: if you are performing an "out-of-source build", that is, compiling the programs outside the source directory in a dedicated build directory, just remove the latter, otherwise, do a "make clean" and then build SimGear and FlightGear again.

I have never installed Flightgear from the repository, have always compiled it so definitely not old packages. I did try completely wiping both FG and SG and re-compiling and I still get the error.Also when I do a "make uninstall" on Simgear and then try run cmake on FG it complains that it can't find Simgear so I'm fairly certain it's finding the correct Simgear.

I wonder if it's possible that my Simgear is broken, somehow something not compiling correctly or something yet not reporting any errors.. I'm lost on what else I can try. :/

This is most likely due to conflicting versions being found by the cmake logic - it does make sense to review the cmake cache to see what it found, and where.

Note that you will typically also have to run "make install" for SimGear specifically before it shows up properly, so that the cmake logic can find it - and that even applies if you use -DCMAKE_INSTALL_PREFIX already.

As far as I can see, you are installing system-wide into the 64 nit lib location - you may have other directories in use (see ldconfig), which is why it makes sense to search your lib directories for SimGear/OSG related libs that may be conflicting with what you want to be using

I discovered I indeed had two Simgear libs installed - newly compiled one was installed in /usr/local/lib and the older one was in /usr/local/lib/x86_64-linux-gnu/..I guess a partial reason for my confusion is probably because "make uninstall" would remove the header files (which appear to have only one location) - hence FG compilation would fail and I assumed it had fully removed Simgear.

I'm guessing this issue must've appeared after I updated Ubuntu 14.04 to 16.04.