Hi Greg,
Observed with Ubuntu-22.04:
In v5.10.y and older kernels, perf may fail to compile with the following error.
In file included from util/evlist.h:6, from builtin-sched.c:6: builtin-sched.c: In function ‘create_tasks’: tools/include/linux/kernel.h:45:17: error: comparison of distinct pointer types lacks a cast [-Werror] 45 | (void) (&_max1 == &_max2); \ | ^~ builtin-sched.c:662:13: note: in expansion of macro ‘max’ 662 | (size_t) max(16 * 1024, PTHREAD_STACK_MIN));
The problem is fixed upstream with commit d08c84e01afa ("perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE)". Please apply this commit to v5.10.y and older kernel branches.
Thanks, Guenter