简体   繁体   中英

error compiling the linux kernel

I was trying to compile the linux kernel, but getting some errors. While running the top Makefile i am getting the following errors :-

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

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. Make sure you've got the appropriate selinux dev packages installed. On Ubuntu, I'm guessing what you need is libselinux1-dev.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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