You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make时出现已下错误信息 :
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from /home/hero/kernel_analysis/linux-3.9.4/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:103:30: fatal error: linux/compiler-gcc6.h: No such file or directory
#include gcc_header(GNUC)
^
compilation terminated.
/home/hero/kernel_analysis/linux-3.9.4/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:833: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
Activity
mengning commentedon Mar 3, 2019
应该是需要安装对应内核版本的头文件
LittleSec commentedon Aug 11, 2019
refer to http://blog.chinaunix.net/uid-20680966-id-5322921.html
or you can:
(in linux-3.9.4 folder)
cp include/linux/compiler-gcc4.h include/linux/compiler-gcc5.h(test in Ubuntu 16.04.05 LTS)
shift4 commentedon Dec 23, 2019
ubuntu 18.04也碰到类似问题,应该是gcc的版本太高导致的,系统默认是gcc 7.4了,报错找不到include/linux/compiler-gcc7.h,可以ln -s include/linux/compiler-gcc4.h include/linux/compiler-gcc7.h解决。