Commenting out AOgpu2::init() avoids the problem with GCC 8 and so far I haven't noticed any side-effects.
--- a/src/Common.cpp +++ b/src/Common.cpp @@ -1054,7 +1054,7 @@ if (!shadowmap.init()) res|=ERRGL_NO_FBO_SHADOWMAP; if (!shadowmap.initHalo()) res|=ERRGL_NO_FBO_HALO; - if (! AOgpu2::init()) res|=ERRGL_NO_FBO_AO; +// if (! AOgpu2::init()) res|=ERRGL_NO_FBO_AO;