[Buildroot] [PATCH 2/3] package/bpftrace: bump to version 0.26.1 to fix build with LLVM 22

Thomas Perale thomas.perale at mind.be
Fri Sep 4 12:17:39 UTC 2026


In reply of:
> Since Buildroot commit 25cb3813e7fc6ed3e455f983cf0e09c7bc02fccb which
> bumped LLVM from 21.x to 22.x, the build of bpftrace is broken as
> bpftrace 0.24.2 only supports LLVM up to 21.
> 
> We tried backporting the bpftrace patch that allows using LLVM up to
> version 22 but the patch didn't apply cleanly but more importantly it
> wasn't clear if this patch was sufficient. Therefore, we opt for
> bumping bpftrace entirely to fix the issue.
> 
> Packaging changes:
> 
> - The new version of bpftrace no longer needs host-bison/host-flex,
>   because bpftrace is now using a handwritten parser.
> 
> - Pass -DUSE_SYSTEM_LIBBPF:BOOL=ON to ensure the system libbpf version
>   is used, and not the bundled version
> 
> - Now depends on kernel headers >= 5.10 because it needs CAP_BPF and
>   CAP_PERFMON
> 
> Fixes:
> 
>   https://autobuild.buildroot.net/results/a3e3fd696685864977c688aa11c2653357cf6207/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>

Applied to 2026.05.x. Thanks

> ---
>  package/bpftrace/Config.in     | 6 +++---
>  package/bpftrace/bpftrace.hash | 2 +-
>  package/bpftrace/bpftrace.mk   | 7 +++----
>  3 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/package/bpftrace/Config.in b/package/bpftrace/Config.in
> index 8af94443ab..2beb2fdb95 100644
> --- a/package/bpftrace/Config.in
> +++ b/package/bpftrace/Config.in
> @@ -14,7 +14,7 @@ config BR2_PACKAGE_BPFTRACE
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # bcc -> clang
>  	depends on BR2_INSTALL_LIBSTDCPP # bcc -> clang
>  	depends on BR2_HOST_GCC_AT_LEAST_7 # bcc -> clang
> -	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 # libbpf
> +	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 # CAP_BPF, CAP_PERFMON
>  	depends on BR2_USE_WCHAR # bcc -> clang, bcc -> python3, libbpf
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # bcc -> clang, bcc -> python3, libbpf
>  	depends on !BR2_STATIC_LIBS # bcc -> clang, bcc -> python3, libbpf
> @@ -47,10 +47,10 @@ config BR2_PACKAGE_BPFTRACE
>  
>  	  https://www.github.com/iovisor/bpftrace
>  
> -comment "bpftrace needs a glibc toolchain w/ C++, gcc >= 7, host gcc >= 7, kernel headers >= 4.13"
> +comment "bpftrace needs a glibc toolchain w/ C++, gcc >= 7, host gcc >= 7, kernel headers >= 5.10"
>  	depends on BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
>  	depends on BR2_USE_MMU
>  	depends on BR2_TOOLCHAIN_HAS_SYNC_4
>  	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP \
>  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_HOST_GCC_AT_LEAST_7 \
> -		|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
> +		|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
> diff --git a/package/bpftrace/bpftrace.hash b/package/bpftrace/bpftrace.hash
> index 4add96aee3..48572d1c58 100644
> --- a/package/bpftrace/bpftrace.hash
> +++ b/package/bpftrace/bpftrace.hash
> @@ -1,3 +1,3 @@
>  # locally calculated
> -sha256  e0514aa3e1a032b0b2de2cf3c281bfee9b9e80509498e70ed78786bbd64db373  bpftrace-0.24.2.tar.gz
> +sha256  555368f32f94bfcb74b119a3d9c67b68200be6375b8f452f794a2d3f6ebbcd16  bpftrace-0.26.1.tar.gz
>  sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
> diff --git a/package/bpftrace/bpftrace.mk b/package/bpftrace/bpftrace.mk
> index f530d4861b..7c9bc6b7a4 100644
> --- a/package/bpftrace/bpftrace.mk
> +++ b/package/bpftrace/bpftrace.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -BPFTRACE_VERSION = 0.24.2
> +BPFTRACE_VERSION = 0.26.1
>  BPFTRACE_SITE = $(call github,bpftrace,bpftrace,v$(BPFTRACE_VERSION))
>  BPFTRACE_LICENSE = Apache-2.0
>  BPFTRACE_LICENSE_FILES = LICENSE
> @@ -13,8 +13,6 @@ BPFTRACE_DEPENDENCIES = \
>  	bzip2 \
>  	cereal \
>  	elfutils \
> -	host-bison \
> -	host-flex \
>  	host-vim \
>  	libbpf \
>  	llvm \
> @@ -29,6 +27,7 @@ BPFTRACE_CONF_OPTS += \
>  	-DBUILD_SHARED_LIBS:BOOL=OFF \
>  	-DBUILD_TESTING:BOOL=OFF \
>  	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/bpf" \
> -	-DENABLE_MAN:BOOL=OFF
> +	-DENABLE_MAN:BOOL=OFF \
> +	-DUSE_SYSTEM_LIBBPF:BOOL=ON
>  
>  $(eval $(cmake-package))
> -- 
> 2.55.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


More information about the buildroot mailing list