package/sysprof: needs headers >= 5.12

sysprof unconditionally uses PERF_RECORD_MISC_MMAP_BUILD_ID which is
only available since kernel 5.12 and
88a16a1309
resulting in the following build failure with kernel < 5.12 since bump
to version 46.0 in commit 0d57555407:

../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: 0d57555407
 - http://autobuild.buildroot.org/results/9a9f8462bd1d7127dc80de7f280ab9d100db47fe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine
2024-07-21 18:50:23 +02:00
committed by Thomas Petazzoni
parent 1b8e5c93d3
commit 7103da7c96

View File

@@ -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