您尚未登录。

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

luo
会员
注册时间: 2019-08-23
已发帖子: 5
积分: 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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

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

再编译就没问题了。





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn