Bug 25266 - Log configure command output when compiling modules
Summary: Log configure command output when compiling modules
Status: UNCONFIRMED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 minor
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-10 06:12 UTC by Craig Ringer
Modified: 2024-08-21 06:31 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Ringer 2019-12-10 06:12:15 UTC
The runtime configure commands' output is not logged anywhere. From the generated Makefile for module builds:

~~~
        @if $(CHECK_BUILD) $(SYSTEMTAP_RUNTIME)/linux/autoconf-linux-sched_headers.c > /dev/null 2>&1; then echo "#define STAPCONF_LINUX_SCHED_HEADERS 1"; fi >> $@
~~~

all output is sent to /dev/null .

This made diagnosis rather harder in #25265 

I suggest redirection of stdout to stderr instead, and bracketing it with an echo. Like

~~~
        @echo Runtime configure test linux/autoconf-linux-sched_headers.c for STAPCONF_LINUX_SCHED_HEADERS:
        @if $(CHECK_BUILD) $(SYSTEMTAP_RUNTIME)/linux/autoconf-linux-sched_headers.c 1>&2; then echo "#define STAPCONF_LINUX_SCHED_HEADERS 1"; echo "yes"; else echo "no"; fi >> $@
~~~
Comment 1 Frank Ch. Eigler 2019-12-12 20:30:25 UTC
All the runtime autoconf results end up in a stapconf_HEXHEXHEX.h file, did you see that one?  We can't transcribe dozens of check/results to systemtap's stderr, that's too chatty.  Maybe with some stap --vp 0x000 level, but then this level would have to be communicated to the kbuild makefile.
Comment 2 Craig Ringer 2019-12-13 04:56:23 UTC
Yes, it's relatively easy to find the test outcomes, but not why the test returned success or failure. That's part of why diagnosing these issues took me so long.

I was thinking it'd make sense to output the configure test results at stap -vvv or similar. So yes, probably by injecting a variable in the make command invocation.