All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/sysprof: needs headers >= 5.12
@ 2024-07-21 16:50 Fabrice Fontaine
  2024-07-22 12:32 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-07-21 16:50 UTC (permalink / raw)
  To: buildroot; +Cc: Will Newton, Fabrice Fontaine

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 <fontaine.fabrice@gmail.com>
---
 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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-22 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-21 16:50 [Buildroot] [PATCH 1/1] package/sysprof: needs headers >= 5.12 Fabrice Fontaine
2024-07-22 12:32 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.