glibc: Fix ldd bug: not a dynamic executable error
PATCH 1/1 glibc: Fix ldd bug: not a dynamic executable error
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
--- .../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
meta/recipes-core/glibc/glibc/0031-ldd-rewrite.patch new file +22 -0
@@ -0,0 +1,22 @@ +From: Ricardo Ribalda <[email protected]> +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 <[email protected]> +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"_
meta/recipes-core/glibc/glibc_2.28.bb +1 -0
@@ -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 ?= ""
Signature · 1 line
2.18.0
Quoted 6 lines · Ricardo Ribalda Delgado
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
Quoted 8 lines
Signed-off-by Ricardo Ribalda Delgado <[email protected]>--- .../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
Hi Richard
Quoted 21 lines · On Wed, Aug 22, 2018 at 2:45 PM <[email protected]> wrote:
Quoted 6 lines · Ricardo Ribalda Delgado
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 executableQuoted 8 lines
Signed-off-by Ricardo Ribalda Delgado <[email protected]>--- .../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).
Quoted 7 lines
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
Quoted 3 lines
Regards,
Richard
Signature · 1 line
Ricardo Ribalda
Quoted 29 lines · Ricardo Ribalda Delgado
Quoted 27 lines · On Wed, Aug 22, 2018 at 2:45 PM <[email protected]> wrote:
Quoted 9 lines · Ricardo Ribalda Delgado
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 executableSigned-off-by Ricardo Ribalda Delgado <[email protected]Quoted 1 line
Quoted 7 lines
--- .../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 toIMAGE_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:
Quoted 8 lines
Quoted 6 lines
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtim
e/cases/ldd.pyWhich 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...
Quoted 2 lines
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
Quoted 45 lines · On Wed, Aug 22, 2018 at 3:00 PM <[email protected]> wrote:
Quoted 29 lines · Ricardo Ribalda Delgado
Quoted 27 lines · On Wed, Aug 22, 2018 at 2:45 PM <[email protected]> wrote:
Quoted 9 lines · Ricardo Ribalda Delgado
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 executableSigned-off-by Ricardo Ribalda Delgado <[email protected]Quoted 1 line
Quoted 7 lines
--- .../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 toIMAGE_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:
Quoted 8 lines
Quoted 6 lines
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/runtim
e/cases/ldd.pyWhich 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...
Quoted 2 lines
Maybe your tests are run agains an image that has the package lsb installed. Which creates symbolic links to the standard locations
Quoted 7 lines
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"
Quoted 5 lines
Cheers,
Richard
Signature · 1 line
Ricardo Ribalda
Quoted 60 lines · Ricardo Ribalda Delgado
Quoted 58 lines · On Wed, Aug 22, 2018 at 3:00 PM <[email protected]> wrote:
Quoted 39 lines · Ricardo Ribalda Delgado
Quoted 36 lines · On Wed, Aug 22, 2018 at 2:45 PM <[email protected] rg> wrote:
Quoted 11 lines · Ricardo Ribalda Delgado
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 executableSigned-off-by Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com
Quoted 1 line
Quoted 7 lines
--- .../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 toIMAGE_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
ntime/cases/ldd.pyQuoted 6 lines
Quoted 4 lines
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...
Quoted 2 lines
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:
Quoted 7 lines
Quoted 4 lines
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/gl
ibc/glibc-ld.incWhat 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
HI Richard
Quoted 67 lines · On Wed, Aug 22, 2018 at 3:05 PM <[email protected]> wrote:
Quoted 65 lines · Ricardo Ribalda Delgado
Quoted 62 lines · On Wed, Aug 22, 2018 at 3:00 PM <[email protected]> wrote:
Quoted 39 lines · Ricardo Ribalda Delgado
Quoted 36 lines · On Wed, Aug 22, 2018 at 2:45 PM <[email protected] rg> wrote:
Quoted 11 lines · Ricardo Ribalda Delgado
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 executableSigned-off-by Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com
Quoted 1 line
Quoted 7 lines
--- .../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 toIMAGE_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
ntime/cases/ldd.pyQuoted 6 lines
Quoted 4 lines
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...
Quoted 2 lines
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.incWhat value of RTLDLIST is your build showing?
Quoted 7 lines
Quoted 2 lines
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
Quoted 7 lines
Not sure why its different without looking at the code but its something to look into...
Cheers,
Richard
Signature · 1 line
Ricardo Ribalda
Quoted 36 lines · Ricardo Ribalda Delgado
Quoted 4 lines
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.newcat 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"_
Quoted 8 lines
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.2I 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
Quoted 52 lines · On Wed, Aug 22, 2018 at 3:21 PM <[email protected]> wrote:
Quoted 36 lines · Ricardo Ribalda Delgado
Quoted 4 lines
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.newcat 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"_Quoted 8 lines
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.2I 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:
Quoted 9 lines
# $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
Quoted 3 lines
Cheers,
Richard
Signature · 1 line
Ricardo Ribalda
Hello
Quoted 84 lines · Ricardo Ribalda Delgado
Quoted 52 lines · On Wed, Aug 22, 2018 at 3:21 PM <[email protected]> wrote:
Quoted 36 lines · Ricardo Ribalda Delgado
Quoted 4 lines
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.newcat 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"_Quoted 8 lines
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.2I 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:
Quoted 9 lines
# $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"
Quoted 2 lines
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.
Quoted 8 lines
Quoted 3 lines
Cheers,
Richard
--
Ricardo Ribalda
Signature · 1 line
Ricardo Ribalda
Quoted 103 lines · Ricardo Ribalda Delgado
Hello
Quoted 96 lines · Ricardo Ribalda Delgado
On Wed, Aug 22, 2018 at 3:21 PM <[email protected]
Quoted 69 lines
wrote:
Quoted 47 lines · Ricardo Ribalda Delgado
Quoted 4 lines
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
Quoted 1 line
|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.newcat 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.2Quoted 3 lines
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)}"Quoted 4 lines
# 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"Quoted 3 lines
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
Quoted 5 lines
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
Hi
Quoted 105 lines · On Wed, Aug 22, 2018 at 3:37 PM <[email protected]> wrote:
Quoted 103 lines · Ricardo Ribalda Delgado
Hello
Quoted 99 lines · Ricardo Ribalda Delgado
On Wed, Aug 22, 2018 at 3:21 PM <[email protected]
Quoted 69 lines
wrote:
Quoted 47 lines · Ricardo Ribalda Delgado
Quoted 4 lines
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
Quoted 1 line
|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.newcat 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.2Quoted 3 lines
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)}"Quoted 4 lines
# 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
Quoted 8 lines
Quoted 5 lines
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"
Quoted 4 lines
Cheers,
Richard
Signature · 1 line
Ricardo Ribalda
Quoted 9 lines · Ricardo Ribalda Delgado
Quoted 5 lines · On Wed, Aug 22, 2018 at 3:37 PM <[email protected]> wrote:
Quoted 2 lines
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:
and
and then seen if that fixes things.
Cheers,
Richard
Quoted 10 lines · On Wed, Aug 22, 2018 at 7:57 AM <[email protected]> wrote:
Quoted 8 lines · Ricardo Ribalda Delgado
Quoted 5 lines · On Wed, Aug 22, 2018 at 3:37 PM <[email protected]> wrote:
Quoted 2 lines
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?
Quoted 8 lines
Quoted 1 line
DEFAULTTUNE="dbfp4"
As I suspected.
Try applying:
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.
Quoted 9 lines
and
and then seen if that fixes things.
Cheers,
Richard
Hi
Quoted 14 lines · On Wed, Aug 22, 2018 at 4:57 PM <[email protected]> wrote:
Quoted 9 lines · Ricardo Ribalda Delgado
Quoted 5 lines · On Wed, Aug 22, 2018 at 3:37 PM <[email protected]> wrote:
Quoted 2 lines
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.
Quoted 7 lines
Try applying:
and
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!
Quoted 6 lines
and then seen if that fixes things.
Cheers,
Richard
Signature · 1 line
Ricardo Ribalda