@mastroj I met similar issue when building CEF(Chromium Embedded Framework). It uses compiler_version.py, too.
In my case, near line 54, the below source codes exist:
def GetVersion(compiler, tool):
tool_output = tool_error = None
cache_key = (compiler, tool)
cached_version = compiler_version_cache.get(cache_key)
# Note that compiler could be something tricky like "distcc g++".
if tool == "compiler":
compiler = compiler + " -dumpversion"
version_re = re.compile(r"(\d+)\.(\d+)")
Maybe, from g++(or gcc) version 7, -dumpversion option shows only major version such as 7, so that the regular expression of compiler_version.py raises an exception because it expects the version including minor one.
So, I modified the option from -dumpversion to -dumpfullversion, and then it works well.