systemtap 在 5.0.0 内核上损坏了吗?

systemtap 在 5.0.0 内核上损坏了吗?

我按照 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

安装过程:

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() }'

答案1

可能是损坏的软件包系统水龙头: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+report

带有 linux-5.0.0-27-generic 的 Ubuntu 19.04:

$ 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!

相关内容