红联Linux门户
Linux帮助

ubuntu16.04下内核编译出现recipe for target 'kernel' failed

发布时间:2016-05-28 10:18:32来源:linux网站作者:Bonker

我是用的ubuntu16.04 32位系统,编译内核linux-3.0.1。


出现如下错误:
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.
/opt/ARM/mini6410/linux/linux-2.6.38/kernel/Makefile:140: recipe for target 'kernel/timeconst.h' failed
make[1]: *** [kernel/timeconst.h] Error 255
Makefile:916: recipe for target 'kernel' failed
make: *** [kernel] Error 2


解决方法:

这样处理
删除:
@val = @{$canned_values{$hz}};
if (!defined(@val)) {
@val = compute_values($hz);
}
output前面加入:
$cv = $canned_values{$hz};
@val = defined($cv) ? @$cv : compute_values($hz);


本文永久更新地址:http://www.linuxdiyf.com/linux/21019.html