Package Details: bpftrace-git r2483.d3ca1611-1

Git Clone URL: https://aur.archlinux.org/bpftrace-git.git (read-only, click to copy)
Package Base: bpftrace-git
Description: High-level tracing language for Linux eBPF
Upstream URL: https://github.com/iovisor/bpftrace
Licenses: Apache
Conflicts: bpftrace
Provides: bpftrace
Submitter: cippaciong
Maintainer: cippaciong
Last Packager: cippaciong
Votes: 2
Popularity: 0.000004
First Submitted: 2018-10-10 13:41 (UTC)
Last Updated: 2021-12-29 00:15 (UTC)

Latest Comments

1 2 Next › Last »

arenm commented on 2022-07-09 18:53 (UTC)

It looks like bpftrace needs gtest as a make dependency

SPYFF commented on 2021-12-28 23:13 (UTC)

Hi! Thanks for the package.

The bpftrace --info show the following:

  libbpf btf dump: no
  libbpf btf dump type decl: no
  btf (depends on Build:libbpf): no

I suggest add libbpf as a dependency and recompile it with that.

tuxsavvy commented on 2021-08-16 15:48 (UTC)

Hi, thanks for maintaining this package. The latest version appears to require asciidoctor, here is a patch for PKGBUILD which rectifies that:

--- PKGBUILD.orig
+++ PKGBUILD
@@ -1,14 +1,14 @@
 # Maintainer: Tommaso Sardelli <lacapannadelloziotom at gmail dot com>
 pkgname=bpftrace-git
 _pkgname=bpftrace
-pkgver=r2315.fd0461dc
+pkgver=r2356.24e1ca2f
 pkgrel=1
 pkgdesc='High-level tracing language for Linux eBPF'
 arch=('i686' 'x86_64')
 url="https://github.com/iovisor/bpftrace"
 license=('Apache')
 depends=('libelf' 'zlib' 'llvm-libs' 'clang' 'bcc')
-makedepends=('cmake' 'git' 'llvm' 'cereal')
+makedepends=('cmake' 'git' 'llvm' 'cereal' 'asciidoctor')
 conflicts=('bpftrace')
 provides=('bpftrace')
 source=("git+https://github.com/iovisor/bpftrace.git")

cippaciong commented on 2021-07-17 20:39 (UTC)

@ludat: updated, thanks :)

ludat commented on 2021-07-15 04:17 (UTC)

bpftrace now needs cereal to build.

ulidtko commented on 2020-07-01 14:36 (UTC)

Cross-posting from the non-git package (which doesn't compile for me atm):

This PKGBUILD needs to disable stripping of the built bpftrace binary.

Because stripping breaks BEGIN/END probes, testcase:

sudo bpftrace -e 'BEGIN { @++ }'
Attaching 1 probe...
Could not resolve symbol: /proc/self/exe:BEGIN_trigger

Patch:

diff --git i/PKGBUILD w/PKGBUILD
index 8529b18..70bb65b 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -13,6 +13,7 @@ conflicts=('bpftrace')
 provides=('bpftrace')
 source=("git+https://github.com/iovisor/bpftrace.git")
 sha512sums=('SKIP')
+options=('!strip') #-- https://github.com/iovisor/bpftrace/issues/954

 pkgver() {
   cd "$srcdir/$_pkgname"

cippaciong commented on 2019-10-27 23:06 (UTC) (edited on 2019-10-27 23:08 (UTC) by cippaciong)

@Jonhoo: thanks for reporting, I can reproduce the issue also for the non -git version of bpftrace but I'm not quite sure what is causing it. My guess is that it might be related to some changes in recent versions of kernel/llvm/bcc since at least the latest release, used to build correctly when I created the PKGBUILD. I will report the issue upstream and see if they can help.

@k3a: Which versions of linux/llvm/bcc do you have on your system? Did you install libbpf as well?

k3a commented on 2019-10-25 16:59 (UTC) (edited on 2019-10-25 17:02 (UTC) by k3a)

I came across the same problem as Jonhoo but bpf was not needed! What fixed it for me was the removal of trizen temporary build files (I use trizen for AUR packages): rm -rf /var/tmp/trizen-user/bpftrace-git

The next request for installation trizen -S bpftrace-git then fetched the git repo again and resulted in successful build.

Strange, does anyone know why? Isn't it doing git pull / checkout before every build? Or maybe make clean is needed before make?!

Jonhoo commented on 2019-10-21 14:57 (UTC)

Interesting, I'm now having the exact same build problem again:

/home/jon/.cache/aurman/bpftrace-git/src/bpftrace/src/attached_probe.cpp:374:15: error: ‘bpf_prog_load’ was not declared in this scope; did you mean ‘bcc_prog_load’?
  374 |     progfd_ = bpf_prog_load(progtype(probe_.type), namep,
      |               ^~~~~~~~~~~~~
      |               bcc_prog_load

I tried cloning bpftrace directly from git and running the same cmake command as in the PKGBUILD, and then get:

-- Please install the libbpf development package (missing: LIBBPF_LIBRARIES LIBBPF_INCLUDE_DIRS)

If I run locate libbpf, I get only one file, and that is /usr/include/bcc/libbpf.h, so I'm pretty sure that library is indeed missing (I have both bcc and bpf installed).

Jonhoo commented on 2019-06-10 13:35 (UTC)

Oh, that's so weird, it now builds again even without bpf. I wonder how that happened. It definitely did not build before, and was complaining about missing something like bpf_prog_load. Oh well, ignore me I suppose :)