[Bug runtime/25265] tapscripts using ustack, ubacktrace etc fail to compile on kernel 3.4
craig.ringer at 2ndquadrant dot com
sourceware-bugzilla@sourceware.org
Tue Dec 10 06:05:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=25265
--- Comment #1 from Craig Ringer <craig.ringer at 2ndquadrant dot com> ---
This probably relates to this kernel patch:
https://patchwork.kernel.org/patch/10916651/ or the series it's part of like
https://patchwork.kernel.org/patch/10916613/
I wonder if this is a redhat-ism (some local patch).
The runtime looks like it already understands that "struct stack_trace" went
away in Linux 5.2, given runtime/linux/autoconf-stack-trace-save-regs.c and the
ifdef for STAPCONF_STACK_TRACE_SAVE_REGS in runtime/stack.c .
I checked the generated module with stap -k. The generated header
stapconf_458f21c1e2c146ca5cc99e95113a4f8b_799.h does not contain
STAPCONF_STACK_TRACE_SAVE_REGS .
Tweaking the Makefile so it doesn't swallow output of the configure tests
(surely those should go to a log?) shows the following error:
```
make -f ./scripts/Makefile.build obj=/tmp/stapsiNon3
/tmp/stapsiNon3/stap_767845_src.i
/usr/local/share/systemtap/runtime/linux/autoconf-stack-trace-save-regs.c:3:14:
error: function declaration isn’t a prototype [-Werror=strict-prototypes]
3 | unsigned int foo ()
| ^~~
cc1: all warnings being treated as errors
```
When I fix that by adding a prototype to
/usr/local/share/systemtap/runtime/linux/autoconf-stack-trace-save-regs.c
```
unsigned int foo(void);
```
and remove the generated header then re-make, the generated header now includes
STAPCONF_STACK_TRACE_SAVE_REGS:
```
/tmp/stapsiNon3# grep -r STAPCONF_STACK_TRACE_SAVE_REGS
stapconf_458f21c1e2c146ca5cc99e95113a4f8b_799.h:#define
STAPCONF_STACK_TRACE_SAVE_REGS 1
```
... and the build fails at a later step due to `-Werror`.
So in short, the configure test fails due to `-Werror` and a missing prototype,
causing the runtime to fail to detect the new stack API in the kernel.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list