Patchwork valgrind: add powerpc to the compatible host and add eglibc-dbg in rdepends

login
register
mail settings
Submitter Zhenhua Luo
Date Dec. 28, 2011, 6:55 a.m.
Message ID <1325055308-17731-1-git-send-email-b19537@freescale.com>
Download mbox | patch
Permalink /patch/17689/
State Superseded
Headers show

Comments

Zhenhua Luo - Dec. 28, 2011, 6:55 a.m.
From: Zhenhua Luo <b19537@freescale.com>

    1. add powerpc into the compatible host list
    2. valgrind requires the non-stripped eglibc libraries, so add eglibc-dbg
       into RDEPENDS

Signed-off-by: Zhenhua Luo <b19537@freescale.com>
---
 meta/recipes-devtools/valgrind/valgrind_3.6.1.bb |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Paul Eggleton - Dec. 28, 2011, 9:14 a.m.
On Wednesday 28 December 2011 14:55:08 b19537@freescale.com wrote:
> +RDEPENDS += "eglibc-dbg"

So I might be completely off-base here having never tried it, but what if 
you're using uclibc?

Cheers,
Paul
Zhenhua Luo - Dec. 28, 2011, 10:01 a.m.
Hello Paul,

May I know what's the concern with eglibc instead of uclibc?


Best Regards,

Zhenhua


> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> Sent: Wednesday, December 28, 2011 5:15 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Luo Zhenhua-B19537
> Subject: Re: [OE-core] [PATCH oe-core] valgrind: add powerpc to the compatible
> host and add eglibc-dbg in rdepends
> 
> On Wednesday 28 December 2011 14:55:08 b19537@freescale.com wrote:
> > +RDEPENDS += "eglibc-dbg"
> 
> So I might be completely off-base here having never tried it, but what if you're
> using uclibc?
> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre
Paul Eggleton - Dec. 28, 2011, 10:18 a.m.
On Wednesday 28 December 2011 10:01:13 Luo Zhenhua-B19537 wrote:
> May I know what's the concern with eglibc instead of uclibc?

So my concern is, if you add a runtime dependency on eglibc-dbg to valgrind 
and you've selected uclibc instead, it will force installation of eglibc when 
you install valgrind (not to mention building it when you build valgrind); 
this is almost certainly not what you want.

If a dependency on the libc debug packages is really needed you could do 
something this instead:

RRECOMMENDS_${PN} += "${TCLIBC}-dbg"

(I suggest using RRECOMMENDS here rather than RDEPENDS in case here is no such 
debug package for the user's selected libc.)

Cheers,
Paul
Koen Kooi - Dec. 28, 2011, 10:32 a.m.
Op 28 dec. 2011, om 11:18 heeft Paul Eggleton het volgende geschreven:

> On Wednesday 28 December 2011 10:01:13 Luo Zhenhua-B19537 wrote:
>> May I know what's the concern with eglibc instead of uclibc?
> 
> So my concern is, if you add a runtime dependency on eglibc-dbg to valgrind 
> and you've selected uclibc instead, it will force installation of eglibc when 
> you install valgrind (not to mention building it when you build valgrind); 
> this is almost certainly not what you want.
> 
> If a dependency on the libc debug packages is really needed you could do 
> something this instead:
> 
> RRECOMMENDS_${PN} += "${TCLIBC}-dbg"

Or:

RECOMMENDS_libc-glibc = "glibc-dbg"

I'm not sure which one is better, but I wanted to point out the libc overrides :)

regards,

Koen
Martin Jansa - Dec. 28, 2011, 12:15 p.m.
On Wed, Dec 28, 2011 at 11:32:13AM +0100, Koen Kooi wrote:
> 
> Op 28 dec. 2011, om 11:18 heeft Paul Eggleton het volgende geschreven:
> 
> > On Wednesday 28 December 2011 10:01:13 Luo Zhenhua-B19537 wrote:
> >> May I know what's the concern with eglibc instead of uclibc?
> > 
> > So my concern is, if you add a runtime dependency on eglibc-dbg to valgrind 
> > and you've selected uclibc instead, it will force installation of eglibc when 
> > you install valgrind (not to mention building it when you build valgrind); 
> > this is almost certainly not what you want.
> > 
> > If a dependency on the libc debug packages is really needed you could do 
> > something this instead:
> > 
> > RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
> 
> Or:
> 
> RECOMMENDS_libc-glibc = "glibc-dbg"

with extra R and PN, right?
RRECOMMENDS_${PN}_libc-glibc = "glibc-dbg"

Regards,

> I'm not sure which one is better, but I wanted to point out the libc overrides :)
> 
> regards,
> 
> Koen



> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
McClintock Matthew-B29882 - Dec. 28, 2011, 7:16 p.m.
On Wed, Dec 28, 2011 at 6:15 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > If a dependency on the libc debug packages is really needed you could do
>> > something this instead:
>> >
>> > RRECOMMENDS_${PN} += "${TCLIBC}-dbg"

This seems better since it include uclibc if that was selected...

>>
>> Or:
>>
>> RECOMMENDS_libc-glibc = "glibc-dbg"
>
> with extra R and PN, right?
> RRECOMMENDS_${PN}_libc-glibc = "glibc-dbg"

This is only provided by eglibc now, so it leaves out uclibc... I think...


-M
Phil Blundell - Dec. 28, 2011, 8:20 p.m.
On Wed, 2011-12-28 at 09:14 +0000, Paul Eggleton wrote:
> On Wednesday 28 December 2011 14:55:08 b19537@freescale.com wrote:
> > +RDEPENDS += "eglibc-dbg"
> 
> So I might be completely off-base here having never tried it, but what if 
> you're using uclibc?

I don't really understand why valgrind is doing that at all.  Aside from
the missing _${PN} thing (which I think is a QA warning, which in turn
makes me wonder how well tested this really is) it seems as though the
libc debug symbols should be Suggests at most.  I don't think it's
reasonable to drag them in as a hard dependency for valgrind.

p.
Zhenhua Luo - Dec. 29, 2011, 2:19 a.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-
> core-bounces@lists.openembedded.org] On Behalf Of Phil Blundell
> Sent: Thursday, December 29, 2011 4:20 AM
> 
> On Wed, 2011-12-28 at 09:14 +0000, Paul Eggleton wrote:
> > On Wednesday 28 December 2011 14:55:08 b19537@freescale.com wrote:
> > > +RDEPENDS += "eglibc-dbg"
> >
> > So I might be completely off-base here having never tried it, but what
> > if you're using uclibc?
> 
> I don't really understand why valgrind is doing that at all.  
[Luo Zhenhua-B19537] The reason is that valgrind requires non-stripped libraries of glibc during running. 


Best Regards,

Zhenhua
Zhenhua Luo - Dec. 29, 2011, 2:20 a.m.
Thanks for the good suggestions, a new version will be submitted. 


Best Regards,

Zhenhua


> -----Original Message-----
> From: McClintock Matthew-B29882
> Sent: Thursday, December 29, 2011 3:39 AM
> To: Patches and discussions about the oe-core layer
> Cc: McClintock Matthew-B29882; Garg Vakul-B16394; Luo Zhenhua-B19537
> Subject: Re: [OE-core] [PATCH oe-core] valgrind: add powerpc to the compatible
> host and add eglibc-dbg in rdepends
> 
> On Wed, Dec 28, 2011 at 6:15 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> >> > If a dependency on the libc debug packages is really needed you
> >> > could do something this instead:
> >> >
> >> > RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
> 
> This seems better since it include uclibc if that was selected...
> 
> >>
> >> Or:
> >>
> >> RECOMMENDS_libc-glibc = "glibc-dbg"
> >
> > with extra R and PN, right?
> > RRECOMMENDS_${PN}_libc-glibc = "glibc-dbg"
> 
> This is only provided by eglibc now, so it leaves out uclibc... I think...
> 
> 
> -M
Phil Blundell - Jan. 3, 2012, 11:44 a.m.
On Thu, 2011-12-29 at 02:19 +0000, Luo Zhenhua-B19537 wrote:
> [Luo Zhenhua-B19537] The reason is that valgrind requires non-stripped libraries of glibc during running. 

What is the failure mode if you don't have them?

p.
McClintock Matthew-B29882 - Jan. 4, 2012, 4:07 a.m.
On Tue, Jan 3, 2012 at 9:52 PM, Garg Vakul-B16394 <B16394@freescale.com> wrote:
> Hi
>
> Valgrind's requirements from packaging are listed at:
>
> http://valgrind.org/docs/manual/dist.readme-packagers.html
>
> It recommends to have at least debuginfo pkg of ld.so installed.
> On some targets such as ppc32-linux and ppc64-linux, valgrind stops if it does not find debug symbols.

Would adding these packages to RDEPENDS_powerpc and RDEPENDS_powerpc64
be more the best solution then?

-M
McClintock Matthew-B29882 - Jan. 4, 2012, 4:26 a.m.
On Tue, Jan 3, 2012 at 10:16 PM, Garg Vakul-B16394 <B16394@freescale.com> wrote:
> Hi Matthew
>
> Are you proposing to add 'debuginfo pkg of ld.so'?

What provides ld.so? That package should provide a ${PKGNAME}-dbg
which contains the debug version. This work should already be done, in
theory at least. Unless I am missing something.

-M
McClintock Matthew-B29882 - Jan. 4, 2012, 4:39 a.m.
On Tue, Jan 3, 2012 at 10:31 PM, Garg Vakul-B16394 <B16394@freescale.com> wrote:
> Hi Matthew
>
> I am not sure if I understood your point fully.
>
> I am suggesting to do below mentioned as suggested on valgrind page.
> http://valgrind.org/docs/manual/dist.readme-packagers.html
>
>
> "If you don't want to leave symbols on ld.so, alternatively you can have your distro install ld.so's debuginfo package by default, or make ld.so.debuginfo be a requirement of your Valgrind RPM/DEB/whatever."

This is what I am suggest. If we include valgrind in an image and the
arch is powerpc or powerpc64, we need to include ld.so with debug
symbols by default. Otherwise valgrind will not work at all. This
seems like a reasonable thing to do for these two arches.

-M
Khem Raj - Jan. 4, 2012, 5:25 a.m.
On (04/01/12 04:39), McClintock Matthew-B29882 wrote:
> On Tue, Jan 3, 2012 at 10:31 PM, Garg Vakul-B16394 <B16394@freescale.com> wrote:
> > Hi Matthew
> >
> > I am not sure if I understood your point fully.
> >
> > I am suggesting to do below mentioned as suggested on valgrind page.
> > http://valgrind.org/docs/manual/dist.readme-packagers.html
> >
> >
> > "If you don't want to leave symbols on ld.so, alternatively you can have your distro install ld.so's debuginfo package by default, or make ld.so.debuginfo be a requirement of your Valgrind RPM/DEB/whatever."
> 
> This is what I am suggest. If we include valgrind in an image and the
> arch is powerpc or powerpc64, we need to include ld.so with debug
> symbols by default. Otherwise valgrind will not work at all. This
> seems like a reasonable thing to do for these two arches.

I think we might be evading the real issue here. Which symbols are
valgrind interested in ? is this something ppc specific or general
case. Are we stripping ld.so too much ?
some of the symbols are needed to be kept for ld.so for gdb to work
and I am guessing its similar kind of issue here. If you can figure
this then we may solve this issue by just not stripping needed symbols
Richard Purdie - Jan. 4, 2012, 3:38 p.m.
On Wed, 2012-01-04 at 04:39 +0000, McClintock Matthew-B29882 wrote:
> On Tue, Jan 3, 2012 at 10:31 PM, Garg Vakul-B16394 <B16394@freescale.com> wrote:
> > Hi Matthew
> >
> > I am not sure if I understood your point fully.
> >
> > I am suggesting to do below mentioned as suggested on valgrind page.
> > http://valgrind.org/docs/manual/dist.readme-packagers.html
> >
> >
> > "If you don't want to leave symbols on ld.so, alternatively you can
> have your distro install ld.so's debuginfo package by default, or make
> ld.so.debuginfo be a requirement of your Valgrind RPM/DEB/whatever."
> 
> This is what I am suggest. If we include valgrind in an image and the
> arch is powerpc or powerpc64, we need to include ld.so with debug
> symbols by default. Otherwise valgrind will not work at all. This
> seems like a reasonable thing to do for these two arches.

I think the RRECOMMENDS on ppc only is therefore the right solution for
now. 

There is perhaps a case here for splitting out the ld.so -dbg from the
rest of libc so the installation requirements aren't so large.

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.6.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.6.1.bb
index 021caa8..f3cf5b2 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.6.1.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.6.1.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
                     file://include/valgrind.h;beginline=1;endline=56;md5=13a71cedba99112334d8596162aec37e \
                     file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
 DEPENDS = "virtual/libx11"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 	   file://fix_issue_caused_by_ccache.patch \
@@ -17,7 +17,7 @@  SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "2c3aa122498baecc9d69194057ca88f5"
 SRC_URI[sha256sum] = "49bdcc4fbcf060049b5f0dcfd8a187a6e90e0b0e57309f633b64e44430726a0e"
 
-COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+COMPATIBLE_HOST = '(i.86|x86_64|powerpc|ppc|powerpc64|ppc64).*-linux'
 
 inherit autotools
 
@@ -26,3 +26,5 @@  EXTRA_OEMAKE = "-w"
 PARALLEL_MAKE = ""
 
 FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
+
+RDEPENDS += "eglibc-dbg"