@BuZz That did it, thanks. Now I can unlock the framerate to fullspeed (60). I'll have to double check with mupen, but this might be able to run goldeneye at better speeds. F-Zero and other games are still crashing but that might just be the emulator.
@charlie22911 You can try now to re-compile - do a fresh git clone/pull or a re-install from source in RetroPie. It looks like the last 2 commits fixed the compilation error - at least for me it compiles now, didn't try running anything through the core in the emulator.