Expected behavior
Either configure to disable bench-bitcoin, or the build to succeed.
Actual behavior
Build fails with:
In file included from bench/nanobench.cpp:6:
./bench/nanobench.h: In member function ‘bool ankerl::nanobench::detail::LinuxPerformanceCounters::monitor(uint32_t, uint64_t, ankerl::nanobench::detail::LinuxPerformanceCounters::Target)’:
./bench/nanobench.h:2492:25: error: ‘PERF_EVENT_IOC_ID’ was not declared in this scope; did you mean ‘PERF_EVENT_IOC_PERIOD’?
2492 | if (-1 == ioctl(fd, PERF_EVENT_IOC_ID, &id)) {
| ^~~~~~~~~~~~~~~~~
| PERF_EVENT_IOC_PERIOD
./bench/nanobench.h: In constructor ‘ankerl::nanobench::detail::PerformanceCounters::PerformanceCounters()’:
./bench/nanobench.h:2515:35: error: ‘PERF_COUNT_HW_REF_CPU_CYCLES’ was not declared in this scope; did you mean ‘PERF_COUNT_HW_CPU_CYCLES’?
2515 | mHas.cpuCycles = mPc->monitor(PERF_COUNT_HW_REF_CPU_CYCLES, LinuxPerformanceCounters::Target(&mVal.cpuCycles, true, false));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| PERF_COUNT_HW_CPU_CYCLES
To reproduce
Install old linux-headers without PERF_EVENT_IOC_ID
System information
This error discovered building on an otherwise-up-to-date system with linux-headers 2.6.32.