Re: [PATCH dwarves v3] libbpf: allow to use packaged version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Boccassi wrote on Tue, Mar 30, 2021 at 12:06:09PM +0100:
> > I did not realise it was reverted (if I was pinged and I missed it:
> > sorry about that) - what was the issue precisely? This has been used on
> > Ubuntu and Debian for a few months now, no problems reported.
> > Happy to have a look too if needed.

(FWIW I also have used that patch for alpine linux, and got rebuked for
expliciting there is a vendored lib when pushing a nixos update so will
probably need it there as well)

> As far as I can see, on Fedora 33 the only CMake option used is '-
> DCMAKE_BUILD_TYPE=Release':
> 
> https://src.fedoraproject.org/rpms/dwarves/blob/f33/f/dwarves.spec
> 
> On my Debian system, with libbpf-dev installed and after re-instating
> the patch on an up-to-date master branch of pahole.git, this builds
> just fine:

I just got home where I have a fedora 33 machine and can confirm it
works for me on f33 as well.

I tried:
 - normal rpmbuild with libbpf + libbpf-devel / libbpf-static installed
 - just libbpf installed
 in both these cases it rebuilds the local libbpf (if the git tree is
 in the tarball it does the submodule checkout, if it's not it
 complains if libbpf wasn't previously checked out but uses it
 properly if it's there)
 
 - just to make sure I've done an extra build from the tarball obtained
with `fedpkg sources` and applying just the reverted patch manually;
this also worked as expected.

- I figured it might be a problem on another arch but I don't see
any failure on koji[1], so can't really test that easily.
[1] https://koji.fedoraproject.org/koji/packageinfo?packageID=5540

 - For completeness I also tried building with fedora's libbpf-devel and
`-DLIBBPF_EMBEDDED=OFF` without any problem (it will obviously need a
libbpf update for the float types, but as of 1.20 it works fine with
libbpf 0.3)
----------
diff --git a/rpm/SPECS/dwarves.spec b/rpm/SPECS/dwarves.spec
index 98433e395b6c..f28bca0fa088 100644
--- a/rpm/SPECS/dwarves.spec
+++ b/rpm/SPECS/dwarves.spec
@@ -13,6 +13,7 @@ BuildRequires: gcc
 BuildRequires: cmake >= 2.8.12
 BuildRequires: zlib-devel
 BuildRequires: elfutils-devel >= 0.130
+BuildRequires: libbpf-devel
 
 %description
 dwarves is a set of tools that use the debugging information inserted in
@@ -67,7 +68,7 @@ Debugging information processing library development files.
 %setup -q
 
 %build
-%cmake -DCMAKE_BUILD_TYPE=Release .
+%cmake -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF .
 %cmake_build
 
 %install
----------

Would appreciate more details if there's anything we can do; my guess is
that there might have been leftovers from a previous cmake run maybe
(potentially with previous versions of the patch) and just trying to
reproduce from a fresh build doesn't get us anywhere... cmake can be
annoying with its cache sometimes.


Thanks,
-- 
Dominique



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux