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需要全世界的程序员一起改进  。

--- linux-2.6.32.59/arch/x86/include/asm/ptrace.h
+++ fix_ptrace.o_compile_error/arch/x86/include/asm/ptrace.h
@@ -130,6 +130,7 @@
#ifdef __KERNEL__ #include <linux/init.h>
+#include <linux/linkage.h> struct cpuinfo_x86;
struct task_struct;
@@ -142,8 +143,8 @@
int error_code, int si_code);
void signal_fault(struct pt_regs *regs, void __user *frame, char *where); -extern long syscall_trace_enter(struct pt_regs *);
-extern void syscall_trace_leave(struct pt_regs *);
+extern asmregparm long syscall_trace_enter(struct pt_regs *);
+extern asmregparm void syscall_trace_leave(struct pt_regs *); static inline unsigned long regs_return_value(struct pt_regs *regs)
{

由于ptrace.h文件导致的内核编译出错的解决方法的更多相关文章

  1. Mongo导出数据文件导致错误 Got signal: 6 (Aborted)解决方法

    一哥们要导出一个数据表的数据,结果导出一半,硬盘不够用,卡死了, 然后重启主机,导致mongo启动后进程自动死掉, 报错如下. Mon Oct 28 10:39:02.270 [initandlist ...

  2. 〖Windows〗zigbee实验之cygwin编译tinyos.jar编译出错的解决方法

    1. 使用的cygwin安装包下载地址:cygwin-files.zip 2. 使用的一些rpm安装包的下载地址:cygwin_cc2430_rpms.zip 3. cygwin的默认安装目录是:C: ...

  3. 使用modelsim仿真DDR3时编译出错的解决方法

    Modelsim 10.1c release note sates as : Product Changes in 10.1c Release 10.1b introduced a new error ...

  4. Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法

    Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法 可能是误删文件导致在使用rman备份时候出现以下提示 RMAN-06169: could not read file hea ...

  5. 对于C++窗口编译一闪而过的解决方法 (DEV CPP下)

    对于C++窗口编译一闪而过的解决方法 首先来看一个简单的程序(编译环境为 DEV C++.):  #include <iostream>  int main()  {      std:: ...

  6. 内容分享-迅为IMX6开发板编译问题及解决方法

    [经验分享]IMX6开发板编译问题及解决方法本文转自迅为IMX6开发板售后讨论群,分享给大家~ 物理主机 win10 64 位专业版.虚拟机 VM12 Pro.开发环境采用迅为提供的开发环境: Ubu ...

  7. eclipse上一次没有正确关闭,导致启动的时候卡死错误解决方法

    关于 eclipse启动卡死的问题(eclipse上一次没有正确关闭,导致启动的时候卡死错误解决方法),自己常用的解决方法: 方案一(推荐使用,如果没有这个文件,就使用方案二): 到<works ...

  8. php大文件上传失败的原因及解决方法

    为什么上传大文件总是失败,上传小文件就没有问题.关于PHP大文件上传失败的原因及解决方法如下: 第1种情况:文件上传时存放文件的临时目录必须是开启的并且是 PHP 进程所有者用户可写的目录.如果未指定 ...

  9. [转]权限问题导致Nginx 403 Forbidden错误的解决方法

    权限问题导致Nginx 403 Forbidden错误的解决方法 投稿:junjie 字体:[增加 减小] 类型:转载 时间:2014-08-22 这篇文章主要介绍了权限问题导致Nginx 403 F ...

随机推荐

  1. spoj 10628

    http://www.spoj.com/problems/COT/ 树上第k小元素 LCA + 可持久化线段树 每个新的版本都是由其父亲版本转化而来. #include <cstdio> ...

  2. 数据类型比较:Long和BigDecimal

    1.基本类型: 基本类型可以用:">" "<" "==" 2.基本类型包装类:(对象类型) 2.1 Long 型: 要比较两个L ...

  3. 在Visual Studio 2015的Cordova项目中使用Gulp

    之前一直是在vs 2013中使用Cordova来开发移动app(目前有iPad版/iPhone版/安卓版),准备到下一个milestone的时候升级到2015,这两天在尝试各种东西. 2015中的co ...

  4. _ 下划线 Underscores __init__

    Underscores in Python https://shahriar.svbtle.com/underscores-in-python Underscores in Python This p ...

  5. python系列八:Python3条件控制&循环语句

    #!/usr/bin/python #-*-coding:gbk-*-#Python3 条件控制&循环语句import randomage = int(input("请输入你的年龄: ...

  6. 22个所见即所得在线Web编辑器

    这些 Web 编辑器可以在线编辑和处理富 Web 内容,包括格式文本,表格,图片,媒体,链接等等,非常适合集成到 CMS网站内容管理系统中使用.本文又搜集了 22 个 Web 在线编辑器,它们基本代表 ...

  7. Linux下Ngnix及PHP重启命令

    INT, TERM 立刻终止 QUIT 平滑终止 USR1 重新打开日志文件 USR2 平滑重载所有worker进程并重新载入配置和二进制模块 php-fpm 关闭: kill -INT `cat / ...

  8. ftp 协议分析

    File Transfer Protocol(文件传输协议) 使用SOCKET实现 FTP的客户端协议规则: .h #pragma once #include <string> #incl ...

  9. 解决网络 下载 句柄无效。 (异常来自 HRESULT:0x80070006 (E_HANDLE))

    首先要共享该文件 其次 在安全里加IISSHARED 是IIS账号 下载代码 #region 下载        /// <summary>        /// 下载        // ...

  10. 测试百度地图输入GPS经纬度显示位置API

    1.我的GPS获取的经纬度做度分秒转换后为 34.636055,112.40832 2.百度API介绍 GPS的坐标是WGS84,所以测试API http://api.map.baidu.com/ge ...