700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > linux 内核编译 错误 fatal error: linux/compiler-gcc6.h: No such file or directory

linux 内核编译 错误 fatal error: linux/compiler-gcc6.h: No such file or directory

时间:2019-10-15 22:54:25

相关推荐

linux 内核编译 错误 fatal error: linux/compiler-gcc6.h: No such file or directory

在交叉编译i.MX6UL的Kernel代码时出现这个错误

CHK include/config/kernel.release

Using .. as source for kernel

GEN ./Makefile

CHK include/generated/uapi/linux/version.h

CHK include/generated/utsrelease.h

make[3]: ‘include/generated/mach-types.h’ is up to date.

CC kernel/bounds.s

In file included from ../include/linux/compiler.h:54:0,

from ../include/uapi/linux/stddef.h:1,

from ../include/linux/stddef.h:4,

from ../include/uapi/linux/posix_types.h:4,

from ../include/uapi/linux/types.h:13,

from ../include/linux/types.h:5,

from ../include/linux/page-flags.h:8,

from ../kernel/bounds.c:9:

../include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory

#include gcc_header(GNUC)

^

compilation terminated.

原因是因为我使用的交叉编译工具链版本太高(6.2.1版本)导致,先在内核代码根目录下搜索

[root@localhost linux-2.6.32]# find . -name "compiler-gcc*"./include/linux/compiler-gcc.h./include/linux/compiler-gcc3.h./include/linux/compiler-gcc4.h[root@localhost linux-2.6.32]#

支持的版本有3、4。

解决方案:下载 高版本内核 或者 低版本交叉编译链

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。