From 3042701c24efc14264c05e8626b92ebcc1b6b76b Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Oct 2019 13:31:50 -0400 Subject: [PATCH 1/3] build: log the found compiler version if too old `configure` will log a warning if the detected compiler is not new enough. Take some of the guesswork out of it by also logging the version of the compiler that was detected. --- configure.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 7305727c8881e0..280519c3f0d95a 100755 --- a/configure.py +++ b/configure.py @@ -775,7 +775,8 @@ def check_compiler(o): if not ok: warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX) elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0): - warn('C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=%s)' % CXX) + warn('C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=%s, %s)' % + (CXX, ".".join(map(str, clang_version if is_clang else gcc_version)))) ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c') if not ok: @@ -784,7 +785,8 @@ def check_compiler(o): # clang 3.2 is a little white lie because any clang version will probably # do for the C bits. However, we might as well encourage people to upgrade # to a version that is not completely ancient. - warn('C compiler too old, need gcc 4.2 or clang 3.2 (CC=%s)' % CC) + warn('C compiler too old, need gcc 4.2 or clang 3.2 (CC=%s, %s)' % + (CC, ".".join(map(str, gcc_version)))) o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0' From 5491f8e680876f32a88d29582f16b4ea90390d39 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Oct 2019 14:19:47 -0400 Subject: [PATCH 2/3] fixup! build: log the found compiler version if too old --- configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 280519c3f0d95a..7b95cb0c421954 100755 --- a/configure.py +++ b/configure.py @@ -775,7 +775,7 @@ def check_compiler(o): if not ok: warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX) elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0): - warn('C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=%s, %s)' % + warn('C++ compiler too old (CXX=%s, %s), need g++ 6.3.0 or clang++ 8.0.0' % (CXX, ".".join(map(str, clang_version if is_clang else gcc_version)))) ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c') @@ -785,7 +785,7 @@ def check_compiler(o): # clang 3.2 is a little white lie because any clang version will probably # do for the C bits. However, we might as well encourage people to upgrade # to a version that is not completely ancient. - warn('C compiler too old, need gcc 4.2 or clang 3.2 (CC=%s, %s)' % + warn('C compiler too old (CC=%s, %s), need gcc 4.2 or clang 3.2' % (CC, ".".join(map(str, gcc_version)))) o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0' From 2b46e347588bd72ae8e3aa0bb7eac474f618dbc2 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Oct 2019 14:23:43 -0400 Subject: [PATCH 3/3] fixup! build: log the found compiler version if too old --- configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 7b95cb0c421954..46c9d1f00f63d3 100755 --- a/configure.py +++ b/configure.py @@ -775,7 +775,7 @@ def check_compiler(o): if not ok: warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX) elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0): - warn('C++ compiler too old (CXX=%s, %s), need g++ 6.3.0 or clang++ 8.0.0' % + warn('C++ compiler (CXX=%s, %s) too old, need g++ 6.3.0 or clang++ 8.0.0' % (CXX, ".".join(map(str, clang_version if is_clang else gcc_version)))) ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c') @@ -785,7 +785,7 @@ def check_compiler(o): # clang 3.2 is a little white lie because any clang version will probably # do for the C bits. However, we might as well encourage people to upgrade # to a version that is not completely ancient. - warn('C compiler too old (CC=%s, %s), need gcc 4.2 or clang 3.2' % + warn('C compiler (CC=%s, %s) too old, need gcc 4.2 or clang 3.2' % (CC, ".".join(map(str, gcc_version)))) o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0'