Patchwork [PATCHv2,1/2] eglibc-locale: add missing dependency on virtual/${TARGET_PREFIX}binutils

login
register
mail settings
Submitter Martin Jansa
Date July 6, 2013, 8:39 a.m.
Message ID <1373099962-19854-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/53199/
State Accepted
Commit 9e615e2a6845d3a98f5d9b0cb555d132c696fc92
Headers show

Comments

Martin Jansa - July 6, 2013, 8:39 a.m.
* eglibc-collateral.inc inhibits all default deps, but do_package needs
  objcopy:
  ERROR: objcopy failed with exit code 127 (cmd was
  'i586-webos-linux-objcopy' --only-keep-debug
  'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so'
  'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
  ERROR: Function failed: split_and_strip_files

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/eglibc/eglibc-locale.inc | 5 +++++
 1 file changed, 5 insertions(+)
Chris Larson - July 6, 2013, 10:56 p.m.
On Sat, Jul 6, 2013 at 1:39 AM, Martin Jansa <martin.jansa@gmail.com> wrote:

> * eglibc-collateral.inc inhibits all default deps, but do_package needs
>   objcopy:
>   ERROR: objcopy failed with exit code 127 (cmd was
>   'i586-webos-linux-objcopy' --only-keep-debug
>   'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so'
>   'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
>   ERROR: Function failed: split_and_strip_files
>

Wouldn't it be better to add the necessary dep to the do_package[depends]
in package.bbclass?
Martin Jansa - July 6, 2013, 11:08 p.m.
On Sat, Jul 06, 2013 at 03:56:59PM -0700, Chris Larson wrote:
> On Sat, Jul 6, 2013 at 1:39 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> 
> > * eglibc-collateral.inc inhibits all default deps, but do_package needs
> >   objcopy:
> >   ERROR: objcopy failed with exit code 127 (cmd was
> >   'i586-webos-linux-objcopy' --only-keep-debug
> >   'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so'
> >   'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
> >   ERROR: Function failed: split_and_strip_files
> >
> 
> Wouldn't it be better to add the necessary dep to the do_package[depends]
> in package.bbclass?

In this case yes, but what about allarch recipes, creating
binutils-cross dependency in their do_package task would probably make
their stamps depending on architecture.

I have similar patch adding virtual/${TARGET_PREFIX}binutils in
BASEDEPENDS, that won't fix this eglibc-locale (because it has
INHIBIT_DEFAULT_DEPS), but it's needed in cases where
gcc-cross.do_configure -> binutils-cross.do_populate_sysroot is skipped
when gcc-cross is reused from sstate.

I'll send RFC for that one now (I was trying to debug why it also brings
dependency on do_package_setscene)
Chris Larson - July 6, 2013, 11:20 p.m.
On Sat, Jul 6, 2013 at 4:08 PM, Martin Jansa <martin.jansa@gmail.com> wrote:

> In this case yes, but what about allarch recipes, creating
> binutils-cross dependency in their do_package task would probably make
> their stamps depending on architecture.
>

def get_binutils_dep(d):
    if 'target' in d.getVar('OVERRIDES', True).split():
        return d.expand('virtual/${TARGET_PREFIX}binutils')
    else:
        return ''

do_package[depends] += "${@get_binutils_dep(d)}"
Martin Jansa - July 6, 2013, 11:32 p.m.
On Sat, Jul 06, 2013 at 04:20:00PM -0700, Chris Larson wrote:
> On Sat, Jul 6, 2013 at 4:08 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> 
> > In this case yes, but what about allarch recipes, creating
> > binutils-cross dependency in their do_package task would probably make
> > their stamps depending on architecture.
> >
> 
> def get_binutils_dep(d):
>     if 'target' in d.getVar('OVERRIDES', True).split():
>         return d.expand('virtual/${TARGET_PREFIX}binutils')
>     else:
>         return ''
> 
> do_package[depends] += "${@get_binutils_dep(d)}"

class-target will be in recipes which inherits allarch

that code should also respect
EXCLUDE_FROM_SHLIBS
INHIBIT_PACKAGE_DEBUG_SPLIT
INHIBIT_PACKAGE_STRIP
flags

I think objcopy is needed only with some combination of these.

With binutils-cross in BASEDEPENDS I don't know how many recipes will
need do_package -> binutils-cross.do_populate_sysroot, maybe just this
one eglibc-locale...
Khem Raj - July 8, 2013, 3:30 a.m.
On Jul 6, 2013, at 1:39 AM, Martin Jansa <martin.jansa@gmail.com> wrote:

> * eglibc-collateral.inc inhibits all default deps, but do_package needs
>  objcopy:
>  ERROR: objcopy failed with exit code 127 (cmd was
>  'i586-webos-linux-objcopy' --only-keep-debug
>  'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so'
>  'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
>  ERROR: Function failed: split_and_strip_files
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> meta/recipes-core/eglibc/eglibc-locale.inc | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
> index f4cb814..c3fcc6d 100644
> --- a/meta/recipes-core/eglibc/eglibc-locale.inc
> +++ b/meta/recipes-core/eglibc/eglibc-locale.inc
> @@ -5,6 +5,11 @@ SUMMARY = "Locale data from eglibc"
> BPN = "eglibc"
> LOCALEBASEPN = "${MLPREFIX}eglibc"
> 
> +# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
> +# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
> +# ERROR: Function failed: split_and_strip_files
> +DEPENDS_class-target = "virtual/${TARGET_PREFIX}binutils"


Looks good.

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
index f4cb814..c3fcc6d 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -5,6 +5,11 @@  SUMMARY = "Locale data from eglibc"
 BPN = "eglibc"
 LOCALEBASEPN = "${MLPREFIX}eglibc"
 
+# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
+# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
+# ERROR: Function failed: split_and_strip_files
+DEPENDS_class-target = "virtual/${TARGET_PREFIX}binutils"
+
 # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
 # is set. The idea is to avoid running localedef on the target (at first boot)
 # to decrease initial boot time and avoid localedef being killed by the OOM