All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Anatol Belski <anbelski@linux.microsoft.com>,
	openembedded-core <openembedded-core@lists.openembedded.org>
Cc: randy.macleod@windriver.com
Subject: Re: [OE-core] Current native SDK glibc compat
Date: Wed, 24 Feb 2021 16:49:56 +0000	[thread overview]
Message-ID: <e4561a7e8c89fe26dd593b0412e16be67665baff.camel@linuxfoundation.org> (raw)
In-Reply-To: <9a8cb006-e161-b402-d496-72a1c983e90a@linux.microsoft.com>

On Wed, 2021-02-24 at 13:56 +0100, Anatol Belski wrote:
> On 2/24/2021 1:32 PM, Richard Purdie wrote:
> > Hi,
> > 
> > On Wed, 2021-02-24 at 12:40 +0100, Anatol Belski wrote:
> > > the current master build seems to be broken with symbols unavailable
> > > from the host glibc. The following is to see on the SDK built and
> > > installed on the same host Ubuntu 18.04.5 having glibc 2.27:
> > > 
> > > $ . /tmp/poky-sdk-master-00/environment-setup-core2-64-poky-linux
> > > 
> > > $ ldd $(which $CC)
> > > /tmp/poky-sdk-master-00/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc:
> > > /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found
> > We change the loader path inside our SDK binaries so you can't trust the
> > output from ldd, it will find a different result to what you'd see
> > when you run the binary.
> > 
> > What issue are you seeing trying to run these?
> 
> Initially it was sighted here appearing when a binary is actually invoked:
> 
> https://github.com/meta-rust/meta-rust/pull/313#issuecomment-782784056
> 
> I went digging to see similar cases.
> 
> 
> Regarding the loader path, are you referring to this?
> 
> $ chrpath $(which $CC)
> /tmp/poky-sdk-master-00/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc: 
> RPATH=$ORIGIN/../../lib

No, I mean the dynamic loader pointer.

$ tmp/sysroots-uninative/x86_64-linux/usr/bin/patchelf-uninative python3-native/python3.9 --print-interpreter
[...]tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2

Above I'm showing that a native binary in the build (python3-native)
has the interpreter (dynamic loader) set to our uninative ld.so.
The SDK is similar.

> As the binary where the issue was sighted has this
> 
> $ chrpath $(which cargo)
> /tmp/rust-sdk-deploy-18/sysroots/x86_64-pokysdk-linux/usr/bin/cargo: 
> RUNPATH=$ORIGIN/../lib
> 
> 
> but then, the DSOs have no rpath set, eg.
> 
> $ chrpath 
> /tmp/rust-sdk-deploy-18/sysroots/x86_64-pokysdk-linux/usr/bin/../lib/libcrypto.so.1.1
> /tmp/rust-sdk-deploy-18/sysroots/x86_64-pokysdk-linux/usr/bin/../lib/libcrypto.so.1.1: 
> no rpath or runpath tag found.
> 
> 
> so it might lead to the interferrence with the host. Does it perhaps 
> need both $ORIGIN/../../lib and $ORIGIN/../lib if binaries are in /usr ?

Our dynamic loader knows how to use the specific sysroot and then 
fall back to /usr and /lib.

Cheers,

Richard



  reply	other threads:[~2021-02-24 16:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 11:40 Current native SDK glibc compat Anatol Belski
2021-02-24 12:32 ` [OE-core] " Richard Purdie
2021-02-24 12:56   ` Anatol Belski
2021-02-24 16:49     ` Richard Purdie [this message]
2021-02-24 20:16       ` Anatol Belski
2021-02-24 23:57         ` Richard Purdie
2021-02-25  0:23           ` Randy MacLeod
2021-02-25 19:22             ` Anatol Belski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4561a7e8c89fe26dd593b0412e16be67665baff.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=anbelski@linux.microsoft.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=randy.macleod@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.