Skip to contentSkip to conversation

rtla: Fix build failure without libbpf

GIT PULL Merged Steven Rostedt 2 participants 2 messages Mar 30 Real-time Linux Analysis (rtla) tools

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

Linus,

rtla fixes for 7.0:

- Fix build failure when libbpf does not exist

RTLA supports building without BPF libraries, but a recent change added a libbpf.h include outside of the BPF protection which caused build failures when libbpf was not installed.

Please pull the latest trace-rtla-v7.0-rc5 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-rtla-v7.0-rc5

Tag SHA1: 816c62dbcd7d5f2e9f6caa1ce77a9b77c1b20014 Head SHA1: 2e8b1a1d12ae3338efeb1c3de3eb4e9324b87a28

Tomas Glozar (1):
rtla: Fix build without libbpf header

----

 tools/tracing/rtla/src/timerlat_bpf.h | 1 -
 1 file changed, 1 deletion(-)
---------------------------
commit 2e8b1a1d12ae3338efeb1c3de3eb4e9324b87a28
Author: Tomas Glozar <[email protected]>
Date:   Mon Mar 30 11:12:07 2026 +0200

rtla: Fix build without libbpf header

rtla supports building without libbpf. However, BPF actions patchset [1] adds an include of bpf/libbpf.h into timerlat_bpf.h, which breaks build on systems that don't have libbpf headers installed.

This is a leftover from a draft version of the patchset where timerlat_bpf_set_action() (which takes a struct bpf_program * argument) was defined in the header. timerlat_bpf.c already includes bpf/libbpf.h via timerlat.skel.h when libbpf is present.

Remove the redundant include to fix build on systems without libbpf headers.

[1] https://lore.kernel.org/linux-trace-kernel/[email protected]/T/

tools/tracing/rtla/src/timerlat_bpf.h +0 -1
index 169abeaf4363..f7c5675737fe 100644
@@ -12,7 +12,6 @@ enum summary_field {
 };
 
 #ifndef __bpf__
-#include <bpf/libbpf.h>
 #ifdef HAVE_BPF_SKEL
 int timerlat_bpf_init(struct timerlat_params *params);
 int timerlat_bpf_attach(void);
merge bot Merged
#1 lore raw
The pull request you sent on Mon, 30 Mar 2026 12:52:26 -0400:

The pull request you sent on Mon, 30 Mar 2026 12:52:26 -0400:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-rtla-v7.0-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f1b24d8bdd64ecd5400dff79677f8a290ca70d73

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html