sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems

Message ID 20220413163408.2181683-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit ad5829aa1f8a7369509542b913bfd8d21d1b1bc3
Headers show
Series sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems | expand

Commit Message

Richard Purdie April 13, 2022, 4:34 p.m. UTC
We keep seeing hangs on the autobuilder with make 4.2.1 on Centos8, Alma8
and OpenSuse workers. The hang occurs in perl and kernel builds in particular.
The issue is fixed in 4.3 and has been patched on Ubuntu systems:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
https://savannah.gnu.org/bugs/?51400

Add a sanity test for make 4.2.1 and error for non-ubuntu systems. We're
making a buildtools-make-tarball available which can be used to
allow systems with the broken version to use the project.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/sanity.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index be956fbcd6c..c385d92e8b0 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -467,6 +467,12 @@  def check_make_version(sanity_data):
                 os.remove("makefile_test_b.c")
             if os.path.exists("makefile_test.a"):
                 os.remove("makefile_test.a")
+
+    if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
+        distro = oe.lsb.distro_identifier()
+        if "ubuntu" in distro:
+            return None
+        return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
     return None