The `stap` command `stap -v /usr/share/doc/ruby-doc/ruby-exercise.stp` failed with the error message "/tmp/stapDvINwb/stap_bbfe2b752994c99f0f71dd47cba5dbff_18900_src.c:12:10: fatal error: runtime_defines.h: No such file or directory" on Fedora rawhide. The command worked without erorr in the past. Reproducible: Always Steps to Reproduce: 1. # dnf install kernel-devel systemtap-client ruby ruby-doc 2. # stap -v /usr/share/doc/ruby-doc/ruby-exercise.stp Actual Results: The following stap command failed with the error. ``` # stap -v /usr/share/doc/ruby-doc/ruby-exercise.stp Pass 1: parsed user script and 487 library scripts using 143836virt/111248res/15168shr/97436data kb, in 150usr/40sys/193real ms. Pass 2: analyzed script: 19 probes, 7 functions, 1 embed, 0 globals using 146480virt/117160res/18520shr/100080data kb, in 20usr/0sys/15real ms. Pass 3: translated to C into "/tmp/stapDvINwb/stap_bbfe2b752994c99f0f71dd47cba5dbff_18900_src.c" using 147572virt/118968res/19096shr/101172data kb, in 140usr/150sys/293real ms. /tmp/stapDvINwb/stap_bbfe2b752994c99f0f71dd47cba5dbff_18900_src.c:12:10: fatal error: runtime_defines.h: No such file or directory 12 | #include "runtime_defines.h" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.build:244: /tmp/stapDvINwb/stap_bbfe2b752994c99f0f71dd47cba5dbff_18900_src.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1972: /tmp/stapDvINwb] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compiled C into "stap_bbfe2b752994c99f0f71dd47cba5dbff_18900.ko" in 950usr/570sys/1568real ms. Pass 4: compilation failed. [man error::pass4] Kernel version 6.12.0 is outside tested range 3.10 ... 6.11-rc3 # echo $? 1 ``` Expected Results: The above stap command finishs without an error. The used RPM dependencies are below. ``` # uname -r 6.12.0-0.rc0.20240920gitbaeb9a7d8b60.7.fc42.x86_64 # rpm -q kernel kernel-devel systemtap-client ruby ruby-doc kernel-6.12.0-0.rc0.20240920gitbaeb9a7d8b60.7.fc42.x86_64 kernel-devel-6.12.0-0.rc0.20240920gitbaeb9a7d8b60.7.fc42.x86_64 systemtap-client-5.2~pre17250223gd07e4284-1.fc42.x86_64 ruby-3.3.5-15.fc42.x86_64 ruby-doc-3.3.5-15.fc42.noarch ``` ``` # rpm -qf /usr/bin/stap systemtap-client-5.2~pre17250223gd07e4284-1.fc42.x86_64 # rpm -qf /usr/share/doc/ruby-doc/ruby-exercise.stp ruby-doc-3.3.5-15.fc42.noarch ``` The used .stp file is below. ``` # cat /usr/share/doc/ruby-doc/ruby-exercise.stp /* Example tapset file. * * You can execute the tapset using following command (please adjust the path * prior running the command, if needed): * * stap /usr/share/doc/ruby-2.0.0.0/ruby-exercise.stp -c "ruby -e \"puts 'test'\"" */ probe ruby.cmethod.entry { printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); } probe ruby.cmethod.return { printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); } probe ruby.method.entry { printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); } probe ruby.method.return { printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); } probe ruby.gc.mark.begin { printf("%d gc.mark.begin\n", tid()); } probe ruby.gc.mark.end { printf("%d gc.mark.end\n", tid()); } probe ruby.gc.sweep.begin { printf("%d gc.sweep.begin\n", tid()); } probe ruby.gc.sweep.end { printf("%d gc.sweep.end\n", tid()); } probe ruby.object.create{ printf("%d obj.create %s %s:%d\n", tid(), classname, file, line); } probe ruby.raise { printf("%d raise %s %s:%d\n", tid(), classname, file, line); } ```
The systemtap-client package alone is not enough to build/run systemtap scripts alone. Use the systemtap-devel subpackage instead. This is being clarified in future versions of the subpackage descriptions.
I was wrong about showing the reproducing steps. The error "fatal error: runtime_defines.h: No such file or directory" happened in a testing environment using Fedora rawhide below, where the `systemtap` RPM is installed. The systemtap-devel RPM should be installed there. I will reproduce the issue again to report it here. https://src.fedoraproject.org/tests/ruby/blob/main/f/systemtap-static-probes-in-ruby/main.fmf#_12
> I will reproduce the issue again to report it here. It seems I reported a different error from the original error that I faced in the testing environment. So, if I will open a new ticket when I was able to reproduce the error.