简体   繁体   English

编译Linux内核时出错

[英]error compiling the linux kernel

I was trying to compile the linux kernel, but getting some errors. 我试图编译linux内核,但出现一些错误。 While running the top Makefile i am getting the following errors :- 在运行顶级Makefile时,出现以下错误:-

CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  HOSTCC  scripts/selinux/mdp/mdp
scripts/selinux/mdp/mdp.c:32:19: error: flask.h: No such file or directory
scripts/selinux/mdp/mdp.c:56:29: error: class_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:61:35: error: initial_sid_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:66:35: error: common_perm_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c:91:24: error: av_inherit.h: No such file or directory
scripts/selinux/mdp/mdp.c:95:28: error: av_permissions.h: No such file or directory
scripts/selinux/mdp/mdp.c:103:31: error: av_perm_to_string.h: No such file or directory
scripts/selinux/mdp/mdp.c: In function ‘main’:
scripts/selinux/mdp/mdp.c:140: error: ‘initial_sid_to_string’ undeclared (first use in this function)
scripts/selinux/mdp/mdp.c:140: error: (Each undeclared identifier is reported only once
scripts/selinux/mdp/mdp.c:140: error: for each function it appears in.)
make[3]: *** [scripts/selinux/mdp/mdp] Error 1
make[2]: *** [scripts/selinux/mdp] Error 2
make[1]: *** [scripts/selinux] Error 2
make: *** [scripts] Error 2

Prior to build i configured the using make oldconfig 在构建之前,我使用make oldconfig配置了

seems that the files in error log were supposed to be generated during configuration. 似乎错误日志中的文件应该是在配置期间生成的。 But somehow they are not getting generated and hence the error. 但是不知何故它们不会生成,因此会产生错误。 Searched the net but still not able to fix the errors. 搜索了网络,但仍然无法修复错误。 I am very new to kernel programming. 我是内核编程的新手。 Any help will be highly appreciated. 任何帮助将不胜感激。

Thanks. 谢谢。

It looks like you are missing some includes for the SELinux functionality. 看来您缺少一些SELinux功能的附件。 Make sure you've got the appropriate selinux dev packages installed. 确保已安装适当的selinux dev软件包。 On Ubuntu, I'm guessing what you need is libselinux1-dev. 在Ubuntu上,我猜您需要的是libselinux1-dev。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM