我想使用Linux源代码(tools/ perf /)编译一个perf。但是当我做的时候它失败了。下面是错误输出。而且我没有对Linux源代码(kernel-3.10-327.36.3.el7.x86_64)做任何修改。我使用centos7.2,内核版本是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)
发布于 2018-11-15 16:22:33
这个问题已经提出很长一段时间了,但仍然有很多人受到这个问题的困扰,比如我。我在这上面浪费了很多时间。最后,我通过添加补丁解决了这个问题。您可以引用https://lore.kernel.org/patchwork/patch/850380/
https://stackoverflow.com/questions/47588863
复制相似问题