我在CentOS 7上尝试从源代码重建内核,只编辑了kernel.spec文件中的buildid值。当我尝试构建时,它会继续运行一段时间然后失败。
根据我在错误日志中的理解,它由于我从未接触过的文件中的错误而失败。
我使用的构建命令是
rpmbuild -bb - 没有调试 - 没有debuginfo --target = uname -m
kernel.spec 2> build-err.log | tee build-out.log
错误日志如下所示。
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)
^
bench/futex.h:45:9: note: in expansion of macro 'futex'
return futex(uaddr, FUTEX_WAIT, val, timeout, NULL, 0, opflags);
^
bench/futex.h: In function 'futex_wake':
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:55:9: note: in expansion of macro 'futex'
return futex(uaddr, FUTEX_WAKE, nr_wake, NULL, NULL, 0, opflags);
^
bench/futex.h: In function 'futex_lock_pi':
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:66:9: note: in expansion of macro 'futex'
return futex(uaddr, FUTEX_LOCK_PI, detect, timeout, NULL, 0, opflags);
^
bench/futex.h: In function 'futex_unlock_pi':
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:75:9: note: in expansion of macro 'futex'
return futex(uaddr, FUTEX_UNLOCK_PI, 0, NULL, NULL, 0, opflags);
^
bench/futex.h: In function 'futex_cmp_requeue':
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:87:9: note: in expansion of macro 'futex'
return futex(uaddr, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, uaddr2,
^
bench/futex.h: In function 'futex_wait':
bench/futex.h:46:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
mv: cannot stat 'bench/.futex-hash.o.tmp': No such file or directory
make[3]: *** [bench/futex-hash.o] Error 1
make[2]: *** [bench] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [perf-in.o] Error 2
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.GPuhpL (%build)
Bad exit status from /var/tmp/rpm-tmp.GPuhpL (%build)