【问题标题】:error compiling the linux kernel编译linux内核时出错
【发布时间】:2009-10-11 13:28:25
【问题描述】:

我试图编译 linux 内核,但遇到了一些错误。 运行顶级 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

在构建之前我配置了使用 制作旧配置

似乎错误日志中的文件应该是在配置期间生成的。 但不知何故,它们没有被生成,因此错误。 搜索了网络,但仍然无法修复错误。 我对内核编程很陌生。 任何帮助将不胜感激。

谢谢。

【问题讨论】:

    标签: linux linux-kernel linux-device-driver


    【解决方案1】:

    您似乎缺少一些 SELinux 功能的包含。确保你已经安装了合适的 selinux 开发包。在 Ubuntu 上,我猜你需要的是 libselinux1-dev。

    【讨论】:

    • 感谢 Paul 的快速回复。如果碰巧有不同的东西,你能告诉fedora核心的“libselinux1-dev”等价物吗?我可以从哪里获取包以及我需要在内核源代码树中的哪个位置保留它?非常感谢。
    • 一般情况下,你只需安装包并让“make”找到它。我不知道它是什么,但由于这似乎是 selinux 需要的东西,我会开始在那个一般区域进行搜索。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-11
    • 1970-01-01
    • 1970-01-01
    • 2018-04-19
    • 2019-04-24
    相关资源
    最近更新 更多