Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-08 Thread Khem Raj
Awesome, thanks!  I think any recipe which is using
INHIBIT_DEFAULT_DEPENDENCIES could
run into these sorts of errors.

On Wed, Mar 8, 2023 at 3:53 AM Richard Purdie
 wrote:
>
> On Wed, 2023-03-08 at 09:33 +, Richard Purdie via
> lists.openembedded.org wrote:
> > On Wed, 2023-02-22 at 22:58 -0800, Khem Raj wrote:
> > > Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH 
> > > is searched before
> > > DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> > > DT_RUNPATH, this order ensures that injecting
> > > malicious shared objects is way harder with DT_RUNPATH.
> > >
> > > This is now default on major linux distributions already
> > >
> > > Signed-off-by: Khem Raj 
> > > ---
> > >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> > > b/meta/recipes-devtools/binutils/binutils.inc
> > > index b2dbf241df..c69d29448f 100644
> > > --- a/meta/recipes-devtools/binutils/binutils.inc
> > > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > > @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
> > >  --disable-werror \
> > >  --enable-deterministic-archives \
> > >  --enable-plugins \
> > > +--enable-new-dtags \
> > >  --disable-gdb \
> > >  --disable-gdbserver \
> > >  --disable-libdecnumber \
> >
> > FWIW I 100% agree we should look to enable this.
> >
> > Sadly, doing so exposes a bug where things that should rebuild don't.
> > That manifests as a failure in the reproducible test builds on the
> > autobuilder. I suspect a taskhash problem somewhere, maybe hash
> > equivalence, maybe somewhere else, hard to say without debugging it.
> >
> > I've been trying to get to this to help. The first issue was to sort
> > the other gdb issue this appeared to trigger but was in fact unrelated
> > and an issue from the recent binutils/gdb version upgrade. I've
> > debugged the initial buildtools tarball bug and re-deployed buildtools
> > on the infrastructure. That fixed some of the manifestations but not
> > all, I then debugged the remaining ones, worked out the regression in
> > upstream gdb and sent a patch yesterday which was merged upstream to
> > fix it.
> >
> > I am trying to get to helping with the problem this patch causes but
> > these things take a ton of time. Whilst I may get paid to work on the
> > project, I am one person and I'm getting pulled in a ridiculous number
> > of directions at once.
> >
> > People should worry this triggers a reproducibility issue, it means
> > there is a bug somewhere.
> >
> > I am hoping to get to this and to help try and debug it but the patch
> > cannot merge until we get to the bottom of the issue it triggers.
>
> I did have a look and the issue is actually fairly simple, glibc is
> missing a dependency directly on binutils. Most recipes have this
> magically, the magic is disabled for glibc as it is part of toolchain
> bootstrap and has to be manually curated.
>
> Adding the missing dependency appears to resolve things locally so I'll
> send out a patch and we'll have to run some autobuilder tests.
>
> Cheers,
>
> Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178177): 
https://lists.openembedded.org/g/openembedded-core/message/178177
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-08 Thread Richard Purdie
On Wed, 2023-03-08 at 09:33 +, Richard Purdie via
lists.openembedded.org wrote:
> On Wed, 2023-02-22 at 22:58 -0800, Khem Raj wrote:
> > Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> > searched before
> > DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> > DT_RUNPATH, this order ensures that injecting
> > malicious shared objects is way harder with DT_RUNPATH.
> > 
> > This is now default on major linux distributions already
> > 
> > Signed-off-by: Khem Raj 
> > ---
> >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> > b/meta/recipes-devtools/binutils/binutils.inc
> > index b2dbf241df..c69d29448f 100644
> > --- a/meta/recipes-devtools/binutils/binutils.inc
> > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
> >  --disable-werror \
> >  --enable-deterministic-archives \
> >  --enable-plugins \
> > +--enable-new-dtags \
> >  --disable-gdb \
> >  --disable-gdbserver \
> >  --disable-libdecnumber \
> 
> FWIW I 100% agree we should look to enable this. 
> 
> Sadly, doing so exposes a bug where things that should rebuild don't.
> That manifests as a failure in the reproducible test builds on the
> autobuilder. I suspect a taskhash problem somewhere, maybe hash
> equivalence, maybe somewhere else, hard to say without debugging it.
> 
> I've been trying to get to this to help. The first issue was to sort
> the other gdb issue this appeared to trigger but was in fact unrelated
> and an issue from the recent binutils/gdb version upgrade. I've
> debugged the initial buildtools tarball bug and re-deployed buildtools
> on the infrastructure. That fixed some of the manifestations but not
> all, I then debugged the remaining ones, worked out the regression in
> upstream gdb and sent a patch yesterday which was merged upstream to
> fix it.
> 
> I am trying to get to helping with the problem this patch causes but
> these things take a ton of time. Whilst I may get paid to work on the
> project, I am one person and I'm getting pulled in a ridiculous number
> of directions at once.
> 
> People should worry this triggers a reproducibility issue, it means
> there is a bug somewhere.
> 
> I am hoping to get to this and to help try and debug it but the patch
> cannot merge until we get to the bottom of the issue it triggers.

I did have a look and the issue is actually fairly simple, glibc is
missing a dependency directly on binutils. Most recipes have this
magically, the magic is disabled for glibc as it is part of toolchain
bootstrap and has to be manually curated.

Adding the missing dependency appears to resolve things locally so I'll
send out a patch and we'll have to run some autobuilder tests.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178169): 
https://lists.openembedded.org/g/openembedded-core/message/178169
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-08 Thread Richard Purdie
On Wed, 2023-02-22 at 22:58 -0800, Khem Raj wrote:
> Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> searched before
> DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> DT_RUNPATH, this order ensures that injecting
> malicious shared objects is way harder with DT_RUNPATH.
> 
> This is now default on major linux distributions already
> 
> Signed-off-by: Khem Raj 
> ---
>  meta/recipes-devtools/binutils/binutils.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> b/meta/recipes-devtools/binutils/binutils.inc
> index b2dbf241df..c69d29448f 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
>  --disable-werror \
>  --enable-deterministic-archives \
>  --enable-plugins \
> +--enable-new-dtags \
>  --disable-gdb \
>  --disable-gdbserver \
>  --disable-libdecnumber \

FWIW I 100% agree we should look to enable this. 

Sadly, doing so exposes a bug where things that should rebuild don't.
That manifests as a failure in the reproducible test builds on the
autobuilder. I suspect a taskhash problem somewhere, maybe hash
equivalence, maybe somewhere else, hard to say without debugging it.

I've been trying to get to this to help. The first issue was to sort
the other gdb issue this appeared to trigger but was in fact unrelated
and an issue from the recent binutils/gdb version upgrade. I've
debugged the initial buildtools tarball bug and re-deployed buildtools
on the infrastructure. That fixed some of the manifestations but not
all, I then debugged the remaining ones, worked out the regression in
upstream gdb and sent a patch yesterday which was merged upstream to
fix it.

I am trying to get to helping with the problem this patch causes but
these things take a ton of time. Whilst I may get paid to work on the
project, I am one person and I'm getting pulled in a ridiculous number
of directions at once.

People should worry this triggers a reproducibility issue, it means
there is a bug somewhere.

I am hoping to get to this and to help try and debug it but the patch
cannot merge until we get to the bottom of the issue it triggers.

Cheers,

Richard





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178161): 
https://lists.openembedded.org/g/openembedded-core/message/178161
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-02 Thread Richard Purdie
On Thu, 2023-03-02 at 17:54 +, Richard Purdie via
lists.openembedded.org wrote:
> On Thu, 2023-03-02 at 13:18 +, Richard Purdie via
> lists.openembedded.org wrote:
> > On Thu, 2023-03-02 at 12:41 +0100, Alexandre Belloni wrote:
> > > On 01/03/2023 10:25:58+0100, Alexandre Belloni via lists.openembedded.org 
> > > wrote:
> > > > On 28/02/2023 23:45:05+0100, Alexandre Belloni wrote:
> > > > > On 28/02/2023 17:50:05+, Richard Purdie wrote:
> > > > > > On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > > > > > > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> > > > > > >  wrote:
> > > > > > > > 
> > > > > > > > Hello Khem,
> > > > > > > > 
> > > > > > > > As discussed I gave it a go again and got this:
> > > > > > > > 
> > > > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > > > >  linux-tdep.o: in function 
> > > > > > > > > `linux_corefile_thread(thread_info*, 
> > > > > > > > > linux_corefile_thread_data*)':
> > > > > > > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > > > > > > `gcore_elf_build_thread_register_notes(gdbarch*, 
> > > > > > > > > thread_info*, gdb_signal, bfd*, std::unique_ptr > > > > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > > > >  linux-tdep.o: in function 
> > > > > > > > > `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
> > > > > > > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > > > > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > > > > collect2: error: ld returned 1 exit status
> > > > > > > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > > > > > > make[2]: Leaving directory 
> > > > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > > > > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > > > > > > make[1]: Leaving directory 
> > > > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > > > > > > make: *** [Makefile:1005: all] Error 2
> > > > > > > > > ERROR: oe_runmake failed
> > > > > > > 
> > > > > > > Is this host running updated buildtools tarball after the 
> > > > > > > binutils ld
> > > > > > > search path fix ?
> > > > > > 
> > > > > > Yes, it should be.
> > > > > 
> > > > > Khem, you are probably right that this is host related, this failed
> > > > > again on ubuntu2004:
> > > > > 
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio
> > > > > 
> > > > > I'm wondering whether this reproduces on master and we have simply 
> > > > > been
> > > > > lucky.
> > > > 
> > > > This doesn't reproduce on master on ubuntu2004 so I guess it is really
> > > > cause by the binutils upgrade.
> > > 
> > > I was wrong, it just reproduced on master, debian11-ty-3:
> > > 
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/42/builds/6730/steps/15/logs/stdio
> > > 
> > 
> > I went digging and the gdb/config.log file shows:
> > 
> > configure:28568: checking for ELF support in BFD
> > configure:28588: ./libtool --quiet --mode=link gcc  -o conftest 
> > -I../../gdb-13.1/gdb/../include -I../bfd -I../../gdb-13.1/gdb/../bfd 
> > -isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
> >  -O2 -pipe 
> > -isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
> >  
> > -I/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
> >  -L../bfd -L../libiberty conftest.c -lbfd -liberty  -lncursesw -lm -ldl  >&5
> > /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
> > /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
> >  undefined reference to `pthread_join@GLIBC_2.34'
> > /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
> > /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
> >  undefined reference to `pthread_create@GLIBC_2.34'
> > collect2: error: ld returned 1 exit status
> > 
> > which is the same issue as we saw previously. 
> > 
> > The really big difference here is that debian11 doesn't have buildtools
> > so this is with the host's ld and libpthread.
> > 
> > I'm guessing this is a libzstd linked on a more recent system which
> > then doesn't work against this older host libc. The one in uninative
> > could help and would likely resolve things, but isn't involved at this
> > point in a build. Not sure what the right fix is here.
> 

Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-02 Thread Richard Purdie
On Thu, 2023-03-02 at 13:18 +, Richard Purdie via
lists.openembedded.org wrote:
> On Thu, 2023-03-02 at 12:41 +0100, Alexandre Belloni wrote:
> > On 01/03/2023 10:25:58+0100, Alexandre Belloni via lists.openembedded.org 
> > wrote:
> > > On 28/02/2023 23:45:05+0100, Alexandre Belloni wrote:
> > > > On 28/02/2023 17:50:05+, Richard Purdie wrote:
> > > > > On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > > > > > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> > > > > >  wrote:
> > > > > > > 
> > > > > > > Hello Khem,
> > > > > > > 
> > > > > > > As discussed I gave it a go again and got this:
> > > > > > > 
> > > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > > >  linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > > > > > > linux_corefile_thread_data*)':
> > > > > > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > > > > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > > > > > > gdb_signal, bfd*, std::unique_ptr > > > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > > >  linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, 
> > > > > > > > bfd*, int*)':
> > > > > > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > > > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > > > collect2: error: ld returned 1 exit status
> > > > > > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > > > > > make[2]: Leaving directory 
> > > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > > > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > > > > > make[1]: Leaving directory 
> > > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > > > > > make: *** [Makefile:1005: all] Error 2
> > > > > > > > ERROR: oe_runmake failed
> > > > > > 
> > > > > > Is this host running updated buildtools tarball after the binutils 
> > > > > > ld
> > > > > > search path fix ?
> > > > > 
> > > > > Yes, it should be.
> > > > 
> > > > Khem, you are probably right that this is host related, this failed
> > > > again on ubuntu2004:
> > > > 
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio
> > > > 
> > > > I'm wondering whether this reproduces on master and we have simply been
> > > > lucky.
> > > 
> > > This doesn't reproduce on master on ubuntu2004 so I guess it is really
> > > cause by the binutils upgrade.
> > 
> > I was wrong, it just reproduced on master, debian11-ty-3:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/42/builds/6730/steps/15/logs/stdio
> > 
> 
> I went digging and the gdb/config.log file shows:
> 
> configure:28568: checking for ELF support in BFD
> configure:28588: ./libtool --quiet --mode=link gcc  -o conftest 
> -I../../gdb-13.1/gdb/../include -I../bfd -I../../gdb-13.1/gdb/../bfd 
> -isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
>  -O2 -pipe 
> -isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
>  
> -I/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
>  -L../bfd -L../libiberty conftest.c -lbfd -liberty  -lncursesw -lm -ldl  >&5
> /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
> /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
>  undefined reference to `pthread_join@GLIBC_2.34'
> /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
> /home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
>  undefined reference to `pthread_create@GLIBC_2.34'
> collect2: error: ld returned 1 exit status
> 
> which is the same issue as we saw previously. 
> 
> The really big difference here is that debian11 doesn't have buildtools
> so this is with the host's ld and libpthread.
> 
> I'm guessing this is a libzstd linked on a more recent system which
> then doesn't work against this older host libc. The one in uninative
> could help and would likely resolve things, but isn't involved at this
> point in a build. Not sure what the right fix is here.

This bug is horrible.

I reran a forced compile on that build and it all worked. Thankfully I
saved off the build directory, before and after and was able to diff
them.

The difference is this in python3.pc in the recipe-sysroot-native:

Libs.private: -ldl 

vs:

Libs.private: -lpthread 

Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-02 Thread Richard Purdie
On Thu, 2023-03-02 at 12:41 +0100, Alexandre Belloni wrote:
> On 01/03/2023 10:25:58+0100, Alexandre Belloni via lists.openembedded.org 
> wrote:
> > On 28/02/2023 23:45:05+0100, Alexandre Belloni wrote:
> > > On 28/02/2023 17:50:05+, Richard Purdie wrote:
> > > > On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > > > > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> > > > >  wrote:
> > > > > > 
> > > > > > Hello Khem,
> > > > > > 
> > > > > > As discussed I gave it a go again and got this:
> > > > > > 
> > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > >  linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > > > > > linux_corefile_thread_data*)':
> > > > > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > > > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > > > > > gdb_signal, bfd*, std::unique_ptr 
> > > > > > > >*, int*)'
> > > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld:
> > > > > > >  linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, 
> > > > > > > bfd*, int*)':
> > > > > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > > collect2: error: ld returned 1 exit status
> > > > > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > > > > make[2]: Leaving directory 
> > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > > > > make[1]: Leaving directory 
> > > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > > > > make: *** [Makefile:1005: all] Error 2
> > > > > > > ERROR: oe_runmake failed
> > > > > 
> > > > > Is this host running updated buildtools tarball after the binutils ld
> > > > > search path fix ?
> > > > 
> > > > Yes, it should be.
> > > 
> > > Khem, you are probably right that this is host related, this failed
> > > again on ubuntu2004:
> > > 
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio
> > > 
> > > I'm wondering whether this reproduces on master and we have simply been
> > > lucky.
> > 
> > This doesn't reproduce on master on ubuntu2004 so I guess it is really
> > cause by the binutils upgrade.
> 
> I was wrong, it just reproduced on master, debian11-ty-3:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/42/builds/6730/steps/15/logs/stdio
> 

I went digging and the gdb/config.log file shows:

configure:28568: checking for ELF support in BFD
configure:28588: ./libtool --quiet --mode=link gcc  -o conftest 
-I../../gdb-13.1/gdb/../include -I../bfd -I../../gdb-13.1/gdb/../bfd 
-isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
 -O2 -pipe 
-isystem/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
 
-I/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/include
 -L../bfd -L../libiberty conftest.c -lbfd -liberty  -lncursesw -lm -ldl  >&5
/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
 undefined reference to `pthread_join@GLIBC_2.34'
/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/hosttools/ld: 
/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/gdb-cross-aarch64/13.1-r0/recipe-sysroot-native/usr/lib/libzstd.so:
 undefined reference to `pthread_create@GLIBC_2.34'
collect2: error: ld returned 1 exit status

which is the same issue as we saw previously. 

The really big difference here is that debian11 doesn't have buildtools
so this is with the host's ld and libpthread.

I'm guessing this is a libzstd linked on a more recent system which
then doesn't work against this older host libc. The one in uninative
could help and would likely resolve things, but isn't involved at this
point in a build. Not sure what the right fix is here.

Cheers,

Richard



> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177963): 
https://lists.openembedded.org/g/openembedded-core/message/177963
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-02 Thread Alexandre Belloni via lists.openembedded.org
On 01/03/2023 10:25:58+0100, Alexandre Belloni via lists.openembedded.org wrote:
> On 28/02/2023 23:45:05+0100, Alexandre Belloni wrote:
> > On 28/02/2023 17:50:05+, Richard Purdie wrote:
> > > On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > > > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> > > >  wrote:
> > > > > 
> > > > > Hello Khem,
> > > > > 
> > > > > As discussed I gave it a go again and got this:
> > > > > 
> > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > > > linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > > > > linux_corefile_thread_data*)':
> > > > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > > > > gdb_signal, bfd*, std::unique_ptr 
> > > > > > >*, int*)'
> > > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > > > linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, 
> > > > > > bfd*, int*)':
> > > > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > > > gdb::xfree_deleter >*, int*)'
> > > > > > collect2: error: ld returned 1 exit status
> > > > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > > > make[2]: Leaving directory 
> > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > > > make[1]: Leaving directory 
> > > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > > > make: *** [Makefile:1005: all] Error 2
> > > > > > ERROR: oe_runmake failed
> > > > 
> > > > Is this host running updated buildtools tarball after the binutils ld
> > > > search path fix ?
> > > 
> > > Yes, it should be.
> > 
> > Khem, you are probably right that this is host related, this failed
> > again on ubuntu2004:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio
> > 
> > I'm wondering whether this reproduces on master and we have simply been
> > lucky.
> 
> This doesn't reproduce on master on ubuntu2004 so I guess it is really
> cause by the binutils upgrade.

I was wrong, it just reproduced on master, debian11-ty-3:

https://autobuilder.yoctoproject.org/typhoon/#/builders/42/builds/6730/steps/15/logs/stdio

> 
> The other issue is still repro:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2472/steps/12/logs/stdio
> https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230228-nmn0h352/packages/diff-html/
> 
> 
> -- 
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177961): 
https://lists.openembedded.org/g/openembedded-core/message/177961
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-03-01 Thread Alexandre Belloni via lists.openembedded.org
On 28/02/2023 23:45:05+0100, Alexandre Belloni wrote:
> On 28/02/2023 17:50:05+, Richard Purdie wrote:
> > On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> > >  wrote:
> > > > 
> > > > Hello Khem,
> > > > 
> > > > As discussed I gave it a go again and got this:
> > > > 
> > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > > linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > > > linux_corefile_thread_data*)':
> > > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > > > gdb_signal, bfd*, std::unique_ptr >*, 
> > > > > int*)'
> > > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > > linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, 
> > > > > int*)':
> > > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > > gdb::xfree_deleter >*, int*)'
> > > > > collect2: error: ld returned 1 exit status
> > > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > > make[2]: Leaving directory 
> > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > > make[1]: Leaving directory 
> > > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > > make: *** [Makefile:1005: all] Error 2
> > > > > ERROR: oe_runmake failed
> > > 
> > > Is this host running updated buildtools tarball after the binutils ld
> > > search path fix ?
> > 
> > Yes, it should be.
> 
> Khem, you are probably right that this is host related, this failed
> again on ubuntu2004:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio
> 
> I'm wondering whether this reproduces on master and we have simply been
> lucky.

This doesn't reproduce on master on ubuntu2004 so I guess it is really
cause by the binutils upgrade.

The other issue is still repro:
https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2472/steps/12/logs/stdio
https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230228-nmn0h352/packages/diff-html/


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177879): 
https://lists.openembedded.org/g/openembedded-core/message/177879
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-28 Thread Alexandre Belloni via lists.openembedded.org
On 28/02/2023 17:50:05+, Richard Purdie wrote:
> On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> > On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
> >  wrote:
> > > 
> > > Hello Khem,
> > > 
> > > As discussed I gave it a go again and got this:
> > > 
> > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > > linux_corefile_thread_data*)':
> > > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > > gdb_signal, bfd*, std::unique_ptr >*, 
> > > > int*)'
> > > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > > linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, 
> > > > int*)':
> > > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > > gdb::xfree_deleter >*, int*)'
> > > > collect2: error: ld returned 1 exit status
> > > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > > make[2]: Leaving directory 
> > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > > make[1]: Leaving directory 
> > > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > > make: *** [Makefile:1005: all] Error 2
> > > > ERROR: oe_runmake failed
> > 
> > Is this host running updated buildtools tarball after the binutils ld
> > search path fix ?
> 
> Yes, it should be.

Khem, you are probably right that this is host related, this failed
again on ubuntu2004:

https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/6689/steps/14/logs/stdio

I'm wondering whether this reproduces on master and we have simply been
lucky.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177859): 
https://lists.openembedded.org/g/openembedded-core/message/177859
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-28 Thread Richard Purdie
On Tue, 2023-02-28 at 08:43 -0800, Khem Raj wrote:
> On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
>  wrote:
> > 
> > Hello Khem,
> > 
> > As discussed I gave it a go again and got this:
> > 
> > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> > > linux_corefile_thread_data*)':
> > > linux-tdep.c:(.text+0x13ac): undefined reference to 
> > > `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, 
> > > gdb_signal, bfd*, std::unique_ptr >*, 
> > > int*)'
> > > /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> > > linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, 
> > > int*)':
> > > linux-tdep.c:(.text+0x49d7): undefined reference to 
> > > `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr > > gdb::xfree_deleter >*, int*)'
> > > collect2: error: ld returned 1 exit status
> > > make[2]: *** [Makefile:2149: gdb] Error 1
> > > make[2]: Leaving directory 
> > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> > > make[1]: *** [Makefile:11122: all-gdb] Error 2
> > > make[1]: Leaving directory 
> > > '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> > > make: *** [Makefile:1005: all] Error 2
> > > ERROR: oe_runmake failed
> 
> Is this host running updated buildtools tarball after the binutils ld
> search path fix ?

Yes, it should be.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177846): 
https://lists.openembedded.org/g/openembedded-core/message/177846
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-28 Thread Khem Raj
On Tue, Feb 28, 2023 at 8:18 AM Alexandre Belloni
 wrote:
>
> Hello Khem,
>
> As discussed I gave it a go again and got this:
>
> | /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
> linux_corefile_thread_data*)':
> | linux-tdep.c:(.text+0x13ac): undefined reference to 
> `gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, gdb_signal, 
> bfd*, std::unique_ptr >*, int*)'
> | /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
> linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
> | linux-tdep.c:(.text+0x49d7): undefined reference to 
> `gcore_elf_make_tdesc_note(bfd*, std::unique_ptr gdb::xfree_deleter >*, int*)'
> | collect2: error: ld returned 1 exit status
> | make[2]: *** [Makefile:2149: gdb] Error 1
> | make[2]: Leaving directory 
> '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
> | make[1]: *** [Makefile:11122: all-gdb] Error 2
> | make[1]: Leaving directory 
> '/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
> | make: *** [Makefile:1005: all] Error 2
> | ERROR: oe_runmake failed

Is this host running updated buildtools tarball after the binutils ld
search path fix ?

>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/6741/steps/14/logs/stdio
>
> I already reported it on the gdb upgrade:
>
> https://lists.openembedded.org/g/openembedded-core/topic/97152035#177576
>
>
> On 22/02/2023 22:58:16-0800, Khem Raj wrote:
> > Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> > searched before
> > DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> > DT_RUNPATH, this order ensures that injecting
> > malicious shared objects is way harder with DT_RUNPATH.
> >
> > This is now default on major linux distributions already
> >
> > Signed-off-by: Khem Raj 
> > ---
> >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> > b/meta/recipes-devtools/binutils/binutils.inc
> > index b2dbf241df..c69d29448f 100644
> > --- a/meta/recipes-devtools/binutils/binutils.inc
> > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
> >  --disable-werror \
> >  --enable-deterministic-archives \
> >  --enable-plugins \
> > +--enable-new-dtags \
> >  --disable-gdb \
> >  --disable-gdbserver \
> >  --disable-libdecnumber \
> > --
> > 2.39.2
> >
>
> >
> > 
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177845): 
https://lists.openembedded.org/g/openembedded-core/message/177845
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-28 Thread Alexandre Belloni via lists.openembedded.org
Hello Khem,

As discussed I gave it a go again and got this:

| /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
linux-tdep.o: in function `linux_corefile_thread(thread_info*, 
linux_corefile_thread_data*)':
| linux-tdep.c:(.text+0x13ac): undefined reference to 
`gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, gdb_signal, 
bfd*, std::unique_ptr >*, int*)'
| /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/hosttools/ld: 
linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
| linux-tdep.c:(.text+0x49d7): undefined reference to 
`gcore_elf_make_tdesc_note(bfd*, std::unique_ptr 
>*, int*)'
| collect2: error: ld returned 1 exit status
| make[2]: *** [Makefile:2149: gdb] Error 1
| make[2]: Leaving directory 
'/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi/gdb'
| make[1]: *** [Makefile:11122: all-gdb] Error 2
| make[1]: Leaving directory 
'/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/x86_64-linux/gdb-cross-arm/13.1-r0/build-arm-poky-linux-gnueabi'
| make: *** [Makefile:1005: all] Error 2
| ERROR: oe_runmake failed

https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/6741/steps/14/logs/stdio

I already reported it on the gdb upgrade:

https://lists.openembedded.org/g/openembedded-core/topic/97152035#177576


On 22/02/2023 22:58:16-0800, Khem Raj wrote:
> Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> searched before
> DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> DT_RUNPATH, this order ensures that injecting
> malicious shared objects is way harder with DT_RUNPATH.
> 
> This is now default on major linux distributions already
> 
> Signed-off-by: Khem Raj 
> ---
>  meta/recipes-devtools/binutils/binutils.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> b/meta/recipes-devtools/binutils/binutils.inc
> index b2dbf241df..c69d29448f 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
>  --disable-werror \
>  --enable-deterministic-archives \
>  --enable-plugins \
> +--enable-new-dtags \
>  --disable-gdb \
>  --disable-gdbserver \
>  --disable-libdecnumber \
> -- 
> 2.39.2
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177844): 
https://lists.openembedded.org/g/openembedded-core/message/177844
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-27 Thread Richard Purdie
On Sun, 2023-02-26 at 22:43 -0800, Khem Raj wrote:
> On Thu, Feb 23, 2023 at 5:56 PM Khem Raj  wrote:
> > 
> > On Thu, Feb 23, 2023 at 3:34 PM Alexandre Belloni
> >  wrote:
> > > 
> > > Could this be the cause of this?
> > > 
> > > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230223-79c9rmcw/packages/diff-html/
> > 
> > most likely yes. I will take a look. Lets work on merging the other
> > binutils and gdb upgrade patch meanwhile.
> 
> I looked at the diffoscope outputs you posted and it is noting the
> difference in EFL flags
> 
> changing from
>  0x0018 (BIND_NOW)
> to
>  0x001e (FLAGS)  BIND_NOW
> 
> However, in my local build I see that when I enable --enable-new-dtags
>  than I always get
>  0x001e (FLAGS)  BIND_NOW
> 
> 
> but when I check the glibc builds without the patch then I get flags
> to be 0x0018
> 
> So I wonder if we are comparing previously built glibc ( using
> binutils without this patch )
> with glibc compiled with binutils using this patch.

I think that is possible and there is some task hash dependency issue
in here somewhere :/

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16): 
https://lists.openembedded.org/g/openembedded-core/message/16
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-26 Thread Khem Raj
On Thu, Feb 23, 2023 at 5:56 PM Khem Raj  wrote:
>
> On Thu, Feb 23, 2023 at 3:34 PM Alexandre Belloni
>  wrote:
> >
> > Could this be the cause of this?
> >
> > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230223-79c9rmcw/packages/diff-html/
>
> most likely yes. I will take a look. Lets work on merging the other
> binutils and gdb upgrade patch meanwhile.

I looked at the diffoscope outputs you posted and it is noting the
difference in EFL flags

changing from
 0x0018 (BIND_NOW)
to
 0x001e (FLAGS)  BIND_NOW

However, in my local build I see that when I enable --enable-new-dtags
 than I always get
 0x001e (FLAGS)  BIND_NOW


but when I check the glibc builds without the patch then I get flags
to be 0x0018

So I wonder if we are comparing previously built glibc ( using
binutils without this patch )
with glibc compiled with binutils using this patch.

>
> >
> > On 22/02/2023 22:58:16-0800, Khem Raj wrote:
> > > Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH 
> > > is searched before
> > > DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> > > DT_RUNPATH, this order ensures that injecting
> > > malicious shared objects is way harder with DT_RUNPATH.
> > >
> > > This is now default on major linux distributions already
> > >
> > > Signed-off-by: Khem Raj 
> > > ---
> > >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> > > b/meta/recipes-devtools/binutils/binutils.inc
> > > index b2dbf241df..c69d29448f 100644
> > > --- a/meta/recipes-devtools/binutils/binutils.inc
> > > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > > @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
> > >  --disable-werror \
> > >  --enable-deterministic-archives \
> > >  --enable-plugins \
> > > +--enable-new-dtags \
> > >  --disable-gdb \
> > >  --disable-gdbserver \
> > >  --disable-libdecnumber \
> > > --
> > > 2.39.2
> > >
> >
> > >
> > > 
> > >
> >
> >
> > --
> > Alexandre Belloni, co-owner and COO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13): 
https://lists.openembedded.org/g/openembedded-core/message/13
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-23 Thread Khem Raj
On Thu, Feb 23, 2023 at 3:34 PM Alexandre Belloni
 wrote:
>
> Could this be the cause of this?
>
> https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230223-79c9rmcw/packages/diff-html/

most likely yes. I will take a look. Lets work on merging the other
binutils and gdb upgrade patch meanwhile.

>
> On 22/02/2023 22:58:16-0800, Khem Raj wrote:
> > Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> > searched before
> > DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> > DT_RUNPATH, this order ensures that injecting
> > malicious shared objects is way harder with DT_RUNPATH.
> >
> > This is now default on major linux distributions already
> >
> > Signed-off-by: Khem Raj 
> > ---
> >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> > b/meta/recipes-devtools/binutils/binutils.inc
> > index b2dbf241df..c69d29448f 100644
> > --- a/meta/recipes-devtools/binutils/binutils.inc
> > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
> >  --disable-werror \
> >  --enable-deterministic-archives \
> >  --enable-plugins \
> > +--enable-new-dtags \
> >  --disable-gdb \
> >  --disable-gdbserver \
> >  --disable-libdecnumber \
> > --
> > 2.39.2
> >
>
> >
> > 
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177648): 
https://lists.openembedded.org/g/openembedded-core/message/177648
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-23 Thread Alexandre Belloni via lists.openembedded.org
Could this be the cause of this?

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230223-79c9rmcw/packages/diff-html/

On 22/02/2023 22:58:16-0800, Khem Raj wrote:
> Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
> searched before
> DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
> DT_RUNPATH, this order ensures that injecting
> malicious shared objects is way harder with DT_RUNPATH.
> 
> This is now default on major linux distributions already
> 
> Signed-off-by: Khem Raj 
> ---
>  meta/recipes-devtools/binutils/binutils.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-devtools/binutils/binutils.inc 
> b/meta/recipes-devtools/binutils/binutils.inc
> index b2dbf241df..c69d29448f 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
>  --disable-werror \
>  --enable-deterministic-archives \
>  --enable-plugins \
> +--enable-new-dtags \
>  --disable-gdb \
>  --disable-gdbserver \
>  --disable-libdecnumber \
> -- 
> 2.39.2
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177643): 
https://lists.openembedded.org/g/openembedded-core/message/177643
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] binutils: Enable --enable-new-dtags

2023-02-22 Thread Khem Raj
Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is 
searched before
DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
DT_RUNPATH, this order ensures that injecting
malicious shared objects is way harder with DT_RUNPATH.

This is now default on major linux distributions already

Signed-off-by: Khem Raj 
---
 meta/recipes-devtools/binutils/binutils.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/binutils/binutils.inc 
b/meta/recipes-devtools/binutils/binutils.inc
index b2dbf241df..c69d29448f 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -96,6 +96,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
 --disable-werror \
 --enable-deterministic-archives \
 --enable-plugins \
+--enable-new-dtags \
 --disable-gdb \
 --disable-gdbserver \
 --disable-libdecnumber \
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177602): 
https://lists.openembedded.org/g/openembedded-core/message/177602
Mute This Topic: https://lists.openembedded.org/mt/97178429/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-