Bug 1755317 - BUG: libbpf.so lacks dependency on libelf.so
Summary: BUG: libbpf.so lacks dependency on libelf.so
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libbpf
Version: rawhide
Hardware: All
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-09-25 08:58 UTC by Ondrej Mosnacek
Modified: 2019-10-16 08:21 UTC (History)
2 users (show)

Fixed In Version: libbpf-devel-0.0.5-1.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 08:21:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ondrej Mosnacek 2019-09-25 08:58:03 UTC
Description of problem:
libbpf.so shipped in the new standalone libbpf package lacks proper dependency on libelf.so, leading to errors when linking against it.

See: https://lore.kernel.org/selinux/156936589827.661145.16998799838921887816.stgit@chester/T/


Version-Release number of selected component (if applicable):
libbpf-0.0.3-1.fc32.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. dnf install -y libbpf-devel
2. ldd /usr/lib64/libbpf.so

Actual results:
        linux-vdso.so.1 (0x00007ffd2cbfc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f575beec000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f575c0db000)


Expected results:
When I compile libbpf from source manually on Rawhide, I get:
        linux-vdso.so.1 (0x00007ffc7e713000)
        libelf.so.1 => /lib64/libelf.so.1 (0x00007f6767a53000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f676788a000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f6767870000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6767a91000)


Additional info:
Is likely related to the position of -lelf on the gcc command line (but I was unable to reproduce it with gcc 9.2.1-1 on rawhide, so I'm confused):
https://github.com/libbpf/libbpf/pull/72

Comment 1 Jiri Olsa 2019-09-25 12:27:46 UTC
I have the scratch build with the fix in here:
  https://koji.fedoraproject.org/koji/taskinfo?taskID=37855661

please let me know if it's working for you

thanks,
jirka

Comment 2 Ondrej Mosnacek 2019-09-25 12:56:52 UTC
Yes, it works. I get the expected ldd output and also the selinux-testsuite builds fine with it. Thanks!

Comment 3 Jiri Olsa 2019-09-25 14:37:37 UTC
pushed to build libbpf-0.0.3-2.fc32


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