Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Module SystemTap失败,错误为“;警告:kbuild已退出,状态为:2“;_Module_Makefile_Kernel_Systemtap_Kbuild - Fatal编程技术网

Module SystemTap失败,错误为“;警告:kbuild已退出,状态为:2“;

Module SystemTap失败,错误为“;警告:kbuild已退出,状态为:2“;,module,makefile,kernel,systemtap,kbuild,Module,Makefile,Kernel,Systemtap,Kbuild,我构建了一个定制的内核3.2-41,需要内核debuginfo common和内核debuginfo包。我使用内核2.6.32-358在CentOS系统上安装了这些软件包。使用新内核,系统启动良好。我运行stap列出系统调用和内核函数,没有任何问题: # stap -l 'syscall.*' # stap -l 'kernel.function("*")' 但是,运行简单的stap脚本: # stap -e 'probe "kernel.function("do_fork"){printf(

我构建了一个定制的内核3.2-41,需要内核debuginfo common和内核debuginfo包。我使用内核2.6.32-358在CentOS系统上安装了这些软件包。使用新内核,系统启动良好。我运行stap列出系统调用和内核函数,没有任何问题:

# stap -l 'syscall.*'
# stap -l 'kernel.function("*")'
但是,运行简单的stap脚本:

# stap -e 'probe "kernel.function("do_fork"){printf("fork is called\n")}'
返回时出错:

make[1]: *** No rule to make target`/tmp/stap2QWXn/stap_12cd14bbeaab6bfcaac79c1830a62d98_710.src needed by /tmp/stap2QXn/stap_12cd14bbeaab6bfcaac79c1830a62d98_710.o 
Stop.
make: *** [_module/stap2QWXn] Error 2
WARNING: kbuild exited with status: 2
pass 4: compilation failed. Try again with another '--vp 001' option.

我在/usr/src/kernels/3.2-41下解压3.2-41的源代码。我没有安装kernel-headers-3.2.41.x86_64.rpm包,因为它试图覆盖CentOS 2.6.32-258内核使用的/usr/include/目录。是否需要在/usr/include中安装头文件?这会导致这个问题吗?

我猜这与内核版本无关;可能是/tmp(完全?权限问题?)出了问题。
使用stap-k重试(保留tmpdir)。您应该会看到生成的stap_…src.c文件和其他一些文件。

确保已安装最新版本的gcc

sudo apt-get update
sudo apt-get install gcc