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。
点击(此处)折叠或打开
-
../include/schily.h:110:12: 错误:与‘fexecve’类型冲突
-
extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
-
^
-
In file included from ../include/unixstd.h:37:0,
-
from stdio/io.h:27,
-
from stdio/cvmod.c:21:
-
/usr/include/unistd.h:557:12: 附注:‘fexecve’的上一个声明在此
-
extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
-
^
-
In file included from stdio/io.h:29:0,
-
from stdio/cvmod.c:21:
-
../include/schily.h:186:12: 错误:与‘getline’类型冲突
-
extern int getline __PR((char *, int));
-
^
-
In file included from stdio/io.h:25:0,
-
from stdio/cvmod.c:21:
-
/usr/include/stdio.h:678:20: 附注:‘getline’的上一个声明在此
-
extern _IO_ssize_t getline (char **__restrict __lineptr,
-
^
-
make[2]: *** [OBJ/x86_64-linux-cc/cvmod.o] 错误 1
-
make[1]: *** [all] 错误 2
-
In file included from calltree.c:33:0:
-
../include/schily.h:110:12: 错误:与‘fexecve’类型冲突
-
extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
-
^
-
In file included from ../include/unixstd.h:37:0,
-
from calltree.c:31:
-
/usr/include/unistd.h:557:12: 附注:‘fexecve’的上一个声明在此
-
extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
-
^
-
In file included from calltree.c:33:0:
-
../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
阅读(1222) | 评论(0) | 转发(0) |