@codebrainz not sure what the problem is, I would have thought g++ 10 would default to c++17, but maybe I'm wrong, does latest git Geany build with autotools on the same system?
I think the problem is with fnmatch/gnu_regex libraries which I believe are special for Windows, and possibly just some missing checks/macros to enable them. From the build output, it looks like a bunch of macros are not defined which just cascades into a whole pile of errors. I'm pretty sure Ninja is doing parallel compiles so the output is probably out of order.
It's the same setup I used to build Geany previously, but I didn't try Autotools since pulling latest with the c++17 requirement, though judging by the output, I don't think it has hit that issue (yet).