The dependency on bcc is being retired, though my understanding is that the initial release of bpftrace-0.23 will still be able to use it as fallback (see $URL). The replacement will be a new Rust-based library by Meta: https://github.com/libbpf/blazesym/ I made an initial prototype ebuild here: https://github.com/hhoffstaette/gentoo/tree/blazesym/dev-libs/blazesym-capi It builds and installs, albeit manually-ish for now. For some reason using cargo-c did not work at all (build aborts immediately). A pkgconfig .pc file would be nice, as would be proper major.minor soname (missing upstream). Hopefully the ebuild can act as starting point. Naming & versioning are open to change, I will open upstream bugs about those since it's not clear whether the version of the ebuild/library should be the blazesym part or the C API, both of which have different crate versions. Reproducible: Always Steps to Reproduce: 1. build bpftrace-0.23 once it's out 2. blazesym is missing
Note that in https://github.com/hhoffstaette/gentoo/commit/1d2efd2a2e60e95aca0c72023d1e8e1e492526f6, you didn't have the src_install bit at least (using raw cargo_src_install won't work, need the cargo-c magic again, see examples in-tree).
(In reply to Sam James from comment #1) > Note that in > https://github.com/hhoffstaette/gentoo/commit/ > 1d2efd2a2e60e95aca0c72023d1e8e1e492526f6, you didn't have the src_install > bit at least (using raw cargo_src_install won't work, need the cargo-c magic > again, see examples in-tree). Thanks for looking - the latest version has a manual src_install that seems to work (gross, but..) I got further with using cargo-c's cbuild command (added the missing feature), but it seems it will not work since blazesym currently uses a hacked version of cbindgen, which cargo-c does not know about and then fails to read the cbindgen config file. At least I think that's what happening, I'll file a bug in cargo-c for clarification and link here.
Ah, thanks (and gross)...
New ebuild with upstream- and artifact-consistent name at: https://github.com/hhoffstaette/gentoo/tree/blazesym/dev-libs/blazesym_c Now adds cargo-c awareness to blazesym and uses cargo-c, which in turn generates a proper .so, a valid pkgconfig, .so symlinks AND does your laundry.
And just in time: initial bpftrace-0.23.0 at https://github.com/hhoffstaette/gentoo/tree/bpftrace-update/dev-debug/bpftrace Mostly lldb removal and a new dependency on cereal. Feel free to steal. No blazesym yet, will look at that next.
The current bpftrace-0.23 ebuild picks up blazesym automagically when it is installed (no dependency yet), and the result works fine: $ldd /usr/bin/bpftrace ... libblazesym_c.so.0.1 => /usr/lib64/libblazesym_c.so.0.1 (0x00007f4e99ca1000) ... $bpftrace -e "tracepoint:raw_syscalls:sys_enter /pid == $(pidof firefox)/ { @[comm] = count(); }" Attaching 1 probe... ^C @[ImageIO]: 4 @[TaskCon~ller #1]: 4 @[sqldb:c~lite #5]: 4 @[FSBroker1597]: 6 @[sqldb:p~lite #4]: 9 @[DNS Res~ver #17]: 10 @[AudioIP~ver RPC]: 10 ..etc.. \o/
I'm trying to get a GH-hosted crate tarball going and will then make a PR. Right now I'm hosting that on my personal server, which is a bit awkward. Patrick, Yichun: is it OK if I add you also to dev-libs/blazesym_c metadata.xml, just like with bpftrace?
(In reply to Holger Hoffstätte from comment #7) > Patrick, Yichun: is it OK if I add you also to dev-libs/blazesym_c > metadata.xml, just like with bpftrace? fine by me if you want to keep me posted (TBO I've not spent much time on BPF), so thanks for taking care of it
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff14aaada5967ae3479093287cb48b2b0cbe5725 commit ff14aaada5967ae3479093287cb48b2b0cbe5725 Author: Holger Hoffstätte <holger@applied-asynchrony.com> AuthorDate: 2025-03-26 18:50:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-27 11:48:08 +0000 dev-debug/bpftrace: add 0.23.0 This release preemptively drops support for USE=lldb, which has been removed upstream. It also adopts blazesym for address symbolization and adds support for LLVM-20. Closes: https://bugs.gentoo.org/952001 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/41312 Signed-off-by: Sam James <sam@gentoo.org> dev-debug/bpftrace/Manifest | 2 + dev-debug/bpftrace/bpftrace-0.23.0.ebuild | 109 ++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+)