Regarding the error. Which version of gcc do you have installed? For unknown reasons, something with your compiler might be wrong. E.g. the version installed is not supporting cxx11. I guess you need at min. gcc >= 4.7. However, I suggest to build at least with gcc >= 4.8. If you for any reason decided to use a different compiler such as clang, the build may work theoretically, but probably not with the current build system
Still failing after multiple attempts. It might not have been clear but I am doing this directly on the RPI2. I found this thread that suggests others are having issues building on the RPI2 as well. I guess I’ll try to cross compile:
You are most likely right but I am using stock emlid/navio image for RPI2 and a following all the instructions from the documentation. So one or the other or both are in bad need of updates. I gave up trying to build the sources on the pi and just installed apm via the .deb so I can get things flying. I’ll work on the cross-compiling/building from sources on another day.
Okay, but cross compiling can also fail if the compiler environment is not configured as it should be …
If you compile something it is always helpful to know what is actually going on.
As @dgrat has rightfully mentioned above the issue does indeed boils down to a couple of wrong symlinks.
I assume you’ve installed the newer gcc. If that’s true these commands should get you going. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/g++-4.8 50
The thing is the compilation will take a daunting amount of time. That’s why nobody’s bothered with a tutorial. The new image will however have a newer compiler.