All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sanity.bbclass: Check for the presennce of libc.a
@ 2010-09-12  9:24 Holger Freyther
  2010-09-12 10:54 ` Phil Blundell
  0 siblings, 1 reply; 6+ messages in thread
From: Holger Freyther @ 2010-09-12  9:24 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]


The insmod.static binary links statically and requires the libc.a
to be present. On Fedora glibc-static is not installed by default
when installing development headers. Warn the user that he needs
to have that installed.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
---
 classes/sanity.bbclass |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)



[-- Attachment #2: 0001-sanity.bbclass-Check-for-the-presennce-of-libc.a.patch --]
[-- Type: text/x-patch, Size: 934 bytes --]

diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index 575530a..7f99251 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -99,6 +99,18 @@ def check_sanity(e):
 		missing = missing.rstrip(',')
 		messages = messages + "Please install following missing utilities: %s\n" % missing
 
+	# Libs that need to be present. E.g. libc.a for insmod.static
+	required_libs = "libc.a"
+	missing = ""
+	for lib in required_libs.split():
+		if not os.path.exists("/lib/%s" % lib) and not os.path.exists("/usr/lib/%s" % lib):
+			missing = "%s, %s" % (missing, lib)
+
+	if missing != "":
+		missing = missing.rstrip(',')
+		messages = "%sPlease install the following libraries: %s\n" % (messages, missing)
+
+
 	try:
 	    if os.path.basename(os.readlink('/bin/sh')) == 'dash':
 		    messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead.\n"


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-12 15:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-12  9:24 [PATCH] sanity.bbclass: Check for the presennce of libc.a Holger Freyther
2010-09-12 10:54 ` Phil Blundell
2010-09-12 10:36   ` Richard Purdie
2010-09-12 12:52     ` Philip Balister
2010-09-12 13:01       ` Frans Meulenbroeks
2010-09-12 15:01         ` Holger Freyther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.