由于ptrace.h文件导致的内核编译出错的解决方法
来源:互联网 发布:淘宝模特怎么入行 编辑:程序博客网 时间:2024/06/05 19:57
原文地址::http://www.cnblogs.com/woshizyl/archive/2013/03/11/2953554.html
编译内核到了make bzImage时出现如下错误:
arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for ‘syscall_trace_enter’
In file included from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/vm86.h:130:0,
from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/processor.h:10,
from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:56,
from arch/x86/kernel/ptrace.c:11:
/home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of ‘syscall_trace_enter’ was here
arch/x86/kernel/ptrace.c:1517:17: error: conflicting types for ‘syscall_trace_leave’
In file included from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/vm86.h:130:0,
from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/processor.h:10,
from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:56,
from arch/x86/kernel/ptrace.c:11:
/home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/ptrace.h:147:13: note: previous declaration of ‘syscall_trace_leave’ was here
make[2]: *** [arch/x86/kernel/ptrace.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2
注意红色标注的两行,说明ptrace.c 文件中第1472行的函数syscall_trace_leave和ptrace.h文件中该函数的声明有冲突,只要将ptrace.h文件中的函数声明改得和ptrace.c中的相同即可。另外,有人专门针对这个错误写了个补丁,地址为https://patchwork.kernel.org/patch/1301031/ 。
PS :以前像遇到这种问题的时候,总会认为是自己哪儿出了问题。这个问题让我懂得linux也是像我一样的程序员写出来的,他们也会犯一些常人会犯的错误,所以Linux需要全世界的程序员一起改进 。
- 由于ptrace.h文件导致的内核编译出错的解决方法
- 由于ptrace.h文件导致的内核编译出错的解决方法
- 由于linux内核变化导致的若干头文件出错问题
- shlobj.h编译出错的解决方法!
- stdafx.h 包含的头文件出错,导致大问题.
- ptrace接口和execve同步导致的一个内核漏洞
- Keil-原文件类型不明确导致编译出错的解决方法
- ^M导致的编译出错
- VMWare在2.6.20内核下编译出错的解决方法
- 刚下载的Android 内核编译出错解决方法
- VLC 编译时常出错找不到的文件 ---stdint.h
- android_由于BOM头导致的Json解析出错
- 由于BOM头导致的Json解析出错
- Android 由于BOM头导致的Json解析出错
- 由于BOM头导致的Json解析出错
- 由于js对象浅拷贝导致的遍历出错
- 编译opencv出错的解决方法
- MATLAB mcc编译后执行文件运行出错的解决方法
- butterknife 在eclipse的配置
- View controller-based status bar appearance
- Windows安装配置IIS,并将自己的程序发布
- 结构体中最后一个成员为[0]或[1]长度数组(柔性数组成员)
- LeetCode 264: Ugly Number II
- 由于ptrace.h文件导致的内核编译出错的解决方法
- java序列化
- svn分支开发操作步骤
- 记录java接口开发
- UITextField使用注意事项——最左侧/右侧添加图片
- Golang中的interface
- Hibernate关联操作、查询操作、高级特性、并发处理机制
- 使用MyBatis(12)动态SQL 完成分页查询
- ucosiii 软定时