sanity.bbclass: Check for the presennce of libc.a
PATCH 1/1 sanity.bbclass: Check for the presennce of libc.a
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.
--- classes/sanity.bbclass | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
classes/sanity.bbclass +12 -0
@@ -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"
Quoted 4 lines · Holger Freyther
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.
Quoted 8 lines · Phil Blundell
Quoted 4 lines · Holger Freyther
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
Quoted 7 lines · Richard Purdie
Quoted 6 lines · Phil Blundell
Quoted 4 lines · Holger Freyther
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.
Quoted 5 lines
Quoted 2 lines
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
Quoted 11 lines
Cheers,
Richard
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
2010/9/12 Philip Balister <[email protected]>:
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Phil Blundell
Quoted 10 lines · Holger Freyther
Quoted 5 lines
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.
Quoted 7 lines
Quoted 2 lines
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"
Quoted 6 lines
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
Quoted 9 lines · Frans Meulenbroeks
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.