Reputation: 31
I want to compile a perf using the Linux source code(tools/perf/). But it failed when I make. Below is the error output. And I don't modify anything for the Linux source code(kernel-3.10-327.36.3.el7.x86_64). I use the centos7.2 and the kernel version is 3.10-327.36.3.el7.x86_64.
In file included from bench/futex-hash.c:17:0:
bench/futex.h: In function ‘futex_wait’:
bench/futex.h:36:10: error: ‘SYS_futex’ undeclared (first use in this function)
syscall(SYS_futex, uaddr, op | opflags, val, timeout, uaddr2, val3)
^
bench/futex.h:45:9: note: in expansion of macro ‘futex’
return futex(uaddr, FUTEX_WAIT, val, timeout, NULL, 0, opflags);
^
bench/futex.h:36:10: note: each undeclared identifier is reported only once for each function it appears in
syscall(SYS_futex, uaddr, op | opflags, val, timeout, uaddr2, val3)
Upvotes: 1
Views: 764
Reputation: 36
It has been a long time since the question is asked, but there are still many people who are troubled by this, like me. I wasted a lot of time on this. And finally I solve the question by adding a patch. you can reference https://lore.kernel.org/patchwork/patch/850380/
Upvotes: 2