[yocto] btrfs-tools Requires libgcc_s.so.1

robert_joslyn at selinc.com robert_joslyn at selinc.com
Thu Mar 8 13:30:28 PST 2018


"Marcelo E. Magallon" <marcelo.magallon at hpe.com> wrote on 03/08/2018 
01:00:28 PM:

> From: "Marcelo E. Magallon" <marcelo.magallon at hpe.com>
> To: <robert_joslyn at selinc.com>, 
> Cc: "yocto at yoctoproject.org" <yocto at yoctoproject.org>
> Date: 03/08/2018 01:01 PM
> Subject: Re: [yocto] btrfs-tools Requires libgcc_s.so.1
> 
> Sorry to go off on a tangent:
> 
> On Fri, Mar 04, 2016 at 04:12:54PM -0800, robert_joslyn at selinc.com 
wrote:
> 
> >> > root at test:~# btrfs scrub start /
> >> > scrub started on /, fsid 79dc4fed-a0f7-43e2-b9e7-056b1a2c4cdd
> >(pid=333)
> >> > libgcc_s.so.1 must be installed for pthread_cancel to work
> >> >
> >> > I can solve this by adding libgcc to RDEPENDS for btrfs-tools.
> 
> I ran into the same thing with my device, different package. I 
> don't understand the fix:
> 
> >Signed-off-by: Robert Joslyn <robert_joslyn at selinc.com>
> >---
> >diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
> >b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
> >index 37c622b..cc2ccfc 100644
> >--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
> >+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
> >@@ -11,6 +11,7 @@ LICENSE = "GPLv2"
> > LIC_FILES_CHKSUM = "
file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
> > SECTION = "base"
> > DEPENDS = "util-linux attr e2fsprogs lzo acl"
> >+RDEPENDS_${PN} = "libgcc"
> 
> What is this doing?
> 
> My understanding until a couple of days ago is that this will 
> simply pull the "libgcc" package into the image, add a dependency 
> in the binary package and NOTHING more. It won't change the way 
> binaries are linked, it won't change flags passed to the 
> compiler, etc.

Your understanding is basically correct, RDEPENDS specifies a runtime 
dependency. For btrfs-tools, it doesn't change the build, it simply makes 
sure that the libgcc package is installed on the target if btrfs-tools is 
also installed on the target. If there is more going on with RDEPENDS 
besides the final rpm/ipk/deb packaging, someone with more bitbake 
knowledge will have to provide more information.

> I'm confused because in my case libgcc_s.so.1 is already in the 
> image, before this change, but this change seems to be fixing the 
> issue, and I don't understand why.

In the case of btrfs-tools, it was simply that it needed libgcc_s.so.1 at 
runtime on the target, which my patch fixed. For me, the image I was 
building normally worked fine because some other package would pull in 
libgcc, but when testing on a minimal image, I would get that error. I'm 
not sure about your specific case. If you do have libgcc on the target, an 
application that needs it doesn't really care what package pulled it into 
the image, all that matters is that it's installed.

Robert

> 
> Any clues?
> 
> Thanks!
> 
> Marcelo



More information about the yocto mailing list