From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 1/3 v2] sanity.bbclass: Check for the known broken version of make
Date: Thu, 27 Jun 2013 09:08:33 -0500 [thread overview]
Message-ID: <1372342113-32763-1-git-send-email-mark.hatle@windriver.com> (raw)
See GNU Savannah bug 30612 -- make 3.82 is known to be broken.
A number of vendors are providing a modified version, so checking
for just the version string is not enough. We also need to check
if the patch for the issue has been applied. We use a modified
version of the reproduced to check for the issue.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/sanity.bbclass | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e21cb6b..f2ed91e 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -306,6 +306,42 @@ def check_gcc_march(sanity_data):
return result
+# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
+# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
+def check_make_version(sanity_data):
+ from distutils.version import LooseVersion
+ status, result = oe.utils.getstatusoutput("make --version")
+ if status != 0:
+ return "Unable to execute make --version, exit code %s\n" % status
+ version = result.split()[2]
+ if LooseVersion(version) == LooseVersion("3.82"):
+ # Construct a test file
+ f = open("makefile_test", "w")
+ f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n")
+ f.write("\n")
+ f.write("makefile_test_a.c:\n")
+ f.write(" touch $@\n")
+ f.write("\n")
+ f.write("makefile_test_b.c:\n")
+ f.write(" touch $@\n")
+ f.close()
+
+ # Check if make 3.82 has been patched
+ status,result = oe.utils.getstatusoutput("make -f makefile_test")
+
+ os.remove("makefile_test")
+ if os.path.exists("makefile_test_a.c"):
+ os.remove("makefile_test_a.c")
+ if os.path.exists("makefile_test_b.c"):
+ os.remove("makefile_test_b.c")
+ if os.path.exists("makefile_test.a"):
+ os.remove("makefile_test.a")
+
+ if status != 0:
+ return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
+ return None
+
+
# Tar version 1.24 and onwards handle overwriting symlinks correctly
# but earlier versions do not; this needs to work properly for sstate
def check_tar_version(sanity_data):
@@ -436,6 +472,7 @@ def check_sanity_version_change(status, d):
except ImportError:
status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
+ status.addresult(check_make_version(d))
status.addresult(check_tar_version(d))
status.addresult(check_git_version(d))
--
1.8.3.1
next reply other threads:[~2013-06-27 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 14:08 Mark Hatle [this message]
2013-06-27 14:21 ` [PATCH 1/3 v2] sanity.bbclass: Check for the known broken version of make Burton, Ross
2013-06-28 10:20 ` Paul Barker
2013-06-28 13:13 ` Mark Hatle
2013-06-28 15:11 ` Paul Barker
2013-06-28 18:22 ` Paul Barker
2013-06-30 15:56 ` Trevor Woerner
2013-06-30 16:02 ` Philip Balister
2013-06-30 22:55 ` Trevor Woerner
2013-07-08 16:55 ` Mark Hatle
2013-07-09 15:14 ` Trevor Woerner
2013-07-19 9:41 ` Paul Eggleton
2013-07-21 13:27 ` Trevor Woerner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372342113-32763-1-git-send-email-mark.hatle@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox