Bug 1766077 - libbpf is build without dependency on libelf
Summary: libbpf is build without dependency on libelf
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: libbpf
Version: 30
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jiri Olsa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-28 08:10 UTC by Eitan Bennun
Modified: 2019-11-21 08:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-11-21 08:20:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eitan Bennun 2019-10-28 08:10:40 UTC
Description of problem:
Failing to load libbpf due to undefined symbols. 
Missing dependency on libelf: 
[eitanb@eitanbn dev]$ ldd /lib64/libbpf.so.0  
	linux-vdso.so.1 (0x00007ffdc6dbf000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f910593f000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9105b45000)


Version-Release number of selected component (if applicable):
[eitanb@eitanbn dev]$ dnf info libbpf 
Installed Packages
Name         : libbpf
Epoch        : 1
Version      : 0.0.3
Release      : 1.fc30
Architecture : x86_64
Size         : 132 k
Source       : libbpf-0.0.3-1.fc30.src.rpm
Repository   : @System
From repo    : updates
Summary      : Libbpf library
URL          : https://github.com/libbpf/libbpf
License      : LGPLv2 or BSD
Description  : A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its
             : supporting header files. The version of the package reflects the version of
             : ABI.

Available Packages
Name         : libbpf
Epoch        : 1
Version      : 0.0.3
Release      : 1.fc30
Architecture : i686
Size         : 56 k
Source       : libbpf-0.0.3-1.fc30.src.rpm
Repository   : updates
Summary      : Libbpf library
URL          : https://github.com/libbpf/libbpf
License      : LGPLv2 or BSD
Description  : A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its
             : supporting header files. The version of the package reflects the version of
             : ABI.



How reproducible:
Always - just try to load libbpf on Fedora-30

Steps to Reproduce:
1. dnf update libbpf
2. ld /lib64/libbpf.so 
see the problem 

Actual results:
[eitanb@eitanbn dev]$ ld /lib64/libbpf.so 
ld: warning: cannot find entry symbol _start; not setting start address
ld: /lib64/libbpf.so: undefined reference to `gelf_getshdr'
ld: /lib64/libbpf.so: undefined reference to `elf_rawdata'
ld: /lib64/libbpf.so: undefined reference to `elf_getscn'
ld: /lib64/libbpf.so: undefined reference to `elf_begin'
ld: /lib64/libbpf.so: undefined reference to `gelf_getrel'
ld: /lib64/libbpf.so: undefined reference to `elf_memory'
ld: /lib64/libbpf.so: undefined reference to `elf_end'
ld: /lib64/libbpf.so: undefined reference to `elf_strptr'
ld: /lib64/libbpf.so: undefined reference to `elf_nextscn'
ld: /lib64/libbpf.so: undefined reference to `gelf_getehdr'
ld: /lib64/libbpf.so: undefined reference to `elf_version'
ld: /lib64/libbpf.so: undefined reference to `elf_getdata'
ld: /lib64/libbpf.so: undefined reference to `gelf_getsym'
[eitanb@eitanbn dev]$ 


Expected results:
[eitanb@r03s19 gerrit_core]$ ld /lib64/libbpf.so.0 
ld: warning: cannot find entry symbol _start; not setting start address
[eitanb@r03s19 gerrit_core]$ 


Additional info:

Comment 1 Jiri Olsa 2019-10-29 14:20:06 UTC
this got fixed in 0.0.3-2, please update retest

Comment 2 Eitan Bennun 2019-10-30 01:38:35 UTC
i pulled the git tree Fedore is using and build - it is working fine. 
For dnf update - 0.0.3-2 is not there... 
When is it planned to be staged as updated package for fedora-30? 
Thanks 
Eitan

Comment 3 Jiri Olsa 2019-10-30 07:28:07 UTC
(In reply to Eitan Bennun from comment #2)
> i pulled the git tree Fedore is using and build - it is working fine. 
> For dnf update - 0.0.3-2 is not there... 
> When is it planned to be staged as updated package for fedora-30? 
> Thanks 
> Eitan

hum, my fedora 30 is picking up version 0.0.5-1

jirka

Comment 4 Eitan Bennun 2019-10-30 10:16:06 UTC
checking if our local cache need synchronizing and get back to you,  
thanks

Comment 5 Eitan Bennun 2019-10-30 12:35:01 UTC
Maybe you are using testing/staging repo? 

I double checked and and verified fedora stable repos has 0.0.3-1 
I am getting 0.0.0.3-1 from fedore repo.  tried with refresh, remove and install again etc... 


For example check: https://fedora.ip-connect.info/linux/updates/30/Everything/x86_64/Packages/l/
look for libbpf

Comment 6 Eitan Bennun 2019-11-21 08:20:14 UTC
i got the fix on dnf update using libbpf.so.0.0.5
issue resolved . 
 
tx


Note You need to log in before you can comment on or make changes to this bug.