Expected behavior
Either configure to disable bench-bitcoin, or the build to succeed.
Actual behavior
Build fails with:
0In file included from bench/nanobench.cpp:6:
1./bench/nanobench.h: In member function ‘bool ankerl::nanobench::detail::LinuxPerformanceCounters::monitor(uint32_t, uint64_t, ankerl::nanobench::detail::LinuxPerformanceCounters::Target)’:
2./bench/nanobench.h:2492:25: error: ‘PERF_EVENT_IOC_ID’ was not declared in this scope; did you mean ‘PERF_EVENT_IOC_PERIOD’?
3 2492 | if (-1 == ioctl(fd, PERF_EVENT_IOC_ID, &id)) {
4 | ^~~~~~~~~~~~~~~~~
5 | PERF_EVENT_IOC_PERIOD
6./bench/nanobench.h: In constructor ‘ankerl::nanobench::detail::PerformanceCounters::PerformanceCounters()’:
7./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’?
8 2515 | mHas.cpuCycles = mPc->monitor(PERF_COUNT_HW_REF_CPU_CYCLES, LinuxPerformanceCounters::Target(&mVal.cpuCycles, true, false));
9 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | 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.