Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1237195
  • 博文数量: 389
  • 博客积分: 2874
  • 博客等级: 少校
  • 技术积分: 3577
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-24 10:34
文章分类

全部博文(389)

文章存档

2020年(2)

2018年(39)

2017年(27)

2016年(3)

2015年(55)

2014年(92)

2013年(54)

2012年(53)

2011年(64)

分类: LINUX

2015-02-26 15:06:51

tar -xjvf calltree-2.3.tar.bz2
cd calltree-2.3
./Gmake.linux
在x86-64位的机器上编译calltree的时候会出现提示这样的错误而无法运行的情况:

RULES/rules1.top:234: incs/Dcc.x86_64-linux: 没有该文件或目录
RULES/rules.top:39: RULES/x86_64-linux-cc.rul: 没有该文件或目录
RULES/rules.cnf:56: incs/x86_64-linux-cc/Inull: 没有该文件或目录
RULES/rules.cnf:57: incs/x86_64-linux-cc/rules.cnf: 没有该文件或目录
p incs/x86_64-linux-cc
make: p:命令未找到
make: [incs/x86_64-linux-cc/Inull] 错误 127 (忽略)
/bin/sh: cannot create incs/x86_64-linux-cc/Inull: Directory nonexistent
make: *** [incs/x86_64-linux-cc/Inull] 错误 2

问题是calltree的这个版本里头还有X86064位对应的Makefile规则文件,可以直接把i686-linux-cc.rul复制为x86_64-linux-cc.rul

$ cd /path/to/calltree-2.3
$ cp RULES/i686-linux-cc.rul RULES/x86_64-linux-cc.rul

cankao:
再make。
点击(此处)折叠或打开

  1. ../include/schily.h:110:12: 错误:与‘fexecve’类型冲突
  2.  extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
  3.             ^
  4. In file included from ../include/unixstd.h:37:0,
  5.                  from stdio/io.h:27,
  6.                  from stdio/cvmod.c:21:
  7. /usr/include/unistd.h:557:12: 附注:‘fexecve’的上一个声明在此
  8.  extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
  9.             ^
  10. In file included from stdio/io.h:29:0,
  11.                  from stdio/cvmod.c:21:
  12. ../include/schily.h:186:12: 错误:与‘getline’类型冲突
  13.  extern int getline __PR((char *, int));
  14.             ^
  15. In file included from stdio/io.h:25:0,
  16.                  from stdio/cvmod.c:21:
  17. /usr/include/stdio.h:678:20: 附注:‘getline’的上一个声明在此
  18.  extern _IO_ssize_t getline (char **__restrict __lineptr,
  19.                     ^
  20. make[2]: *** [OBJ/x86_64-linux-cc/cvmod.o] 错误 1
  21. make[1]: *** [all] 错误 2
  22. In file included from calltree.c:33:0:
  23. ../include/schily.h:110:12: 错误:与‘fexecve’类型冲突
  24.  extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
  25.             ^
  26. In file included from ../include/unixstd.h:37:0,
  27.                  from calltree.c:31:
  28. /usr/include/unistd.h:557:12: 附注:‘fexecve’的上一个声明在此
  29.  extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
  30.             ^
  31. In file included from calltree.c:33:0:
  32. ../include/schily.h:186:12: 错误:与‘getline’类型冲突
cankao:http://blog.csdn.net/younggift/article/details/9238383
将所有 getline 和 fexecve 修改位 get_line f_execve
编译通过

calltree -b -dot lf=start_kernel KERNEL_DIR/init/*.c > ~/start_kernel.dot

dot -T png ~/start_kernel.dot -o ~/start_kernel.png

阅读(1133) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~