From 7103da7c96fc188e8470c39d967a677365ec8398 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 21 Jul 2024 18:50:23 +0200 Subject: [PATCH] package/sysprof: needs headers >= 5.12 sysprof unconditionally uses PERF_RECORD_MISC_MMAP_BUILD_ID which is only available since kernel 5.12 and https://github.com/torvalds/linux/commit/88a16a1309333e43d328621ece3e9fa37027e8eb resulting in the following build failure with kernel < 5.12 since bump to version 46.0 in commit 0d57555407f2a0708515e7c377f57a6466c78b1b: ../src/libsysprof/sysprof-sampler.c: In function 'sysprof_sampler_perf_event_stream_cb': ../src/libsysprof/sysprof-sampler.c:186:33: error: 'PERF_RECORD_MISC_MMAP_BUILD_ID' undeclared (first use in this function); did you mean 'PERF_RECORD_MISC_MMAP_DATA'? 186 | if ((event->header.misc & PERF_RECORD_MISC_MMAP_BUILD_ID) != 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | PERF_RECORD_MISC_MMAP_DATA While at it, also fix a typo in "library" Fixes: 0d57555407f2a0708515e7c377f57a6466c78b1b - http://autobuild.buildroot.org/results/9a9f8462bd1d7127dc80de7f280ab9d100db47fe Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/sysprof/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in index be4f7653b0..32a5f99798 100644 --- a/package/sysprof/Config.in +++ b/package/sysprof/Config.in @@ -8,6 +8,7 @@ config BR2_PACKAGE_SYSPROF depends on !BR2_STATIC_LIBS # libunwind, polkit depends on !BR2_OPTIMIZE_FAST # polkit depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_12 select BR2_PACKAGE_JSON_GLIB select BR2_PACKAGE_LIBDEX select BR2_PACKAGE_LIBGLIB2 @@ -19,12 +20,13 @@ config BR2_PACKAGE_SYSPROF http://sysprof.com -comment "sysprof needs a toolchain w/ dynamic libraray, wchar, threads, C++, gcc >= 7" +comment "sysprof needs a toolchain w/ dynamic library, wchar, threads, C++, gcc >= 7, headers >= 5.12" depends on BR2_USE_MMU depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \ - BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP + BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_12 comment "sysprof can't be built with Optimize for fast" depends on BR2_OPTIMIZE_FAST