package/bpftrace: remove configure option USE_SYSTEM_BPF_BCC
PATCH 1/8 package/bpftrace: remove configure option USE_SYSTEM_BPF_BCC
Buildroot commit 305c40613ceab985bfa2abd094a96f3eb2aba5d9 bumped the package to 0.23.3 but forgot to remove the configure option USE_SYSTEM_BPF_BCC which was removed upstream in version 0.20.0:
https://github.com/bpftrace/bpftrace/commit/ef6d9d42d3a7a87116651d6c561de3a0a2693185
--- package/bpftrace/bpftrace.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/bpftrace/bpftrace.mk +1 -2
@@ -29,7 +29,6 @@ BPFTRACE_CONF_OPTS += \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DENABLE_MAN:BOOL=OFF \ - -DINSTALL_TOOL_DOCS:BOOL=OFF \ - -DUSE_SYSTEM_BPF_BCC:BOOL=ON + -DINSTALL_TOOL_DOCS:BOOL=OFF $(eval $(cmake-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/8 package/bpftrace: remove configure option INSTALL_TOOL_DOCS
Buildroot commit 97e2f63bdf4cc992787c570b17b099c41c5535d2 bumped the package to 0.24.2 but forgot to remove the configure option INSTALL_TOOL_DOCS which was removed upstream in version 0.24.0:
https://github.com/bpftrace/bpftrace/commit/579e0e9dfe613502d14b6091ed35b0dee7e90f22
--- package/bpftrace/bpftrace.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/bpftrace/bpftrace.mk +1 -2
@@ -28,7 +28,6 @@ endif BPFTRACE_CONF_OPTS += \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ - -DENABLE_MAN:BOOL=OFF \ - -DINSTALL_TOOL_DOCS:BOOL=OFF + -DENABLE_MAN:BOOL=OFF $(eval $(cmake-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 2/8] package/bpftrace: remove configure option INSTALL_TOOL_DOCS
In reply of:
Quoted 6 lines
Buildroot commit
97e2f63bdf4cc992787c570b17b099c41c5535d2bumped the package to 0.24.2 but forgot to remove the configure optionINSTALL_TOOL_DOCSwhich was removed upstream in version 0.24.0:
https://github.com/bpftrace/bpftrace/commit/579e0e9dfe613502d14b6091ed35b0dee7e90f22Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 24 lines
--- package/bpftrace/bpftrace.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)package/bpftrace/bpftrace.mk +1
-2@@ -28,7 +28,6 @@ endif BPFTRACE_CONF_OPTS += \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ - -DENABLE_MAN:BOOL=OFF \ - -DINSTALL_TOOL_DOCS:BOOL=OFF + -DENABLE_MAN:BOOL=OFF $(eval $(cmake-package))Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/8 package/bpftrace: fix build with per-package directories
In reply to Bernd KuhlsBuildroot commit f7b8508e4fe9c96bf679cc5423cc1500b6523e83 added the libbpf package which contains the usage of the 'install_uapi_headers' make target to update toolchain headers older than kernel version 5.9. This does not work with per-package directories.
Building this defconfig that includes all packages depending on libbpf:
BR2_x86_64=y
BR2_x86_rocketlake=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.8.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
BR2_PACKAGE_DPDK=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_HOST_PAHOLE=y
on the 2026.02.x branch as of 0be927b89a319c9ac35249354558e9f4cb102fd0 is broken:
output/build/bpftrace-0.24.2/src/attached_probe.cpp: In static member
function 'static bpftrace::Result<std::unique_ptr<bpftrace::AttachedIterProbe> > bpftrace::AttachedIterProbe::make(bpftrace::Probe&,
const bpftrace::BpfProgram&, std::optional<int>)':
output/build/bpftrace-0.24.2/src/attached_probe.cpp:1435:30: error:
aggregate 'bpf_iter_link_info linfo' has incomplete type and cannot be defined
1435 | union bpf_iter_link_info linfo;
Testing the defconfig took place on the 2026.02.x branch because the current master is broken due to the llvm bump to 22.x which causes an error already during configure stage. This will be addressed by another patch in this series.
libbpf overwrites kernel header files installed in $STAGING_DIR when they are too old by adding 'install_uapi_headers' as make target. In the case of per-package directories these header files are stored only in output/per-package/libbpf/.
When output/per-package/bpftrace/ is populated, the content of output/per-package/ from other packages overwrites the header files installed by libbpf because the list of rsync'ed packages is sorted alphabetically:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02.1/package/pkg-generic.mk#L796
To prevent this problem let libbpf install the updated kernel headers in a new directory and add a configure option to bpftrace which is needed because pkgconf is not used to detect libbpf:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/cmake/FindLibBpf.cmake#L9
Please note that libbpf will add '/linux' to the path provided in $UAPIDIR:
https://github.com/libbpf/libbpf/blob/v1.7.0/src/Makefile#L169
so the headers end up in the previously non-existing directory $(STAGING_DIR)/usr/include/bpf/linux/:
$ find output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/ -iname bpf.h -exec ls -lao {} \;
-rw-r--r-- 1 bernd 26434 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/bpf.h
-rw-r--r-- 1 bernd 283012 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h
-rw-r--r-- 12 bernd 160166 25. Apr 13:08 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.hbpf.h with 283012 bytes is the update-to-date version needed for bpftrace:
$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h
union bpf_iter_link_info {
$$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.h $
By adding '-I$(STAGING_DIR)/usr/include/bpf' to the CXXFLAGS of bpftrace its include finds the correct header:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/src/bpfprogram.cpp#L3
#include <linux/bpf.h>
The dpdk package uses pkgconf to detect libbpf and will use the updated .pc file:
https://github.com/DPDK/dpdk/blob/v25.11/drivers/net/tap/bpf/meson.build#L7
The iproute2 package is not affected by the problem because it contains "matching sanitized kernel headers":
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/README?h=v6.17.0#n44
As a host package pahole is also not affected.
Fixes:
https://autobuild.buildroot.net/results/d8b/d8b416e40bf7bd019cd93e6f2d42c98fc12d4160/
--- package/bpftrace/bpftrace.mk | 1 + package/libbpf/libbpf.mk | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
package/bpftrace/bpftrace.mk +1 -0
@@ -28,6 +28,7 @@ endif 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 $(eval $(cmake-package))
package/libbpf/libbpf.mk +6 -1
@@ -25,9 +25,14 @@ endef # toolchain. # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) -LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers +LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf +LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif +define LIBBPF_FIX_STAGING_PC + $(SED) 's/-I$${includedir}/-I$${includedir}\/bpf -I$${includedir}/' $(STAGING_DIR)/usr/lib/pkgconfig/libbpf.pc +endef + define LIBBPF_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ -C $(@D)/src install $(LIBBPF_UPDATE_UAPI_HEADERS) \
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/8] package/bpftrace: fix build with per-package directories
Quoted 7 lines · Bernd Kuhls
Buildroot commit
f7b8508e4fe9c96bf679cc5423cc1500b6523e83added the libbpf package which contains the usage of the 'install_uapi_headers' make target to update toolchain headers older than kernel version 5.9. This does not work with per-package directories.Building this defconfig that includes all packages depending on libbpf:
Quoted 11 lines
BR2_x86_64=y BR2_x86_rocketlake=y BR2_KERNEL_HEADERS_VERSION=y BR2_DEFAULT_KERNEL_VERSION="5.8.18" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PER_PACKAGE_DIRECTORIES=y BR2_PACKAGE_BPFTRACE=y BR2_PACKAGE_DPDK=y BR2_PACKAGE_IPROUTE2=y BR2_PACKAGE_HOST_PAHOLE=y
What about kmemd? At this point it is not affected because it depends on
headers >= 5.13, but the later patches could affect it? Or perhaps the kernel headers dependency in kmemd is actually not needed because it can use libbpf's headers?
Regards,
Arnout
Quoted 101 lines
on the 2026.02.x branch as of
0be927b89a319c9ac35249354558e9f4cb102fd0is broken:output/build/bpftrace-0.24.2/src/attached_probe.cpp: In static member
function 'static bpftrace::Result<std::unique_ptr<bpftrace::AttachedIterProbe> > bpftrace::AttachedIterProbe::make(bpftrace::Probe&,
const bpftrace::BpfProgram&, std::optional<int>)':
output/build/bpftrace-0.24.2/src/attached_probe.cpp:1435:30: error:
aggregate 'bpf_iter_link_infolinfo' has incomplete type and cannot be defined
1435 | unionbpf_iter_link_infolinfo;Testing the defconfig took place on the 2026.02.x branch because the current master is broken due to the llvm bump to 22.x which causes an error already during configure stage. This will be addressed by another patch in this series.
libbpf overwrites kernel header files installed in $STAGING_DIR when they are too old by adding '
install_uapi_headers' as make target. In the case of per-package directories these header files are stored only in output/per-package/libbpf/.When output/per-package/bpftrace/ is populated, the content of output/per-package/ from other packages overwrites the header files installed by libbpf because the list of rsync'ed packages is sorted alphabetically:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02.1/package/pkg-generic.mk#L796To prevent this problem let libbpf install the updated kernel headers in a new directory and add a configure option to bpftrace which is needed because pkgconf is not used to detect libbpf:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/cmake/FindLibBpf.cmake#L9Please note that libbpf will add '/linux' to the path provided in $UAPIDIR:
https://github.com/libbpf/libbpf/blob/v1.7.0/src/Makefile#L169
so the headers end up in the previously non-existing directory $(STAGING_DIR)/usr/include/bpf/linux/:$ find output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/ -iname bpf.h -exec ls -lao {} \;(quoted diff) +0
-3-rw-r--r-- 1 bernd 26434 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/bpf.h -rw-r--r-- 1 bernd 283012 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h -rw-r--r-- 12 bernd 160166 25. Apr 13:08 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.h
bpf.hwith 283012 bytes is the update-to-date version needed for bpftrace:$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h union bpf_iter_link_info { $$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.h $By adding '-I$(STAGING_DIR)/usr/include/bpf' to the CXXFLAGS of bpftrace its include finds the correct header:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/src/bpfprogram.cpp#L3#include <linux/bpf.h>The dpdk package uses pkgconf to detect libbpf and will use the updated .pc file:
https://github.com/DPDK/dpdk/blob/v25.11/drivers/net/tap/bpf/meson.build#L7The iproute2 package is not affected by the problem because it contains "matching sanitized kernel headers":
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/README?h=v6.17.0#n44As a host package pahole is also not affected.
Fixes:
https://autobuild.buildroot.net/results/d8b/d8b416e40bf7bd019cd93e6f2d42c98fc12d4160/Signed-off-by Bernd Kuhls <[email protected]>--- package/bpftrace/bpftrace.mk | 1 + package/libbpf/libbpf.mk | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)package/bpftrace/bpftrace.mk +1
-0@@ -28,6 +28,7 @@ endif 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 $(eval $(cmake-package))package/libbpf/libbpf.mk +1
-1@@ -25,9 +25,14 @@ endef # toolchain. # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) -LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers +LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf
package/libbpf/libbpf.mk endef · line 38
Quoted 10 lines
package/libbpf/libbpf.mk +5
-0+LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif +define LIBBPF_FIX_STAGING_PC + $(SED) 's/-I$${includedir}/-I$${includedir}\/bpf -I$${includedir}/' $(STAGING_DIR)/usr/lib/pkgconfig/libbpf.pc +endef + define LIBBPF_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ -C $(@D)/src install $(LIBBPF_UPDATE_UAPI_HEADERS) \
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 3/8] package/bpftrace: fix build with per-package directories
In reply to Bernd KuhlsIn reply of:
Quoted 86 lines
Buildroot commit
f7b8508e4fe9c96bf679cc5423cc1500b6523e83added the libbpf package which contains the usage of the 'install_uapi_headers' make target to update toolchain headers older than kernel version 5.9. This does not work with per-package directories.Building this defconfig that includes all packages depending on libbpf:
BR2_x86_64=y
BR2_x86_rocketlake=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.8.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
BR2_PACKAGE_DPDK=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_HOST_PAHOLE=yon the 2026.02.x branch as of
0be927b89a319c9ac35249354558e9f4cb102fd0is broken:output/build/bpftrace-0.24.2/src/attached_probe.cpp: In static member
function 'static bpftrace::Result<std::unique_ptr<bpftrace::AttachedIterProbe> > bpftrace::AttachedIterProbe::make(bpftrace::Probe&,
const bpftrace::BpfProgram&, std::optional<int>)':
output/build/bpftrace-0.24.2/src/attached_probe.cpp:1435:30: error:
aggregate 'bpf_iter_link_infolinfo' has incomplete type and cannot be defined
1435 | unionbpf_iter_link_infolinfo;Testing the defconfig took place on the 2026.02.x branch because the current master is broken due to the llvm bump to 22.x which causes an error already during configure stage. This will be addressed by another patch in this series.
libbpf overwrites kernel header files installed in $STAGING_DIR when they are too old by adding '
install_uapi_headers' as make target. In the case of per-package directories these header files are stored only in output/per-package/libbpf/.When output/per-package/bpftrace/ is populated, the content of output/per-package/ from other packages overwrites the header files installed by libbpf because the list of rsync'ed packages is sorted alphabetically:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02.1/package/pkg-generic.mk#L796To prevent this problem let libbpf install the updated kernel headers in a new directory and add a configure option to bpftrace which is needed because pkgconf is not used to detect libbpf:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/cmake/FindLibBpf.cmake#L9Please note that libbpf will add '/linux' to the path provided in $UAPIDIR:
https://github.com/libbpf/libbpf/blob/v1.7.0/src/Makefile#L169
so the headers end up in the previously non-existing directory $(STAGING_DIR)/usr/include/bpf/linux/:$ find output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/ -iname bpf.h -exec ls -lao {} \;(quoted diff) +0
-3-rw-r--r-- 1 bernd 26434 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/bpf.h -rw-r--r-- 1 bernd 283012 25. Apr 13:15 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h -rw-r--r-- 12 bernd 160166 25. Apr 13:08 output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.h
bpf.hwith 283012 bytes is the update-to-date version needed for bpftrace:$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bpf/linux/bpf.h union bpf_iter_link_info { $$ grep -m1 bpf_iter_link_info output/per-package/libbpf/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux/bpf.h $By adding '-I$(STAGING_DIR)/usr/include/bpf' to the CXXFLAGS of bpftrace its include finds the correct header:
https://github.com/bpftrace/bpftrace/blob/v0.25.1/src/bpfprogram.cpp#L3#include <linux/bpf.h>The dpdk package uses pkgconf to detect libbpf and will use the updated .pc file:
https://github.com/DPDK/dpdk/blob/v25.11/drivers/net/tap/bpf/meson.build#L7The iproute2 package is not affected by the problem because it contains "matching sanitized kernel headers":
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/README?h=v6.17.0#n44
Quoted 6 lines
As a host package pahole is also not affected.
Fixes:
https://autobuild.buildroot.net/results/d8b/d8b416e40bf7bd019cd93e6f2d42c98fc12d4160/Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 44 lines
--- package/bpftrace/bpftrace.mk | 1 + package/libbpf/libbpf.mk | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)package/bpftrace/bpftrace.mk +1
-0@@ -28,6 +28,7 @@ endif 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 $(eval $(cmake-package))package/libbpf/libbpf.mk +6
-1@@ -25,9 +25,14 @@ endef # toolchain. # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) -LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers +LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf +LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif +define LIBBPF_FIX_STAGING_PC + $(SED) 's/-I$${includedir}/-I$${includedir}\/bpf -I$${includedir}/' $(STAGING_DIR)/usr/lib/pkgconfig/libbpf.pc +endef + define LIBBPF_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ -C $(@D)/src install $(LIBBPF_UPDATE_UAPI_HEADERS) \Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/8 package/libbpf: fix bpftrace build with kernel headers 5.{9, 10}
In reply to Bernd KuhlsBuildroot added the bpftrace package in 2024 with commit 338acb27ff3e07560290085d7c6a2feab633c869
which initially provided version 0.19.1.
This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f
which was added to version 0.17.0 in 2022 and makes use of certain variables of struct bpf_btf_info which were added to the linux kernel in 2020 with version 5.11:
https://github.com/torvalds/linux/commit/5329722057d41aebc31e391907a501feaa42f7d9
+ __aligned_u64 name;
+ __u32 name_len;
+ __u32 kernel_btf;
The libbpf package updates toolchain headers with its bundled version only when the toolchain headers are version 5.8 or older, this condition is part of the initial version of the package added in 2020 with buildroot commit f7b8508e4fe9c96bf679cc5423cc1500b6523e83. This version limit should have been raised when the bpftrace package was added to avoid build errors when the toolchain contains header versions 5.9 or 5.10.
This situation caused build errors in the autobuilder, the last one in February 2025:
/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:
In member function 'bool bpftrace::BPFfeature::has_module_btf()':/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:573:8:
error: 'struct bpf_btf_info' has no member named 'name'
573 | info.name = (__u64)name;
| ^~~~/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:574:8:
error: 'struct bpf_btf_info' has no member named 'name_len'
574 | info.name_len = sizeof(name);
The problem disappeared from the autobuilders due to newer headers versions used for the buildroot toolchain or other build errors occuring earlier, like llvm version mismatches.
The build error can today still be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
on the 2026.02.x branch as of 0be927b89a319c9ac35249354558e9f4cb102fd0.
To fix the problem we raise the BR2_TOOLCHAIN_HEADERS_AT_LEAST_ version number.
Fixes:
https://autobuild.buildroot.net/results/dbe/dbecf88c7edba357cee8fea31294ddb9f4d188ad/
https://autobuild.buildroot.net/results/df5/df59e038de47f63d14e1be7bd12dd16a69636f79/
https://autobuild.buildroot.net/results/359/3595d39dd53a686bbf996dd4e532ced44906b9e3/
https://autobuild.buildroot.net/results/e4f/e4f95a5f30a605eadb81802075ea6bb1e2880684/
https://autobuild.buildroot.net/results/bd0/bd075cb8c55f9f8a017711dc804b8d81ae89b4c5/
--- package/libbpf/libbpf.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
package/libbpf/libbpf.mk +8 -7
@@ -18,13 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpf/bpf.h installed by libbpf uses bpf_iter_link_info that was added since -# kernel 5.9, so we need to update some uapi headers in STAGING_DIR if the -# toolchain is build with linux-headers < 5.9. -# Otherwise bpf/bpf.h is broken due to out of date linux/bpf.h installed by the -# toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) +# bpftrace uses variables from bpf_btf_info that were added since kernel +# 5.11, so we need to update some uapi headers in STAGING_DIR if the +# toolchain is build with linux-headers < 5.11. +# Otherwise bpftrace is broken due to out of date linux/bpf.h installed +# by the toolchain. +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5329722057d41aebc31e391907a501feaa42f7d9 +# https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 4/8] package/libbpf: fix bpftrace build with kernel headers 5.{9, 10}
Quoted 3 lines · Bernd Kuhls
Buildroot added the bpftrace package in 2024 with commit
338acb27ff3e07560290085d7c6a2feab633c869
which initially provided version 0.19.1.
[snip]
Quoted 13 lines
package/libbpf/libbpf.mk +0
-5@@ -18,13 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpf/bpf.h installed by libbpf uses bpf_iter_link_info that was added since -# kernel 5.9, so we need to update some uapi headers in STAGING_DIR if the -# toolchain is build with linux-headers < 5.9. -# Otherwise bpf/bpf.h is broken due to out of date linux/bpf.h installed by the -# toolchain.
package/libbpf/libbpf.mk define LIBBPF_BUILD_CMDS · line 28
Quoted 10 lines
package/libbpf/libbpf.mk +8
-2-# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) +# bpftrace uses variables from bpf_btf_info that were added since kernel +# 5.11, so we need to update some uapi headers in STAGING_DIR if the +# toolchain is build with linux-headers < 5.11. +# Otherwise bpftrace is broken due to out of date linux/bpf.h installed +# by the toolchain. +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5329722057d41aebc31e391907a501feaa42f7d9 +# https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11),)
I think changing this based on what is done in bpftrace is just pushing the
problem forward. I think the proper approach is to use whatever version is in libbpf - that way you can be sure it's OK for _all_ users. You can find that in CHECKPOINT-COMMIT - currently it's 6.17 and after the bump it becomes 7.1.
There should also be a comment in there that explains that it should be
updated based on CHECKPOINT-COMMIT.
Still, this patch series is progress so I applied 1-6 to master. I marked 7
and 8 as Changes Requested.
Regards,
Arnout
package/libbpf/libbpf.mk define LIBBPF_BUILD_CMDS · line 31
Quoted 3 lines
package/libbpf/libbpf.mk +0
-0LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 4/8] package/libbpf: fix bpftrace build with kernel headers 5.{9, 10}
In reply to Bernd KuhlsIn reply of:
Quoted 53 lines
Buildroot added the bpftrace package in 2024 with commit
338acb27ff3e07560290085d7c6a2feab633c869
which initially provided version 0.19.1.This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f
which was added to version 0.17.0 in 2022 and makes use of certain variables of structbpf_btf_infowhich were added to the linux kernel in 2020 with version 5.11:
https://github.com/torvalds/linux/commit/5329722057d41aebc31e391907a501feaa42f7d9(quoted diff) +3
-0+ __aligned_u64 name; + __u32 name_len; + __u32 kernel_btf;The libbpf package updates toolchain headers with its bundled version only when the toolchain headers are version 5.8 or older, this condition is part of the initial version of the package added in 2020 with buildroot commit
f7b8508e4fe9c96bf679cc5423cc1500b6523e83. This version limit should have been raised when the bpftrace package was added to avoid build errors when the toolchain contains header versions 5.9 or 5.10.This situation caused build errors in the autobuilder, the last one in February 2025:
/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:
In member function 'boolbpftrace::BPFfeature::has_module_btf()':/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:573:8:
error: 'structbpf_btf_info' has no member named 'name'573 | info.name = (__u64)name; | ^~~~
/home/autobuild/autobuild/instance-18/output-1/build/bpftrace-0.19.1/src/bpffeature.cpp:574:8:
error: 'structbpf_btf_info' has no member named 'name_len'
574 | info.name_len = sizeof(name);The problem disappeared from the autobuilders due to newer headers versions used for the buildroot toolchain or other build errors occuring earlier, like llvm version mismatches.
The build error can today still be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=yon the 2026.02.x branch as of
0be927b89a319c9ac35249354558e9f4cb102fd0.To fix the problem we raise the
BR2_TOOLCHAIN_HEADERS_AT_LEAST_version number.
Quoted 8 lines
Fixes:
https://autobuild.buildroot.net/results/dbe/dbecf88c7edba357cee8fea31294ddb9f4d188ad/
https://autobuild.buildroot.net/results/df5/df59e038de47f63d14e1be7bd12dd16a69636f79/
https://autobuild.buildroot.net/results/359/3595d39dd53a686bbf996dd4e532ced44906b9e3/
https://autobuild.buildroot.net/results/e4f/e4f95a5f30a605eadb81802075ea6bb1e2880684/
https://autobuild.buildroot.net/results/bd0/bd075cb8c55f9f8a017711dc804b8d81ae89b4c5/Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 37 lines
--- package/libbpf/libbpf.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)package/libbpf/libbpf.mk +8
-7@@ -18,13 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpf/bpf.h installed by libbpf uses bpf_iter_link_info that was added since -# kernel 5.9, so we need to update some uapi headers in STAGING_DIR if the -# toolchain is build with linux-headers < 5.9. -# Otherwise bpf/bpf.h is broken due to out of date linux/bpf.h installed by the -# toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),) +# bpftrace uses variables from bpf_btf_info that were added since kernel +# 5.11, so we need to update some uapi headers in STAGING_DIR if the +# toolchain is build with linux-headers < 5.11. +# Otherwise bpftrace is broken due to out of date linux/bpf.h installed +# by the toolchain. +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5329722057d41aebc31e391907a501feaa42f7d9 +# https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endifSignature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 5/8 package/libbpf: fix bpftrace build with kernel headers > 5.11 & < 6.0
In reply to Bernd KuhlsBuildroot commit 97e2f63bdf4cc992787c570b17b099c41c5535d2 bumped bpftrace from 0.23.3 to 0.24.2.
This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9
which was added to version 0.24.0 and makes use of btf_enum64 that was added to the linux kernel in version 6.0:
https://github.com/torvalds/linux/commit/6089fb325cf737eeb2c4d236c94697112ca860da
causing build errors when the toolchain contains kernel headers between versions 5.12 and 5.19 because the libbpf package does not update their headers so we need to raise the BR2_TOOLCHAIN_HEADERS_AT_LEAST_ version number again.
The build error can be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.11.22"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_11=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
on the 2026.02.x branch as of 0be927b89a319c9ac35249354558e9f4cb102fd0.
Fixes:
https://autobuild.buildroot.net/results/8f7/8f7ce88a070e825ef178275a13d969349f05593b/
--- package/libbpf/libbpf.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
package/libbpf/libbpf.mk +6 -6
@@ -18,14 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpftrace uses variables from bpf_btf_info that were added since kernel -# 5.11, so we need to update some uapi headers in STAGING_DIR if the -# toolchain is build with linux-headers < 5.11. +# bpftrace uses btf_enum64 that was added since kernel 6.0 so we need to +# update some uapi headers in STAGING_DIR if the toolchain is build with +# linux-headers < 6.0. # Otherwise bpftrace is broken due to out of date linux/bpf.h installed # by the toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5329722057d41aebc31e391907a501feaa42f7d9 -# https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11),) +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6089fb325cf737eeb2c4d236c94697112ca860da +# https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9 +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 5/8] package/libbpf: fix bpftrace build with kernel headers > 5.11 & < 6.0
In reply of:
Quoted 25 lines
Buildroot commit
97e2f63bdf4cc992787c570b17b099c41c5535d2bumped bpftrace from 0.23.3 to 0.24.2.This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9which was added to version 0.24.0 and makes use of
btf_enum64that was added to the linux kernel in version 6.0:
https://github.com/torvalds/linux/commit/6089fb325cf737eeb2c4d236c94697112ca860dacausing build errors when the toolchain contains kernel headers between versions 5.12 and 5.19 because the libbpf package does not update their headers so we need to raise the
BR2_TOOLCHAIN_HEADERS_AT_LEAST_version number again.The build error can be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.11.22"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_11=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
Quoted 6 lines
on the 2026.02.x branch as of
0be927b89a319c9ac35249354558e9f4cb102fd0.Fixes:
https://autobuild.buildroot.net/results/8f7/8f7ce88a070e825ef178275a13d969349f05593b/Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 36 lines
--- package/libbpf/libbpf.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)package/libbpf/libbpf.mk +6
-6@@ -18,14 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpftrace uses variables from bpf_btf_info that were added since kernel -# 5.11, so we need to update some uapi headers in STAGING_DIR if the -# toolchain is build with linux-headers < 5.11. +# bpftrace uses btf_enum64 that was added since kernel 6.0 so we need to +# update some uapi headers in STAGING_DIR if the toolchain is build with +# linux-headers < 6.0. # Otherwise bpftrace is broken due to out of date linux/bpf.h installed # by the toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5329722057d41aebc31e391907a501feaa42f7d9 -# https://github.com/bpftrace/bpftrace/commit/fea31939899db48fa6d28f5ce880bfc39250ec9f -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11),) +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6089fb325cf737eeb2c4d236c94697112ca860da +# https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9 +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endifSignature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 8/8 package/bpftrace: bump version to 0.25.1
In reply to Bernd Kuhlshttps://github.com/bpftrace/bpftrace/blob/v0.25.1/CHANGELOG.md
Added configure option USE_SYSTEM_LIBBPF to use our libbpf package, needed due to upstream commit
https://github.com/bpftrace/bpftrace/commit/6d53738627d4f80c83f799f9e042f6bdd373a433
which was added to version 0.25.0.
The bump includes upstream commit
https://github.com/bpftrace/bpftrace/commit/c6442cde6e45945e3cfd72cb2fdbcca590454d0c
which adds support for LLVM 22 and fixes build errors introduced by buildroot commit 25cb3813e7fc6ed3e455f983cf0e09c7bc02fccb.
The bump includes upstream commit
https://github.com/bpftrace/bpftrace/commit/5261e8e1f362bef6e651d4db0ad8ade380cf7857
which adds the usage of CAP_BPF and CAP_PERFMON that were added to the
linux kernel in version 5.8:CAP_PERFMON: https://github.com/torvalds/linux/commit/980737282232b752bb14dab96d77665c15889c36CAP_BPF: https://github.com/torvalds/linux/commit/a17b53c4a4b55ec322c132b6670743612229ee9c
Added BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8 to reflect the dependency.
Please note the upstream docs describe the minimal kernel version as 5.15:
https://github.com/bpftrace/bpftrace/commit/e31ad636847a6f650fab827fbf83401e89dbe06d
Build-tested using this defconfig:
BR2_x86_64=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.8.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
Fixes:
https://autobuild.buildroot.net/results/599/59920f909d808911ea2710938271ecfab48c367f/
---
v2: fixed build errors (Julien)
package/bpftrace/Config.in | 6 +++--- package/bpftrace/bpftrace.hash | 2 +- package/bpftrace/bpftrace.mk | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-)
package/bpftrace/Config.in +3 -3
@@ -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_8 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.8" 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_8
package/bpftrace/bpftrace.hash +1 -1
@@ -1,3 +1,3 @@ # locally calculated -sha256 e0514aa3e1a032b0b2de2cf3c281bfee9b9e80509498e70ed78786bbd64db373 bpftrace-0.24.2.tar.gz +sha256 89d1cb7448a650eecebe52e8deb6dfa85517ae91c465bccd5246abd4588707dc bpftrace-0.25.1.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/bpftrace/bpftrace.mk +3 -2
@@ -4,7 +4,7 @@ # ################################################################################ -BPFTRACE_VERSION = 0.24.2 +BPFTRACE_VERSION = 0.25.1 BPFTRACE_SITE = $(call github,bpftrace,bpftrace,v$(BPFTRACE_VERSION)) BPFTRACE_LICENSE = Apache-2.0 BPFTRACE_LICENSE_FILES = LICENSE
@@ -29,6 +29,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))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 6/8 package/libbpf: fix bpftrace build with kernel headers 6.0
In reply to Bernd KuhlsBuildroot commit 97e2f63bdf4cc992787c570b17b099c41c5535d2 bumped bpftrace from 0.23.3 to 0.24.2.
This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/7578314df67df6bbdffaf493ff3b4d182b235b34
which was added to version 0.24.0 and makes use of bpf_iter_link_info.task that was added to the linux kernel in version 6.1:
https://github.com/torvalds/linux/commit/f0d74c4da1f060d2a66976193712a5e6abd361f5
causing build errors when the toolchain contains kernel headers version 6.0 because the libbpf package does not update their headers:
output/build/bpftrace-0.24.2/src/attached_probe.cpp: In static member
function 'static bpftrace::Result<std::unique_ptr<bpftrace::AttachedIterProbe> > bpftrace::AttachedIterProbe::make(bpftrace::Probe&,
const bpftrace::BpfProgram&, std::optional<int>)':
output/build/bpftrace-0.24.2/src/attached_probe.cpp:1437:11: error:
'union bpf_iter_link_info' has no member named 'task'
1437 | linfo.task.pid = *pid;
The build error can be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="6.0.19"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_0=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
on the 2026.02.x branch as of 0be927b89a319c9ac35249354558e9f4cb102fd0.
Fixes:
https://autobuild.buildroot.net/results/146/14671c54fdf0a2e44bcce7ff61ca9b89a925eca9/
--- package/libbpf/libbpf.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
package/libbpf/libbpf.mk +6 -6
@@ -18,14 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpftrace uses btf_enum64 that was added since kernel 6.0 so we need to -# update some uapi headers in STAGING_DIR if the toolchain is build with -# linux-headers < 6.0. +# bpftrace uses bpf_iter_link_info.task that was added since kernel 6.1 +# so we need to update some uapi headers in STAGING_DIR if the toolchain +# is build with linux-headers < 6.1. # Otherwise bpftrace is broken due to out of date linux/bpf.h installed # by the toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6089fb325cf737eeb2c4d236c94697112ca860da -# https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9 -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0),) +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f0d74c4da1f060d2a66976193712a5e6abd361f5 +# https://github.com/bpftrace/bpftrace/commit/7578314df67df6bbdffaf493ff3b4d182b235b34 +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 6/8] package/libbpf: fix bpftrace build with kernel headers 6.0
In reply of:
Quoted 31 lines
Buildroot commit
97e2f63bdf4cc992787c570b17b099c41c5535d2bumped bpftrace from 0.23.3 to 0.24.2.This release includes upstream commit
https://github.com/bpftrace/bpftrace/commit/7578314df67df6bbdffaf493ff3b4d182b235b34
which was added to version 0.24.0 and makes use of bpf_iter_link_info.task that was added to the linux kernel in version 6.1:
https://github.com/torvalds/linux/commit/f0d74c4da1f060d2a66976193712a5e6abd361f5causing build errors when the toolchain contains kernel headers version 6.0 because the libbpf package does not update their headers:
output/build/bpftrace-0.24.2/src/attached_probe.cpp: In static member
function 'static bpftrace::Result<std::unique_ptr<bpftrace::AttachedIterProbe> > bpftrace::AttachedIterProbe::make(bpftrace::Probe&,
const bpftrace::BpfProgram&, std::optional<int>)':
output/build/bpftrace-0.24.2/src/attached_probe.cpp:1437:11: error:
'unionbpf_iter_link_info' has no member named 'task'
1437 | linfo.task.pid = *pid;The build error can be reproduced with this defconfig
BR2_aarch64=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="6.0.19"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_0=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_BPFTRACE=y
Quoted 6 lines
on the 2026.02.x branch as of
0be927b89a319c9ac35249354558e9f4cb102fd0.Fixes:
https://autobuild.buildroot.net/results/146/14671c54fdf0a2e44bcce7ff61ca9b89a925eca9/Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 36 lines
--- package/libbpf/libbpf.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)package/libbpf/libbpf.mk +6
-6@@ -18,14 +18,14 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpftrace uses btf_enum64 that was added since kernel 6.0 so we need to -# update some uapi headers in STAGING_DIR if the toolchain is build with -# linux-headers < 6.0. +# bpftrace uses bpf_iter_link_info.task that was added since kernel 6.1 +# so we need to update some uapi headers in STAGING_DIR if the toolchain +# is build with linux-headers < 6.1. # Otherwise bpftrace is broken due to out of date linux/bpf.h installed # by the toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6089fb325cf737eeb2c4d236c94697112ca860da -# https://github.com/bpftrace/bpftrace/commit/d4f58382270c21b2c718aa0a6574c105f29e77a9 -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0),) +# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f0d74c4da1f060d2a66976193712a5e6abd361f5 +# https://github.com/bpftrace/bpftrace/commit/7578314df67df6bbdffaf493ff3b4d182b235b34 +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC endifSignature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 7/8 package/libbpf: bump version to 1.7.0
In reply to Bernd Kuhlshttps://github.com/libbpf/libbpf/releases/tag/v1.7.0
https://github.com/libbpf/libbpf/releases/tag/v1.6.3
--- package/libbpf/libbpf.hash | 2 +- package/libbpf/libbpf.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/libbpf/libbpf.hash +1 -1
@@ -1,5 +1,5 @@ # Locally calculated -sha256 16f31349c70764cba8e0fad3725cc9f52f6cf952554326aa0229daaa21ef4fbd libbpf-1.6.2.tar.gz +sha256 7ab5feffbf78557f626f2e3e3204788528394494715a30fc2070fcddc2051b7b libbpf-1.7.0.tar.gz sha256 847f4addbd56e2d5be20c4ea0845e972672fc07b755fadaae5f7abd35d71e349 LICENSE sha256 e1638b9a0c68ca90fad3df1d6b4e430804d2fbdc15e58d02cffddfae38953bbf LICENSE.BSD-2-Clause sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSE.LGPL-2.1
package/libbpf/libbpf.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LIBBPF_VERSION = 1.6.2 +LIBBPF_VERSION = 1.7.0 LIBBPF_SITE = $(call github,libbpf,libbpf,v$(LIBBPF_VERSION)) LIBBPF_LICENSE = GPL-2.0, LGPL-2.1, BSD-2-Clause LIBBPF_LICENSE_FILES = LICENSE LICENSE.BSD-2-Clause LICENSE.LGPL-2.1
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 6 lines
Buildroot commit
305c40613ceab985bfa2abd094a96f3eb2aba5d9bumped the package to 0.23.3 but forgot to remove the configure optionUSE_SYSTEM_BPF_BCCwhich was removed upstream in version 0.20.0:
https://github.com/bpftrace/bpftrace/commit/ef6d9d42d3a7a87116651d6c561de3a0a2693185Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 24 lines
--- package/bpftrace/bpftrace.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)package/bpftrace/bpftrace.mk +1
-2@@ -29,7 +29,6 @@ BPFTRACE_CONF_OPTS += \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DENABLE_MAN:BOOL=OFF \ - -DINSTALL_TOOL_DOCS:BOOL=OFF \ - -DUSE_SYSTEM_BPF_BCC:BOOL=ON + -DINSTALL_TOOL_DOCS:BOOL=OFF $(eval $(cmake-package))Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot