1

I built a custom kernel 3.2-41, required kernel-debuginfo-common and kernel-debuginfo packages. I installed these packages on CentOS System with kernel 2.6.32-358. System booted fine with new kernel. I ran stap to list system calls and kernel function without any issue:

# stap -l 'syscall.*'
# stap -l 'kernel.function("*")'

However, running a simple stap script:

# stap -e 'probe "kernel.function("do_fork"){printf("fork is called\n")}'

return with errors:

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.

I untar the source of 3.2-41 under /usr/src/kernels/3.2-41. I did not install the kernel-headers-3.2.41.x86_64.rpm package considering it is attempting to overwrite /usr/include/ directories used by CentOS 2.6.32-258 kernel. Do I need to install headers in /usr/include? Would that be causing this issue?

3 Answers 3

0

My guess is that this has nothing to do with kernel versions; maybe something went wrong with /tmp (full? permission problem?). Try again with stap -k (keep tmpdir). You should see a generated stap_..._src.c file and some others.

0

Make sure you have the latest version of gcc installed.

sudo apt-get update
sudo apt-get install gcc
0

Try increasing the verbosity level:

# stap -vvvv -e ...

This shows output of kbuild and any errors occuring. In my case, the gcc used to compile the kernel did not match the gcc used by stap for the kbuild.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.