/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.o: in function `check_attributes': elflint.c:(.text+0xdcff): undefined reference to `buffer_left' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.c:(.text+0xe557): undefined reference to `buffer_left' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.c:(.text+0xe574): undefined reference to `buffer_left' collect2: error: ld returned 1 exit status x86_64-pc-linux-gnu-gcc -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Wunused -Wextra -Wstack-usage=262144 -pipe -march=native -fno-diagnostics-color -Wl,-rpath-link,../libelf:../libdw -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--build-id -o addr2line addr2line.o ../libdw/libdw.so ../libelf/libelf.so ../lib/libeu.a -lstdc++ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_systemd-j3-20210606-144650 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-11.1.0 * Python 3.9.4 HEAD of ::gentoo commit 5ca6ba96871cd4b38e0ddcdd25419ff9388c75ae Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sun Jun 6 14:35:15 2021 +0000 2021-06-06 14:35:14 UTC emerge -qpvO dev-libs/elfutils [ebuild N ] dev-libs/elfutils-0.185 USE="bzip2 nls utils -lzma -static-libs -test (-threads) -valgrind -zstd" ABI_X86="(64) -32 (-x32)"
Created attachment 713988 [details] emerge-info.txt
Created attachment 713991 [details] dev-libs:elfutils-0.185:20210606-151042.log
Created attachment 713994 [details] emerge-history.txt
Created attachment 713997 [details] environment
Created attachment 714000 [details] etc.portage.tar.bz2
Created attachment 714003 [details] logs.tar.bz2
Created attachment 714006 [details] temp.tar.bz2
Created attachment 714030 [details, diff] elfutils-0.185-static-inline.patch It's not readily reproducible on my system (probably due to slight difference of compiler flags). Can you try the following patch to see if it works? elfutils-0.185-static-inline.patch
> CFLAGS="-pipe -march=native -fno-diagnostics-color " Also, can you expand -march=native using https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options
(In reply to Sergei Trofimovich from comment #9) > > CFLAGS="-pipe -march=native -fno-diagnostics-color " > > Also, can you expand -march=native using > https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative. > 2C_exact_gcc_version_and_other_system-specific_options 17_1_systemd-j3-20210606-144650 /var/tmp/tb # arch=znver3; for t in param target; do cmd="gcc -Q -O2 -march=$arch --help=$t"; diff -U0 <(LANG=C $cmd) <(LANG=C $cmd -march=native); done --- /dev/fd/63 2021-06-06 21:33:11.333143744 +0200 +++ /dev/fd/62 2021-06-06 21:33:11.333143744 +0200 @@ -157 +157 @@ - -mshstk [disabled] + -mshstk [enabled]
At another image 17.1_desktop_gnome-j3-20210606-181430 with 0.184 O run into a similar issue: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.o: in function `check_attributes': elflint.c:(.text+0xdcff): undefined reference to `buffer_left' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.c:(.text+0xe557): undefined reference to `buffer_left' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: elflint.c:(.text+0xe574): undefined reference to `buffer_left' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:672: elflint] Error 1
(In reply to Sergei Trofimovich from comment #8) > Created attachment 714030 [details, diff] [details, diff] > elfutils-0.185-static-inline.patch > > It's not readily reproducible on my system (probably due to slight > difference of compiler flags). Can you try the following patch to see if it > works? > > elfutils-0.185-static-inline.patch emerged worked at that image after tweaking this patch by removing first 3 lines
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1933ad5420dada4392022b5571f631f0a5bb21a4 commit 1933ad5420dada4392022b5571f631f0a5bb21a4 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-06 20:37:31 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-06 20:37:47 +0000 dev-libs/elfutils: tweak inline annotation Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/794601 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-libs/elfutils/elfutils-0.185.ebuild | 1 + dev-libs/elfutils/files/elfutils-0.185-static-inline.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+)
Proposed patch upstream as https://sourceware.org/pipermail/elfutils-devel/2021q2/003861.html