Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794601 - dev-libs/elfutils-0.185 - elflint.c:(.text+<snip>): undefined reference to buffer_left
Summary: dev-libs/elfutils-0.185 - elflint.c:(.text+<snip>): undefined reference to bu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/pipermail/elfu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-06 16:12 UTC by Toralf Förster
Modified: 2021-06-17 10:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,14.96 KB, text/plain)
2021-06-06 16:12 UTC, Toralf Förster
Details
dev-libs:elfutils-0.185:20210606-151042.log (dev-libs:elfutils-0.185:20210606-151042.log,750.21 KB, text/plain)
2021-06-06 16:12 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,1.08 KB, text/plain)
2021-06-06 16:12 UTC, Toralf Förster
Details
environment (environment,88.21 KB, text/plain)
2021-06-06 16:12 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,18.89 KB, application/x-bzip)
2021-06-06 16:12 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,21.10 KB, application/x-bzip)
2021-06-06 16:12 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,43.56 KB, application/x-bzip)
2021-06-06 16:12 UTC, Toralf Förster
Details
elfutils-0.185-static-inline.patch (elfutils-0.185-static-inline.patch,361 bytes, patch)
2021-06-06 17:51 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-06-06 16:12:39 UTC
/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)"
Comment 1 Toralf Förster gentoo-dev 2021-06-06 16:12:40 UTC
Created attachment 713988 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-06-06 16:12:42 UTC
Created attachment 713991 [details]
dev-libs:elfutils-0.185:20210606-151042.log
Comment 3 Toralf Förster gentoo-dev 2021-06-06 16:12:43 UTC
Created attachment 713994 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-06-06 16:12:45 UTC
Created attachment 713997 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-06-06 16:12:46 UTC
Created attachment 714000 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-06-06 16:12:47 UTC
Created attachment 714003 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2021-06-06 16:12:49 UTC
Created attachment 714006 [details]
temp.tar.bz2
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 17:51:14 UTC
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
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 18:08:22 UTC
> 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
Comment 10 Toralf Förster gentoo-dev 2021-06-06 19:33:31 UTC
(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]
Comment 11 Toralf Förster gentoo-dev 2021-06-06 19:44:36 UTC
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
Comment 12 Toralf Förster gentoo-dev 2021-06-06 19:49:54 UTC
(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
Comment 13 Larry the Git Cow gentoo-dev 2021-06-06 20:37:49 UTC
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(+)
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 22:58:29 UTC
Proposed patch upstream as https://sourceware.org/pipermail/elfutils-devel/2021q2/003861.html