Created attachment 895697 [details] build.log and emerge --info $ grep -E "^FAIL: " /tmp/build.log FAIL: DWARF parse during linker error FAIL: Build warn libbar.so FAIL: Run warn with versioned libfoo.so === ld Summary === # of expected passes 1878 # of unexpected failures 3 # of expected failures 13 # of untested testcases 1 # of unsupported tests 168 ./ld-new 2.42.0
Could you grab the ld.log file?
Created attachment 895713 [details] build.log and emerge --info Added that file to my standard info collection script, attached has it appended.
Thanks! * "DWARF parse during linker error" needs checking, not sure what's happening yet * "Build warn libbar.so" ... is it expecting to be built with -g and it's just missing for that text? (which is why we get .o in the error, not .c)? If you try build with explicit -g or -ggdb3 or something, does it pass? (iirc configure defaults to -O2 -g which might explain why nobody noticed? not sure?) * "Run warn with versioned libfoo.so" looks like the same It's possible all 3 are the same root issue of missing -g, not sure.
Created attachment 895715 [details] build.log and emerge --info Yup, that fixes all 3 ld testcases, but subsequently causes gold to start failing on arm64.
``` [...] gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:87: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:87: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:95: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:95: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:103: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:103: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:111: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:111: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:121: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:121: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:133: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:133: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:142: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:142: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:154: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:154: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:201: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:201: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:210: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:210: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:212: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test.cc:212: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test_c.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test_c.c:52: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test_c.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test_c.c:52: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC gcctestdir/collect-ld: error: tls_test_c.o: unsupported reloc 549 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test_c.c:62: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 gcctestdir/collect-ld: error: tls_test_c.o: unsupported reloc 551 in non-static TLSLE mode. /var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/gold/testsuite/tls_test_c.c:62: error: unexpected opcode while processing relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC collect2: error: ld returned 1 exit status make[5]: *** [Makefile:8403: tls_test_shared_nonpic.so] Error 1 make[5]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/gold/testsuite' ``` Jeez. Anyway, let's see...
Created attachment 895716 [details, diff] ld-debuginfo.patch Please try this blind patch. I need to check if the first one is okay or not, as I'm a bit suspicoius of it, as dwarf1.c gets built with -g already.
On second thought, it's almost surely fine because of that configure thing I mentioned.
Created attachment 895717 [details] build.log and emerge --info One fail after that patch, plus gold.
Created attachment 895718 [details, diff] ld-debuginfo.patch ``` spawn [open ...] aarch64-unknown-linux-gnu-gcc -B/var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/ld/tmpdir/ld/ -L/usr/aarch64-unknown-linux-gnu/lib64 -L/usr/lib64/binutils/aarch64-unknown-linux-gnu/2.4264 -L/usr/local/lib64 -L/lib64 -L/usr/lib64 -L/usr/aarch64-unknown-linux-gnu/lib -L/usr/lib64/binutils/aarch64-unknown-linux-gnu/2.42 -L/usr/local/lib -L/lib -L/usr/lib -Wl,--hash-style=sysv -o tmpdir/warn -L/var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/ld/testsuite/ld-elf -Wl,--no-as-needed tmpdir/beginwarn.o tmpdir/libfoov.so tmpdir/main.o Executing on host: sh -c {aarch64-unknown-linux-gnu-gcc -B/var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/ld/tmpdir/ld/ -L/usr/aarch64-unknown-linux-gnu/lib64 -L/usr/lib64/binutils/aarch64-unknown-linux-gnu/2.4264 -L/usr/local/lib64 -L/lib64 -L/usr/lib64 -L/usr/aarch64-unknown-linux-gnu/lib -L/usr/lib64/binutils/aarch64-unknown-linux-gnu/2.42 -L/usr/local/lib -L/lib -L/usr/lib -Wl,--hash-style=sysv -o tmpdir/warn -L/var/tmp/portage/sys-devel/binutils-2.42-r1/work/binutils-2.42/ld/testsuite/ld-elf -Wl,--no-as-needed tmpdir/beginwarn.o tmpdir/libfoov.so tmpdir/main.o 2>&1} /dev/null ld.tmp (timeout = 300) spawn [open ...] /var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/ld/.libs/ld-new: cannot find tmpdir/beginwarn.o: No such file or directory collect2: error: ld returned 1 exit status /var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/ld/.libs/ld-new: cannot find tmpdir/beginwarn.o: No such file or directory collect2: error: ld returned 1 exit status returned with: </var/tmp/portage/sys-devel/binutils-2.42-r1/work/build/ld/.libs/ld-new: cannot find tmpdir/beginwarn.o: No such file or directory collect2: error: ld returned 1 exit status>, expected: <^.*beginwarn.c:7:\(.*\): warning: function foo is deprecated\n?$> FAIL: Run warn with versioned libfoo.so ``` I don't get what it's doing there (why is it missing -g and now failing)? Does reordering the params help as attached?
Created attachment 895720 [details] build.log and emerge --info Nope, still one fail.
Sent the -g patch upstream at https://inbox.sourceware.org/binutils/20240629101136.3316896-1-sam@gentoo.org/T/#u.
commit 2c932a9d704ff21cafe606bc09d254e3d48c551b Author: Andreas K. Hüttel <dilfridge@gentoo.org> Date: Sat Jun 29 18:15:43 2024 +0200 sys-devel/binutils: bump 2.42-r2 to patchset 5, reverts some gentoo-specific stuff Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> It doesn't have the -g fix though.
commit 42ba5b56c4e1f8713f8470f55a2ec12c2726ea3a Author: Andreas K. Hüttel <dilfridge@gentoo.org> Date: Sat Jun 29 18:50:40 2024 +0200 sys-devel/binutils: bump to patchlevel 6, one more test fix Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04d86e2eab73e1bc80940c4cb7630a681172fd1d commit 04d86e2eab73e1bc80940c4cb7630a681172fd1d Author: Matoro Mahri <matoro_gentoo@matoro.tk> AuthorDate: 2024-07-15 03:28:31 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2024-07-15 05:47:25 +0000 profiles/arch: mask sys-devel/binutils{,-hppa64}[{default-,}gold] Bug: https://bugs.gentoo.org/934149 Bug: https://bugs.gentoo.org/934151 Bug: https://bugs.gentoo.org/936022 Bug: https://bugs.gentoo.org/936021 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Signed-off-by: Ionen Wolkens <ionen@gentoo.org> profiles/arch/arm/package.use.mask | 6 ++++++ profiles/arch/arm64/package.use.mask | 6 ++++++ profiles/arch/base/package.use.mask | 7 +++++++ 3 files changed, 19 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7200aecb3db3b2dd91129e1530bcb75ce096af91 commit 7200aecb3db3b2dd91129e1530bcb75ce096af91 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-08-08 10:48:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-08-08 10:48:00 +0000 toolchain.eclass: add -g for tests I haven't looked closely yet but I think this is the same as the binutils issue from before. Bug: https://bugs.gentoo.org/934149 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 4 ++++ 1 file changed, 4 insertions(+)