当前位置: 技术问答>linux和unix
用4.3.2编译2.6.32内核为什么会出错啊?
来源: 互联网 发布时间:2016-09-19
本文导语: 我用arm-linux-gcc4.3.2编译LINXU2.6.32老是报错。。用3.4.1就能正常编译通过,请高手指点!编译出错代码如下: [root@localhost linux-2.6.32.2]# make CHK include/linux/version.h make[1]: “include/asm-arm/mach-types.h”是最新的。 CHK i...
我用arm-linux-gcc4.3.2编译LINXU2.6.32老是报错。。用3.4.1就能正常编译通过,请高手指点!编译出错代码如下:
[root@localhost linux-2.6.32.2]# make
CHK include/linux/version.h
make[1]: “include/asm-arm/mach-types.h”是最新的。
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:10:20: error: stdarg.h: No such file or directory
In file included from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:183: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:183: warning: conflicting types for built-in function 'vsprintf'
include/linux/kernel.h:187: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:187: warning: conflicting types for built-in function 'vsnprintf'
include/linux/kernel.h:191: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:195: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:199: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:199: warning: conflicting types for built-in function 'vsscanf'
include/linux/kernel.h:239: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:535: error: expected declaration specifiers or '...' before 'va_list'
In file included from include/linux/sched.h:91,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kobject.h:77: error: expected declaration specifiers or '...' before 'va_list'
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
make: *** [prepare0] 错误 2
[root@localhost linux-2.6.32.2]# make
CHK include/linux/version.h
make[1]: “include/asm-arm/mach-types.h”是最新的。
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:10:20: error: stdarg.h: No such file or directory
In file included from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:183: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:183: warning: conflicting types for built-in function 'vsprintf'
include/linux/kernel.h:187: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:187: warning: conflicting types for built-in function 'vsnprintf'
include/linux/kernel.h:191: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:195: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:199: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:199: warning: conflicting types for built-in function 'vsscanf'
include/linux/kernel.h:239: error: expected declaration specifiers or '...' before 'va_list'
include/linux/kernel.h:535: error: expected declaration specifiers or '...' before 'va_list'
In file included from include/linux/sched.h:91,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kobject.h:77: error: expected declaration specifiers or '...' before 'va_list'
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
make: *** [prepare0] 错误 2
|
用4.2.2的版本编译kernel 2.6.32.2没有问题。
|
include/linux/kernel.h:10:20: error: stdarg.h: No such file or directory 怎么头文件找不到
|
一般 toolchain 里面include/linux ..也会包含一些 头文件..
很可能是 你arm-linux-gcc4.3.2的toolchain 没有包含 kernel.h 的文件
很可能是 你arm-linux-gcc4.3.2的toolchain 没有包含 kernel.h 的文件