* [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
* Re: [PATCH] sanity.bbclass: Check for the presennce of libc.a
2010-09-12 10:54 ` Phil Blundell
@ 2010-09-12 10:36 ` Richard Purdie
2010-09-12 12:52 ` Philip Balister
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2010-09-12 10:36 UTC (permalink / raw)
To: openembedded-devel
On Sun, 2010-09-12 at 11:54 +0100, Phil Blundell wrote:
> On Sun, 2010-09-12 at 17:24 +0800, Holger Freyther wrote:
> > 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.
>
> Why are we building insmod.static for native anyway? That seems a bit
> silly.
It is. FWIW, Poky now patches the modutils-cross recipe so it only
builds the dynamically linked version to resolve exactly this issue.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sanity.bbclass: Check for the presennce of libc.a
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
0 siblings, 1 reply; 6+ messages in thread
From: Phil Blundell @ 2010-09-12 10:54 UTC (permalink / raw)
To: openembedded-devel
On Sun, 2010-09-12 at 17:24 +0800, Holger Freyther wrote:
> 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.
Why are we building insmod.static for native anyway? That seems a bit
silly.
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sanity.bbclass: Check for the presennce of libc.a
2010-09-12 10:36 ` Richard Purdie
@ 2010-09-12 12:52 ` Philip Balister
2010-09-12 13:01 ` Frans Meulenbroeks
0 siblings, 1 reply; 6+ messages in thread
From: Philip Balister @ 2010-09-12 12:52 UTC (permalink / raw)
To: openembedded-devel
On 09/12/2010 06:36 AM, Richard Purdie wrote:
> On Sun, 2010-09-12 at 11:54 +0100, Phil Blundell wrote:
>> On Sun, 2010-09-12 at 17:24 +0800, Holger Freyther wrote:
>>> 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.
>>
>> Why are we building insmod.static for native anyway? That seems a bit
>> silly.
>
> It is. FWIW, Poky now patches the modutils-cross recipe so it only
> builds the dynamically linked version to resolve exactly this issue.
I'd rather just have insane check for glibc-static and not have an extra
patch we need to carry around. I know everytime I install OE on a Fedora
based machine, I spend a few minutes remembering why modutils-native
does not build.
Having a reminder to install glibc-static if needed would really help
the new user experience for people using Fedora. I'd like to see
Holger's change go in.
Philip
>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sanity.bbclass: Check for the presennce of libc.a
2010-09-12 12:52 ` Philip Balister
@ 2010-09-12 13:01 ` Frans Meulenbroeks
2010-09-12 15:01 ` Holger Freyther
0 siblings, 1 reply; 6+ messages in thread
From: Frans Meulenbroeks @ 2010-09-12 13:01 UTC (permalink / raw)
To: openembedded-devel
2010/9/12 Philip Balister <philip@balister.org>:
> On 09/12/2010 06:36 AM, Richard Purdie wrote:
>>
>> On Sun, 2010-09-12 at 11:54 +0100, Phil Blundell wrote:
>>>
>>> On Sun, 2010-09-12 at 17:24 +0800, Holger Freyther wrote:
>>>>
>>>> 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.
>>>
>>> Why are we building insmod.static for native anyway? That seems a bit
>>> silly.
>>
>> It is. FWIW, Poky now patches the modutils-cross recipe so it only
>> builds the dynamically linked version to resolve exactly this issue.
>
> I'd rather just have insane check for glibc-static and not have an extra
> patch we need to carry around. I know everytime I install OE on a Fedora
> based machine, I spend a few minutes remembering why modutils-native does
> not build.
I guess you mean modutils-cross. There is no modutils-native recipe
and the modutils one does not have BBCLASSEXTEND = "native"
>
> Having a reminder to install glibc-static if needed would really help the
> new user experience for people using Fedora. I'd like to see Holger's change
> go in.
>
> Philip
A patch does not seem to be needed
From modutils configure --help
--disable-insmod-static Do not create insmod.static binary (default)
Btw this is from modutils-cross-2.4.27-r9
(and ofc is the usage is not correct and the flag is not the default
behaviour it can easily be added in the conf flags)
Have fun! Frans
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sanity.bbclass: Check for the presennce of libc.a
2010-09-12 13:01 ` Frans Meulenbroeks
@ 2010-09-12 15:01 ` Holger Freyther
0 siblings, 0 replies; 6+ messages in thread
From: Holger Freyther @ 2010-09-12 15:01 UTC (permalink / raw)
To: openembedded-devel
On 09/12/2010 09:01 PM, Frans Meulenbroeks wrote:
> A patch does not seem to be needed
>
> From modutils configure --help
> --disable-insmod-static Do not create insmod.static binary (default)
>
> Btw this is from modutils-cross-2.4.27-r9
>
> (and ofc is the usage is not correct and the flag is not the default
> behaviour it can easily be added in the conf flags)
this sounds like the best option.
^ permalink raw reply [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.