Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638282 - sys-apps/iproute2-4.14.0 has automagic dependency on dev-libs/elfutils
Summary: sys-apps/iproute2-4.14.0 has automagic dependency on dev-libs/elfutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-20 22:39 UTC by Samuel Holland
Modified: 2017-11-22 22:25 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Holland 2017-11-20 22:39:16 UTC
It looks like HAVE_ELF needs to be set in src_configure(), and possibly a USE flag added. libelf is used for parsing of compiled eBPF programs by ip and tc.

https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/tree/configure?h=v4.14.0#n264

Otherwise I am getting this on a machine without elfutils:
# ip
Error loading shared library libelf.so.1: No such file or directory (needed by /bin/ip)
Error relocating /bin/ip: elf_getdata: symbol not found
Error relocating /bin/ip: elf_end: symbol not found
Error relocating /bin/ip: gelf_getehdr: symbol not found
Error relocating /bin/ip: gelf_getsym: symbol not found
Error relocating /bin/ip: elf_kind: symbol not found
Error relocating /bin/ip: elf_version: symbol not found
Error relocating /bin/ip: gelf_getshdr: symbol not found
Error relocating /bin/ip: elf_getscn: symbol not found
Error relocating /bin/ip: gelf_getrel: symbol not found
Error relocating /bin/ip: elf_begin: symbol not found
Error relocating /bin/ip: elf_strptr: symbol not found

On the machine with elfutils installed:
# lddtree /bin/ip
ip => /bin/ip (interpreter => /lib/ld-musl-x86_64.so.1)
    libelf.so.1 => /usr/lib/libelf.so.1
        libz.so.1 => /lib/libz.so.1
    libmnl.so.0 => /lib/libmnl.so.0
    libc.so => /usr/lib/libc.so

# emerge -pv iproute2
[ebuild   R   ~] sys-apps/iproute2-4.14.0::musl  USE="ipv6 -atm -berkdb -iptables -minimal (-selinux)" 0 KiB
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-11-22 21:21:12 UTC
Working on it, putting behind USE=minimal
Comment 2 Larry the Git Cow gentoo-dev 2017-11-22 22:25:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f267bc0727e3d886323497f8a741cf97b193b0a

commit 6f267bc0727e3d886323497f8a741cf97b193b0a
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2017-11-22 21:08:18 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2017-11-22 22:25:09 +0000

    sys-apps/iproute2: fix automagic libelf dep.
    
    iproute2 has been automagically linking against libelf for a long time.
    It is only used for eBPF programs, so isn't critical in most cases.
    
    Declare the dep via virtual/libelf, but put it behind USE=-minimal, as
    with libmnl.
    
    Closes: https://bugs.gentoo.org/638282
    Package-Manager: Portage-2.3.8, Repoman-2.3.3
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 sys-apps/iproute2/Manifest               | 24 ++++++++++++------------
 sys-apps/iproute2/iproute2-4.10.0.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.11.0.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.12.0.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.13.0.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.14.0.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.14.1.ebuild |  3 ++-
 sys-apps/iproute2/iproute2-4.4.0.ebuild  |  5 +++--
 sys-apps/iproute2/iproute2-4.5.0.ebuild  |  5 +++--
 sys-apps/iproute2/iproute2-4.6.0.ebuild  |  5 +++--
 sys-apps/iproute2/iproute2-4.7.0.ebuild  |  5 +++--
 sys-apps/iproute2/iproute2-4.8.0.ebuild  |  5 +++--
 sys-apps/iproute2/iproute2-4.9.0.ebuild  |  5 +++--
 sys-apps/iproute2/metadata.xml           |  2 +-
 14 files changed, 43 insertions(+), 31 deletions(-)