我遵循了SystemTap的安装过程,但得到了错误的结果。它是来自我做错的事情还是来自这个内核版本?
错误:
aurelien@icebot:~/git/stuff/SystemTap$ sudo stap -e 'probe begin { printf("Hello, World!\n"); exit() }'
cc1: fatal error: /tmp/stapsypJMr/stapconf_65457367ef4d7ed52aaaae440e42c00c_753.h: No such file or directory
compilation terminated
cc1: fatal error: /tmp/stapsypJMr/stapconf_65457367ef4d7ed52aaaae440e42c00c_753.h: No such file or directory
compilation terminated.
scripts/Makefile.build:284: recipe for target '/tmp/stapsypJMr/stap_9a0b55b200bf55578dbb0e27f51dd27f_992_src.o' failed
make[1]: *** [/tmp/stapsypJMr/stap_9a0b55b200bf55578dbb0e27f51dd27f_992_src.o] Error 1
make[1]: *** Waiting for unfinished jobs....
scripts/Makefile.build:284: recipe for target '/tmp/stapsypJMr/stap_9a0b55b200bf55578dbb0e27f51dd27f_992_aux_0.o' failed
make[1]: *** [/tmp/stapsypJMr/stap_9a0b55b200bf55578dbb0e27f51dd27f_992_aux_0.o] Error 1
Makefile:1606: recipe for target '_module_/tmp/stapsypJMr' failed
make: *** [_module_/tmp/stapsypJMr] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
aurelien@icebot:~/git/stuff/SystemTap$ uname -a
Linux icebot 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
安装过程:
sudo apt-get install systemtap
sudo apt-get install gcc
sudo apt-get install linux-headers-$(uname -r)
sudo stap -e 'probe begin { printf("Hello, World!\n"); exit() }'
Run Code Online (Sandbox Code Playgroud)
可能是一个损坏的软件包systemtap:Ubuntu 按原样使用 Debian 软件包,并非所有软件包都经过测试或重建为“[name]-ubuntu”。Debian 错误报告https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=Debian+systemtap+bug+report .. Ubuntu 错误报告https://www.google.com/webhp?hl =all&gws_rd=ssl#hl=en&q=ubuntu+systemtap+bug+报告
Ubuntu 19.04 与 linux-5.0.0-27-generic :
$ sudo apt remove systemtap
$ sudo apt install g++ make git libelf-dev libdw-dev
$ git clone git://sourceware.org/git/systemtap.git
$ cd systemtap/
$ ./configure && make // no errors
$ sudo make install
$ sudo stap -e 'probe begin { printf("Hello, World!\n"); exit() }'
[sudo] password for knudfl:
Hello, World!
Run Code Online (Sandbox Code Playgroud)