WhyCan Forum

本站无需注册,无需积分,无需回复可下载所有资料,如果真的喜欢小站,请您注册之后请至少回复一个帖子激活Id,谢谢支持! 站长QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#1 2019-08-24 18:56:06

luo
会员
注册时间: 2019-08-23
累计积分: 5

编译内核 make[2]:***[scripts/mod/devicetable-offsets.s] Error 1

下载的是:Nano全程指南里的:git clone --depth=1 -b f1c100s-480272lcd-test https://github.com/Icenowy/linux.git

./include/linux/string.h:9:10: fatal error: stdarg.h: No such file or directory
#include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
scripts/Makefile.build:150: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
scripts/Makefile.build:575: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:559: recipe for target 'scripts' failed
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
In file included from ./include/asm-generic/bug.h:18:0,
                 from ./arch/arm/include/asm/bug.h:60,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/page-flags.h:10,
                 from kernel/bounds.c:10:
./include/linux/kernel.h:6:10: fatal error: stdarg.h: No such file or directory
#include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
Kbuild:21: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1

那些头文件在里面都是可以找得到 但就是make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4  找不到!!

有没有高手指教一下啊?

离线

#2 2019-08-24 20:05:44

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 7,401

Re: 编译内核 make[2]:***[scripts/mod/devicetable-offsets.s] Error 1

可能是发行版本的差异: http://ju.outofmemory.cn/entry/225825

为了让gcc找到这个头文件,我们可以拷贝一份到 /usr/include 下,但是更好的方法是做一个软连接:

sudo ln -s /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/stdargs.h /usr/include/stdargs.h

再编译就没问题了。

在线

页脚