SYS_futex的Perf编译异常

时间:2017-12-01 07:51:34

标签: compiler-errors perf

我想使用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)




1 个答案:

答案 0 :(得分:0)

问了问题已经很长时间了,但是仍然有很多人像我一样为此感到困扰。我为此浪费了很多时间。最后,我通过添加补丁解决了这个问题。   您可以参考https://lore.kernel.org/patchwork/patch/850380/