All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] glibc: Fix ldd bug: not a dynamic executable error
@ 2018-08-21 14:58 Ricardo Ribalda Delgado
  2018-08-22 12:45 ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-21 14:58 UTC (permalink / raw)
  To: openembedded-core, Khem Raj, richard.purdie

RTLDLIST table does not include /lib/ld-linux-x86-64.so.2, resulting
on the following error:

root@qt5122:~# ldd ./qtec_webcam
not a dynamic executable

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 .../glibc/glibc/0031-ldd-rewrite.patch        | 22 +++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-rewrite.patch

diff --git a/meta/recipes-core/glibc/glibc/0031-ldd-rewrite.patch b/meta/recipes-core/glibc/glibc/0031-ldd-rewrite.patch
new file mode 100644
index 0000000000..5c375997da
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0031-ldd-rewrite.patch
@@ -0,0 +1,22 @@
+From: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+Subject: Fix not a dynamic executable error on X86_64
+
+RTLDLIST table does not include /lib/ld-linux-x86-64.so.2, resulting
+on the following error:
+
+root@qt5122:~# ldd ./qtec_webcam
+not a dynamic executable
+
+
+Upstream-Status: Inappropriate  [OE-Specific]
+
+Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+diff --git a/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
+index 44d76e8aa1..611efd56b0 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
++++ b/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
+@@ -1,3 +1,3 @@
+ /LD_TRACE_LOADED_OBJECTS=1/a\
+ add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
+-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
++s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
diff --git a/meta/recipes-core/glibc/glibc_2.28.bb b/meta/recipes-core/glibc/glibc_2.28.bb
index 0ebbaf9610..a968c86214 100644
--- a/meta/recipes-core/glibc/glibc_2.28.bb
+++ b/meta/recipes-core/glibc/glibc_2.28.bb
@@ -45,6 +45,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
            file://0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
            file://0030-intl-Emit-no-lines-in-bison-generated-files.patch \
+           file://0031-ldd-rewrite.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-21 14:58 [PATCH] glibc: Fix ldd bug: not a dynamic executable error Ricardo Ribalda Delgado
@ 2018-08-22 12:45 ` richard.purdie
  2018-08-22 12:48   ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: richard.purdie @ 2018-08-22 12:45 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado, openembedded-core, Khem Raj

On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado wrote:
> RTLDLIST table does not include /lib/ld-linux-x86-64.so.2, resulting
> on the following error:
> 
> root@qt5122:~# ldd ./qtec_webcam
> not a dynamic executable
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> +++++++++++++++++++
>  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
>  2 files changed, 23 insertions(+)
>  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> rewrite.patch

I'm a bit confused as with MACHINE=qemux86-64, building core-image-sato 
with ldd added to IMAGE_INSTALL, ldd works correctly even though it has
/lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).

We have an automated QA test checking this too:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtime/cases/ldd.py

Which version of the project are you using? How would we reproduce the
issue?

Regards,

Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 12:45 ` richard.purdie
@ 2018-08-22 12:48   ` Ricardo Ribalda Delgado
  2018-08-22 13:00     ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 12:48 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hi Richard


On Wed, Aug 22, 2018 at 2:45 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado wrote:
> > RTLDLIST table does not include /lib/ld-linux-x86-64.so.2, resulting
> > on the following error:
> >
> > root@qt5122:~# ldd ./qtec_webcam
> > not a dynamic executable
> >
> > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> > ---
> >  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> > +++++++++++++++++++
> >  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
> >  2 files changed, 23 insertions(+)
> >  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> > rewrite.patch
>
> I'm a bit confused as with MACHINE=qemux86-64, building core-image-sato
> with ldd added to IMAGE_INSTALL, ldd works correctly even though it has
> /lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).
>
> We have an automated QA test checking this too:
>
> http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtime/cases/ldd.py
>
> Which version of the project are you using? How would we reproduce the
> issue?
>

I am using yocto-sumo

Maybe your tests are run agains an image that has the package lsb
installed. Which creates symbolic links to the standard locations


> Regards,
>
> Richard



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 12:48   ` Ricardo Ribalda Delgado
@ 2018-08-22 13:00     ` richard.purdie
  2018-08-22 13:02       ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: richard.purdie @ 2018-08-22 13:00 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, 2018-08-22 at 14:48 +0200, Ricardo Ribalda Delgado wrote:
> On Wed, Aug 22, 2018 at 2:45 PM <richard.purdie@linuxfoundation.org>
> wrote:
> > 
> > On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado wrote:
> > > RTLDLIST table does not include /lib/ld-linux-x86-64.so.2,
> > > resulting
> > > on the following error:
> > > 
> > > root@qt5122:~# ldd ./qtec_webcam
> > > not a dynamic executable
> > > 
> > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com
> > > >
> > > ---
> > >  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> > > +++++++++++++++++++
> > >  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
> > >  2 files changed, 23 insertions(+)
> > >  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> > > rewrite.patch
> > 
> > I'm a bit confused as with MACHINE=qemux86-64, building core-image-
> > sato
> > with ldd added to IMAGE_INSTALL, ldd works correctly even though it
> > has
> > /lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).
> > 
> > We have an automated QA test checking this too:
> > 
> > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtim
> > e/cases/ldd.py
> > 
> > Which version of the project are you using? How would we reproduce
> > the
> > issue?
> 
> I am using yocto-sumo

I'm not aware of any fixes since sumo in this area...

> Maybe your tests are run agains an image that has the package lsb
> installed. Which creates symbolic links to the standard locations

There is no /lib64 in the image and I'm not using or installing lsb...

There is significant rewriting done as part of:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/glibc/glibc-ld.inc

What value of RTLDLIST is your build showing?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:00     ` richard.purdie
@ 2018-08-22 13:02       ` Ricardo Ribalda Delgado
  2018-08-22 13:05         ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 13:02 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Wed, Aug 22, 2018 at 3:00 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 14:48 +0200, Ricardo Ribalda Delgado wrote:
> > On Wed, Aug 22, 2018 at 2:45 PM <richard.purdie@linuxfoundation.org>
> > wrote:
> > >
> > > On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado wrote:
> > > > RTLDLIST table does not include /lib/ld-linux-x86-64.so.2,
> > > > resulting
> > > > on the following error:
> > > >
> > > > root@qt5122:~# ldd ./qtec_webcam
> > > > not a dynamic executable
> > > >
> > > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com
> > > > >
> > > > ---
> > > >  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> > > > +++++++++++++++++++
> > > >  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
> > > >  2 files changed, 23 insertions(+)
> > > >  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> > > > rewrite.patch
> > >
> > > I'm a bit confused as with MACHINE=qemux86-64, building core-image-
> > > sato
> > > with ldd added to IMAGE_INSTALL, ldd works correctly even though it
> > > has
> > > /lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).
> > >
> > > We have an automated QA test checking this too:
> > >
> > > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtim
> > > e/cases/ldd.py
> > >
> > > Which version of the project are you using? How would we reproduce
> > > the
> > > issue?
> >
> > I am using yocto-sumo
>
> I'm not aware of any fixes since sumo in this area...
>
> > Maybe your tests are run agains an image that has the package lsb
> > installed. Which creates symbolic links to the standard locations
>
> There is no /lib64 in the image and I'm not using or installing lsb...
>
> There is significant rewriting done as part of:
>
> http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/glibc/glibc-ld.inc
>
> What value of RTLDLIST is your build showing?

RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
/libx32/ld-linux-x32.so.2"

>
> Cheers,
>
> Richard
>


-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:02       ` Ricardo Ribalda Delgado
@ 2018-08-22 13:05         ` richard.purdie
  2018-08-22 13:13           ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: richard.purdie @ 2018-08-22 13:05 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, 2018-08-22 at 15:02 +0200, Ricardo Ribalda Delgado wrote:
> On Wed, Aug 22, 2018 at 3:00 PM <richard.purdie@linuxfoundation.org>
> wrote:
> > 
> > On Wed, 2018-08-22 at 14:48 +0200, Ricardo Ribalda Delgado wrote:
> > > On Wed, Aug 22, 2018 at 2:45 PM <richard.purdie@linuxfoundation.o
> > > rg>
> > > wrote:
> > > > 
> > > > On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado
> > > > wrote:
> > > > > RTLDLIST table does not include /lib/ld-linux-x86-64.so.2,
> > > > > resulting
> > > > > on the following error:
> > > > > 
> > > > > root@qt5122:~# ldd ./qtec_webcam
> > > > > not a dynamic executable
> > > > > 
> > > > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail
> > > > > .com
> > > > > > 
> > > > > 
> > > > > ---
> > > > >  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> > > > > +++++++++++++++++++
> > > > >  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
> > > > >  2 files changed, 23 insertions(+)
> > > > >  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> > > > > rewrite.patch
> > > > 
> > > > I'm a bit confused as with MACHINE=qemux86-64, building core-
> > > > image-
> > > > sato
> > > > with ldd added to IMAGE_INSTALL, ldd works correctly even
> > > > though it
> > > > has
> > > > /lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).
> > > > 
> > > > We have an automated QA test checking this too:
> > > > 
> > > > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/ru
> > > > ntim
> > > > e/cases/ldd.py
> > > > 
> > > > Which version of the project are you using? How would we
> > > > reproduce
> > > > the
> > > > issue?
> > > 
> > > I am using yocto-sumo
> > 
> > I'm not aware of any fixes since sumo in this area...
> > 
> > > Maybe your tests are run agains an image that has the package lsb
> > > installed. Which creates symbolic links to the standard locations
> > 
> > There is no /lib64 in the image and I'm not using or installing
> > lsb...
> > 
> > There is significant rewriting done as part of:
> > 
> > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/gl
> > ibc/glibc-ld.inc
> > 
> > What value of RTLDLIST is your build showing?
> 
> RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> /libx32/ld-linux-x32.so.2"

Here I see:

$ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
RTLDLIST="/lib/ld-linux-x86-64.so.2"

Not sure why its different without looking at the code but its
something to look into...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:05         ` richard.purdie
@ 2018-08-22 13:13           ` Ricardo Ribalda Delgado
  2018-08-22 13:21             ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 13:13 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

HI Richard

On Wed, Aug 22, 2018 at 3:05 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 15:02 +0200, Ricardo Ribalda Delgado wrote:
> > On Wed, Aug 22, 2018 at 3:00 PM <richard.purdie@linuxfoundation.org>
> > wrote:
> > >
> > > On Wed, 2018-08-22 at 14:48 +0200, Ricardo Ribalda Delgado wrote:
> > > > On Wed, Aug 22, 2018 at 2:45 PM <richard.purdie@linuxfoundation.o
> > > > rg>
> > > > wrote:
> > > > >
> > > > > On Tue, 2018-08-21 at 16:58 +0200, Ricardo Ribalda Delgado
> > > > > wrote:
> > > > > > RTLDLIST table does not include /lib/ld-linux-x86-64.so.2,
> > > > > > resulting
> > > > > > on the following error:
> > > > > >
> > > > > > root@qt5122:~# ldd ./qtec_webcam
> > > > > > not a dynamic executable
> > > > > >
> > > > > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail
> > > > > > .com
> > > > > > >
> > > > > >
> > > > > > ---
> > > > > >  .../glibc/glibc/0031-ldd-rewrite.patch        | 22
> > > > > > +++++++++++++++++++
> > > > > >  meta/recipes-core/glibc/glibc_2.28.bb         |  1 +
> > > > > >  2 files changed, 23 insertions(+)
> > > > > >  create mode 100644 meta/recipes-core/glibc/glibc/0031-ldd-
> > > > > > rewrite.patch
> > > > >
> > > > > I'm a bit confused as with MACHINE=qemux86-64, building core-
> > > > > image-
> > > > > sato
> > > > > with ldd added to IMAGE_INSTALL, ldd works correctly even
> > > > > though it
> > > > > has
> > > > > /lib/ld-linux-x86-64.so.2 (which is listed in RTLDLIST).
> > > > >
> > > > > We have an automated QA test checking this too:
> > > > >
> > > > > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/ru
> > > > > ntim
> > > > > e/cases/ldd.py
> > > > >
> > > > > Which version of the project are you using? How would we
> > > > > reproduce
> > > > > the
> > > > > issue?
> > > >
> > > > I am using yocto-sumo
> > >
> > > I'm not aware of any fixes since sumo in this area...
> > >
> > > > Maybe your tests are run agains an image that has the package lsb
> > > > installed. Which creates symbolic links to the standard locations
> > >
> > > There is no /lib64 in the image and I'm not using or installing
> > > lsb...
> > >
> > > There is significant rewriting done as part of:
> > >
> > > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/gl
> > > ibc/glibc-ld.inc
> > >
> > > What value of RTLDLIST is your build showing?
> >
> > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > /libx32/ld-linux-x32.so.2"
>
> Here I see:
>
> $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> RTLDLIST="/lib/ld-linux-x86-64.so.2"

The output of RTLDLIST that I shared was from
root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
/libx32/ld-linux-x32.so.2"

If I run your command

pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep ^RTLDLIST=
RTLDLIST=""

If we look at log.do_compile we can see how the the value from ldd is rewritten:

LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html>|g' -e
's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%g' <
ldd.bash.in | LC_ALL=C sed -f
../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
/workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-x86_64-poky-linux/elf/ldd.new

cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
/LD_TRACE_LOADED_OBJECTS=1/a\
add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[
]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_

which basically converts
/lib/ld-linux-x86-64.so.2
 into:
 /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2

I agree that this bug is too obvious for not being noticed for a long
time. At least I use ldd a lot when thing fails ;)

Cheers

>
> Not sure why its different without looking at the code but its
> something to look into...
>
> Cheers,
>
> Richard



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:13           ` Ricardo Ribalda Delgado
@ 2018-08-22 13:21             ` richard.purdie
  2018-08-22 13:28               ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: richard.purdie @ 2018-08-22 13:21 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, 2018-08-22 at 15:13 +0200, Ricardo Ribalda Delgado wrote:
> > Here I see:
> > 
> > $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> 
> The output of RTLDLIST that I shared was from
> root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
> RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> /libx32/ld-linux-x32.so.2"
> 
> If I run your command
> 
> pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep
> ^RTLDLIST=
> RTLDLIST=""
> 
> If we look at log.do_compile we can see how the the value from ldd is
> rewritten:
> 
> LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
> 's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
> 's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html>|g'
> -e
> 's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%g' <
> ldd.bash.in | LC_ALL=C sed -f
> ../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
> /workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-x86_64-
> poky-linux/elf/ldd.new
> 
> cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> /LD_TRACE_LOADED_OBJECTS=1/a\
> add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
> s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-
> x32\)\(\.so\.[0-9.]*\)[
> ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
> 
> which basically converts
> /lib/ld-linux-x86-64.so.2
>  into:
>  /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-
> x32.so.2
> 
> I agree that this bug is too obvious for not being noticed for a long
> time. At least I use ldd a lot when thing fails ;)

If you look at glibc_2.28.bb, it rewrites RTLDLIST if the value passed
in is not empty. Yours is empty, the question is therefore why.

Can you add -C10 to the command and see the variable history, here its:

# $RTLDLIST [2 operations]
#   set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:46
#     "${@glibc_dl_info(d)['lddrewrite']}"
#   override[class-nativesdk]:set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:47
#     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
# pre-expansion value:
#   "${@glibc_dl_info(d)['lddrewrite']}"
RTLDLIST="/lib/ld-linux-x86-64.so.2"

Cheers,

Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:21             ` richard.purdie
@ 2018-08-22 13:28               ` Ricardo Ribalda Delgado
  2018-08-22 13:33                 ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 13:28 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Wed, Aug 22, 2018 at 3:21 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 15:13 +0200, Ricardo Ribalda Delgado wrote:
> > > Here I see:
> > >
> > > $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> >
> > The output of RTLDLIST that I shared was from
> > root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
> > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > /libx32/ld-linux-x32.so.2"
> >
> > If I run your command
> >
> > pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep
> > ^RTLDLIST=
> > RTLDLIST=""
> >
> > If we look at log.do_compile we can see how the the value from ldd is
> > rewritten:
> >
> > LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
> > 's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
> > 's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html>|g'
> > -e
> > 's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%g' <
> > ldd.bash.in | LC_ALL=C sed -f
> > ../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
> > /workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-x86_64-
> > poky-linux/elf/ldd.new
> >
> > cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> > /LD_TRACE_LOADED_OBJECTS=1/a\
> > add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
> > s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-
> > x32\)\(\.so\.[0-9.]*\)[
> > ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
> >
> > which basically converts
> > /lib/ld-linux-x86-64.so.2
> >  into:
> >  /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-
> > x32.so.2
> >
> > I agree that this bug is too obvious for not being noticed for a long
> > time. At least I use ldd a lot when thing fails ;)
>
> If you look at glibc_2.28.bb, it rewrites RTLDLIST if the value passed
> in is not empty. Yours is empty, the question is therefore why.
>
> Can you add -C10 to the command and see the variable history, here its:
>
> # $RTLDLIST [2 operations]
> #   set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:46
> #     "${@glibc_dl_info(d)['lddrewrite']}"
> #   override[class-nativesdk]:set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> # pre-expansion value:
> #   "${@glibc_dl_info(d)['lddrewrite']}"
> RTLDLIST="/lib/ld-linux-x86-64.so.2"
>


# $RTLDLIST [2 operations]
#   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:46
#     "${@glibc_dl_info(d)['lddrewrite']}"
#   override[class-nativesdk]:set
/workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
#     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
# pre-expansion value:
#   "${@glibc_dl_info(d)['lddrewrite']}"
RTLDLIST=""
#

# $RTLDLIST_class-nativesdk
#   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
#     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
RTLDLIST_class-nativesdk="/lib/ld-linux-x86-64.so.2"


I have just upgraded my work build to 19.0.1 / 2.5.1 Let me build ldd
again to see if the problem still persists

> Cheers,
>
> Richard



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:28               ` Ricardo Ribalda Delgado
@ 2018-08-22 13:33                 ` Ricardo Ribalda Delgado
  2018-08-22 13:37                   ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 13:33 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hello
On Wed, Aug 22, 2018 at 3:28 PM Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
>
> On Wed, Aug 22, 2018 at 3:21 PM <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Wed, 2018-08-22 at 15:13 +0200, Ricardo Ribalda Delgado wrote:
> > > > Here I see:
> > > >
> > > > $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> > > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> > >
> > > The output of RTLDLIST that I shared was from
> > > root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
> > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > /libx32/ld-linux-x32.so.2"
> > >
> > > If I run your command
> > >
> > > pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep
> > > ^RTLDLIST=
> > > RTLDLIST=""
> > >
> > > If we look at log.do_compile we can see how the the value from ldd is
> > > rewritten:
> > >
> > > LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
> > > 's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
> > > 's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html>|g'
> > > -e
> > > 's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%g' <
> > > ldd.bash.in | LC_ALL=C sed -f
> > > ../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
> > > /workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-x86_64-
> > > poky-linux/elf/ldd.new
> > >
> > > cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> > > /LD_TRACE_LOADED_OBJECTS=1/a\
> > > add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
> > > s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-
> > > x32\)\(\.so\.[0-9.]*\)[
> > > ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
> > >
> > > which basically converts
> > > /lib/ld-linux-x86-64.so.2
> > >  into:
> > >  /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-
> > > x32.so.2
> > >
> > > I agree that this bug is too obvious for not being noticed for a long
> > > time. At least I use ldd a lot when thing fails ;)
> >
> > If you look at glibc_2.28.bb, it rewrites RTLDLIST if the value passed
> > in is not empty. Yours is empty, the question is therefore why.
> >
> > Can you add -C10 to the command and see the variable history, here its:
> >
> > # $RTLDLIST [2 operations]
> > #   set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:46
> > #     "${@glibc_dl_info(d)['lddrewrite']}"
> > #   override[class-nativesdk]:set /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > # pre-expansion value:
> > #   "${@glibc_dl_info(d)['lddrewrite']}"
> > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> >
>
>
> # $RTLDLIST [2 operations]
> #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:46
> #     "${@glibc_dl_info(d)['lddrewrite']}"
> #   override[class-nativesdk]:set
> /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> # pre-expansion value:
> #   "${@glibc_dl_info(d)['lddrewrite']}"
> RTLDLIST=""
> #
>
> # $RTLDLIST_class-nativesdk
> #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> RTLDLIST_class-nativesdk="/lib/ld-linux-x86-64.so.2"
>
>
> I have just upgraded my work build to 19.0.1 / 2.5.1 Let me build ldd
> again to see if the problem still persists

19.0.1 gives the same results as 19.0.0


RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
/libx32/ld-linux-x32.so.


> > Cheers,
> >
> > Richard
>
>
>
> --
> Ricardo Ribalda



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:33                 ` Ricardo Ribalda Delgado
@ 2018-08-22 13:37                   ` richard.purdie
  2018-08-22 13:39                     ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 15+ messages in thread
From: richard.purdie @ 2018-08-22 13:37 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, 2018-08-22 at 15:33 +0200, Ricardo Ribalda Delgado wrote:
> Hello
> On Wed, Aug 22, 2018 at 3:28 PM Ricardo Ribalda Delgado
> <ricardo.ribalda@gmail.com> wrote:
> > 
> > On Wed, Aug 22, 2018 at 3:21 PM <richard.purdie@linuxfoundation.org
> > > wrote:
> > > 
> > > On Wed, 2018-08-22 at 15:13 +0200, Ricardo Ribalda Delgado wrote:
> > > > > Here I see:
> > > > > 
> > > > > $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> > > > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> > > > 
> > > > The output of RTLDLIST that I shared was from
> > > > root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
> > > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > > /libx32/ld-linux-x32.so.2"
> > > > 
> > > > If I run your command
> > > > 
> > > > pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep
> > > > ^RTLDLIST=
> > > > RTLDLIST=""
> > > > 
> > > > If we look at log.do_compile we can see how the the value from
> > > > ldd is
> > > > rewritten:
> > > > 
> > > > LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
> > > > 's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
> > > > 's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html
> > > > >|g'
> > > > -e
> > > > 's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%
> > > > g' <
> > > > ldd.bash.in | LC_ALL=C sed -f
> > > > ../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
> > > > /workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-
> > > > x86_64-
> > > > poky-linux/elf/ldd.new
> > > > 
> > > > cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> > > > /LD_TRACE_LOADED_OBJECTS=1/a\
> > > > add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
> > > > s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-
> > > > x32\)\(\.so\.[0-9.]*\)[
> > > > ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
> > > > 
> > > > which basically converts
> > > > /lib/ld-linux-x86-64.so.2
> > > >  into:
> > > >  /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-
> > > > linux-
> > > > x32.so.2
> > > > 
> > > > I agree that this bug is too obvious for not being noticed for
> > > > a long
> > > > time. At least I use ldd a lot when thing fails ;)
> > > 
> > > If you look at glibc_2.28.bb, it rewrites RTLDLIST if the value
> > > passed
> > > in is not empty. Yours is empty, the question is therefore why.
> > > 
> > > Can you add -C10 to the command and see the variable history,
> > > here its:
> > > 
> > > # $RTLDLIST [2 operations]
> > > #   set /media/build3/poky/meta/recipes-core/glibc/glibc-
> > > ld.inc:46
> > > #     "${@glibc_dl_info(d)['lddrewrite']}"
> > > #   override[class-nativesdk]:set
> > > /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > > # pre-expansion value:
> > > #   "${@glibc_dl_info(d)['lddrewrite']}"
> > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> > > 
> > 
> > 
> > # $RTLDLIST [2 operations]
> > #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:46
> > #     "${@glibc_dl_info(d)['lddrewrite']}"
> > #   override[class-nativesdk]:set
> > /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > # pre-expansion value:
> > #   "${@glibc_dl_info(d)['lddrewrite']}"
> > RTLDLIST=""
> > #
> > 
> > # $RTLDLIST_class-nativesdk
> > #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > RTLDLIST_class-nativesdk="/lib/ld-linux-x86-64.so.2"
> > 
> > 
> > I have just upgraded my work build to 19.0.1 / 2.5.1 Let me build
> > ldd
> > again to see if the problem still persists
> 
> 19.0.1 gives the same results as 19.0.0
> 
> 
> RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> /libx32/ld-linux-x32.so.

I just looked at what the function is doing and its broken. What is
DEFAULTTUNE set to in your build?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:37                   ` richard.purdie
@ 2018-08-22 13:39                     ` Ricardo Ribalda Delgado
  2018-08-22 14:56                       ` richard.purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-22 13:39 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hi


On Wed, Aug 22, 2018 at 3:37 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 15:33 +0200, Ricardo Ribalda Delgado wrote:
> > Hello
> > On Wed, Aug 22, 2018 at 3:28 PM Ricardo Ribalda Delgado
> > <ricardo.ribalda@gmail.com> wrote:
> > >
> > > On Wed, Aug 22, 2018 at 3:21 PM <richard.purdie@linuxfoundation.org
> > > > wrote:
> > > >
> > > > On Wed, 2018-08-22 at 15:13 +0200, Ricardo Ribalda Delgado wrote:
> > > > > > Here I see:
> > > > > >
> > > > > > $ MACHINE=qemux86-64 bitbake glibc -e | grep ^RTLDLIST=
> > > > > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> > > > >
> > > > > The output of RTLDLIST that I shared was from
> > > > > root@qt5122:~# cat /usr/bin/ldd | grep ^RTLD
> > > > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > > > /libx32/ld-linux-x32.so.2"
> > > > >
> > > > > If I run your command
> > > > >
> > > > > pokyuser@c10753884d1a:/workdir/build$ bitbake glibc -e | grep
> > > > > ^RTLDLIST=
> > > > > RTLDLIST=""
> > > > >
> > > > > If we look at log.do_compile we can see how the the value from
> > > > > ldd is
> > > > > rewritten:
> > > > >
> > > > > LC_ALL=C sed -e 's%@RTLD@%/lib/ld-linux-x86-64.so.2%g' -e
> > > > > 's%@VERSION@%2.27%g' -e 's|@PKGVERSION@|(GNU libc) |g' -e
> > > > > 's|@REPORT_BUGS_TO@|<http://www.gnu.org/software/libc/bugs.html
> > > > > >|g'
> > > > > -e
> > > > > 's%@BASH@%/bin/bash%g' -e 's%@TEXTDOMAINDIR@%/usr/share/locale%
> > > > > g' <
> > > > > ldd.bash.in | LC_ALL=C sed -f
> > > > > ../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed >
> > > > > /workdir/build/tmp/work/dbfp4-poky-linux/glibc/2.27-r0/build-
> > > > > x86_64-
> > > > > poky-linux/elf/ldd.new
> > > > >
> > > > > cat git/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> > > > > /LD_TRACE_LOADED_OBJECTS=1/a\
> > > > > add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
> > > > > s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-
> > > > > x32\)\(\.so\.[0-9.]*\)[
> > > > > ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6 \2\3\4\5\6"_
> > > > >
> > > > > which basically converts
> > > > > /lib/ld-linux-x86-64.so.2
> > > > >  into:
> > > > >  /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-
> > > > > linux-
> > > > > x32.so.2
> > > > >
> > > > > I agree that this bug is too obvious for not being noticed for
> > > > > a long
> > > > > time. At least I use ldd a lot when thing fails ;)
> > > >
> > > > If you look at glibc_2.28.bb, it rewrites RTLDLIST if the value
> > > > passed
> > > > in is not empty. Yours is empty, the question is therefore why.
> > > >
> > > > Can you add -C10 to the command and see the variable history,
> > > > here its:
> > > >
> > > > # $RTLDLIST [2 operations]
> > > > #   set /media/build3/poky/meta/recipes-core/glibc/glibc-
> > > > ld.inc:46
> > > > #     "${@glibc_dl_info(d)['lddrewrite']}"
> > > > #   override[class-nativesdk]:set
> > > > /media/build3/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > > > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > > > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > > > # pre-expansion value:
> > > > #   "${@glibc_dl_info(d)['lddrewrite']}"
> > > > RTLDLIST="/lib/ld-linux-x86-64.so.2"
> > > >
> > >
> > >
> > > # $RTLDLIST [2 operations]
> > > #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:46
> > > #     "${@glibc_dl_info(d)['lddrewrite']}"
> > > #   override[class-nativesdk]:set
> > > /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > > # pre-expansion value:
> > > #   "${@glibc_dl_info(d)['lddrewrite']}"
> > > RTLDLIST=""
> > > #
> > >
> > > # $RTLDLIST_class-nativesdk
> > > #   set /workdir/repo/poky/meta/recipes-core/glibc/glibc-ld.inc:47
> > > #     "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64',
> > > 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
> > > RTLDLIST_class-nativesdk="/lib/ld-linux-x86-64.so.2"
> > >
> > >
> > > I have just upgraded my work build to 19.0.1 / 2.5.1 Let me build
> > > ldd
> > > again to see if the problem still persists
> >
> > 19.0.1 gives the same results as 19.0.0
> >
> >
> > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > /libx32/ld-linux-x32.so.
>
> I just looked at what the function is doing and its broken. What is
> DEFAULTTUNE set to in your build?

DEFAULTTUNE="dbfp4"

>
> Cheers,
>
> Richard



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 13:39                     ` Ricardo Ribalda Delgado
@ 2018-08-22 14:56                       ` richard.purdie
  2018-08-22 15:42                         ` Khem Raj
  2018-08-23  7:02                         ` Ricardo Ribalda Delgado
  0 siblings, 2 replies; 15+ messages in thread
From: richard.purdie @ 2018-08-22 14:56 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, 2018-08-22 at 15:39 +0200, Ricardo Ribalda Delgado wrote:
> On Wed, Aug 22, 2018 at 3:37 PM <richard.purdie@linuxfoundation.org>
> wrote:
> > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > /libx32/ld-linux-x32.so.
> > 
> > I just looked at what the function is doing and its broken. What is
> > DEFAULTTUNE set to in your build?
> 
> DEFAULTTUNE="dbfp4"

As I suspected.

Try applying:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=d69f0127b44a5216dd21ad972d6f2b2e4cda6d13

and 

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=95aa56ae11852c100be68d13aaffa9c83273b46b

and then seen if that fixes things.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 14:56                       ` richard.purdie
@ 2018-08-22 15:42                         ` Khem Raj
  2018-08-23  7:02                         ` Ricardo Ribalda Delgado
  1 sibling, 0 replies; 15+ messages in thread
From: Khem Raj @ 2018-08-22 15:42 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Wed, Aug 22, 2018 at 7:57 AM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 15:39 +0200, Ricardo Ribalda Delgado wrote:
> > On Wed, Aug 22, 2018 at 3:37 PM <richard.purdie@linuxfoundation.org>
> > wrote:
> > > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > > /libx32/ld-linux-x32.so.
> > >
> > > I just looked at what the function is doing and its broken. What is
> > > DEFAULTTUNE set to in your build?
> >
> > DEFAULTTUNE="dbfp4"
>
> As I suspected.
>
> Try applying:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=d69f0127b44a5216dd21ad972d6f2b2e4cda6d13
>

this makes it a lot better thanks for doing it. Perhaps we should check for
libc-glibc override for glibc case and throw an error if no conditions are met
it might affect nativesdk version probably.

> and
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=95aa56ae11852c100be68d13aaffa9c83273b46b
>
> and then seen if that fixes things.
>
> Cheers,
>
> Richard


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] glibc: Fix ldd bug: not a dynamic executable error
  2018-08-22 14:56                       ` richard.purdie
  2018-08-22 15:42                         ` Khem Raj
@ 2018-08-23  7:02                         ` Ricardo Ribalda Delgado
  1 sibling, 0 replies; 15+ messages in thread
From: Ricardo Ribalda Delgado @ 2018-08-23  7:02 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hi

On Wed, Aug 22, 2018 at 4:57 PM <richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2018-08-22 at 15:39 +0200, Ricardo Ribalda Delgado wrote:
> > On Wed, Aug 22, 2018 at 3:37 PM <richard.purdie@linuxfoundation.org>
> > wrote:
> > > > RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
> > > > /libx32/ld-linux-x32.so.
> > >
> > > I just looked at what the function is doing and its broken. What is
> > > DEFAULTTUNE set to in your build?
> >
> > DEFAULTTUNE="dbfp4"
>
> As I suspected.
>
> Try applying:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=d69f0127b44a5216dd21ad972d6f2b2e4cda6d13
>
> and
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=95aa56ae11852c100be68d13aaffa9c83273b46b

After applying both:
pokyuser@3a9fc37099f7:/workdir/build$ bitbake glibc -e | grep ^RTLDLIST=
RTLDLIST="/lib/ld-linux-x86-64.so.2"

and
ricardo@neopili:~/curro/yocto/europa/build/tmp/work$ cat
dbfp4-poky-linux/glibc/2.27-r0/build-x86_64-poky-linux/elf/ldd | grep
^RTLD
RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
/libx32/ld-linux-x32.so.2 /lib/ld-linux-x86-64.so.2"


So it seems fixed (and more cleanly than with my patch :P)

Thanks!
>
> and then seen if that fixes things.
>
> Cheers,
>
> Richard



-- 
Ricardo Ribalda


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-08-23  7:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 14:58 [PATCH] glibc: Fix ldd bug: not a dynamic executable error Ricardo Ribalda Delgado
2018-08-22 12:45 ` richard.purdie
2018-08-22 12:48   ` Ricardo Ribalda Delgado
2018-08-22 13:00     ` richard.purdie
2018-08-22 13:02       ` Ricardo Ribalda Delgado
2018-08-22 13:05         ` richard.purdie
2018-08-22 13:13           ` Ricardo Ribalda Delgado
2018-08-22 13:21             ` richard.purdie
2018-08-22 13:28               ` Ricardo Ribalda Delgado
2018-08-22 13:33                 ` Ricardo Ribalda Delgado
2018-08-22 13:37                   ` richard.purdie
2018-08-22 13:39                     ` Ricardo Ribalda Delgado
2018-08-22 14:56                       ` richard.purdie
2018-08-22 15:42                         ` Khem Raj
2018-08-23  7:02                         ` Ricardo Ribalda Delgado

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.