public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/31039] implicit declaration of function ‘stap_task_finder_complete’
Date: Mon, 11 Dec 2023 21:08:24 +0000	[thread overview]
Message-ID: <bug-31039-6586-BjUszrhEuK@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31039-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31039

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
Simplified the reproduce a bit more to:

stap -p4 -k -e 'probe process("a.out").function("main") {println(pp())}' -c
./a.out

Copied over the saved /tmp/stap* directories to the same machine and compared
the stapconfig*.h files:

$ diff -u0 pr31039_work/stapconf_1bb440e7276e415100ffcad1e32728e1_750.h
pr31039_broken/stapconf_9b039485a92757b3b5bcb8bed0dea5cd_953.h 
--- pr31039_work/stapconf_1bb440e7276e415100ffcad1e32728e1_750.h       
2023-12-11 14:43:43.486670764 -0500
+++ pr31039_broken/stapconf_9b039485a92757b3b5bcb8bed0dea5cd_953.h     
2023-12-11 14:41:21.846997966 -0500
@@ -46 +45,0 @@
-#define STAPCONF_UTRACE_VIA_TRACEPOINTS 1

The rawhide autoconf-utrace-via-tracepoints.c is failing to build.  This causes
the following code in runtime/linux/runtime.h to not include the needed
stap_task_finder_complete() or real definition of struct
stap_task_finder_target:


#if (defined(STAPCONF_UTRACE_VIA_TRACEPOINTS))
#define HAVE_TASK_FINDER
#include "task_finder.c"
#else
/* stub functionality that fails gracefully */
#include "task_finder_stubs.c"
#endif

The rawhide kernel has the tracepoints mentioned in
autoconf-utrace-via-tracepoints.c.  Adding "-vvvvv" to the commandline provide
the information about the autoconf compiles.  See the following on the x86_64
rawhide machine where there is a problem because of the struct folio:


if gcc -DMODULE -nostdinc -D__KERNEL__ -fmacro-prefix-map=./= 
-I./arch/x86/include -I./arch/x86/include/generated  -I./include
-I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi
-I./include/generated/uapi -include ./include/linux/compiler-version.h -include
./include/linux/kconfig.h  -std=gnu11 -fshort-wchar -funsigned-char -fno-common
-fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
-fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1
-mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
-mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare
-fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern
-mindirect-branch-register -mindirect-branch-cs-prefix
-mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all
-fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2
-fno-allow-store-data-races -fstack-protector-strong
-ftrivial-auto-var-init=zero  -fno-stack-clash-protection -pg -mrecord-mcount
-mfentry -DCC_USING_FENTRY -falign-functions=16  -fstrict-flex-arrays=3
-fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef
-Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type
-Werror=strict-prototypes -Wno-format-security -Wno-trigraphs
-Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048
-Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable
-Wno-dangling-pointer -Wvla -Wno-pointer-sign  -Wcast-function-type
-Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5
-Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init
-Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable
-Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow
-Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation
-Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value
-Wno-maybe-uninitialized -Wno-sign-compare     -DKBUILD_BASENAME=\"stap_40592\"
-Werror -S -o /dev/null -xc 
"/usr/share/systemtap/runtime"/linux/autoconf-utrace-via-tracepoints.c; then
echo "#define STAPCONF_UTRACE_VIA_TRACEPOINTS 1"; fi >>
/tmp/stapKt8wF0/autoconf-utrace-via-tracepoints.c.h
if gcc -DMODULE -nostdinc -D__KERNEL__ -fmacro-prefix-map=./= 
-I./arch/x86/include -I./arch/x86/include/generated  -I./include
-I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi
-I./include/generated/uapi -include ./include/linux/compiler-version.h -include
./include/linux/kconfig.h  -std=gnu11 -fshort-wchar -funsigned-char -fno-common
-fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
-fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1
-mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
-mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare
-fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern
-mindirect-branch-register -mindirect-branch-cs-prefix
-mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all
-fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2
-fno-allow-store-data-races -fstack-protector-strong
-ftrivial-auto-var-init=zero  -fno-stack-clash-protection -pg -mrecord-mcount
-mfentry -DCC_USING_FENTRY -falign-functions=16  -fstrict-flex-arrays=3
-fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef
-Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type
-Werror=strict-prototypes -Wno-format-security -Wno-trigraphs
-Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048
-Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable
-Wno-dangling-pointer -Wvla -Wno-pointer-sign  -Wcast-function-type
-Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5
-Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init
-Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable
-Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow
-Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation
-Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value
-Wno-maybe-uninitialized -Wno-sign-compare     -DKBUILD_BASENAME=\"stap_40592\"
-Werror -S -o /dev/null -xc 
"/usr/share/systemtap/runtime"/linux/autoconf-task_work-struct.c; then echo
"#define STAPCONF_TASK_WORK_STRUCT 1"; fi >>
/tmp/stapKt8wF0/autoconf-task_work-struct.c.h
In file included from ./include/trace/events/sched.h:9,
                 from
/usr/share/systemtap/runtime/linux/autoconf-utrace-via-tracepoints.c:1:
./include/linux/sched/numa_balancing.h:33:63: error: ‘struct folio’ declared
inside parameter list will not be visible outside of this definition or
declaration [-Werror]
   33 | bool should_numa_migrate_memory(struct task_struct *p, struct folio
*folio,
      |                                                               ^~~~~
/usr/share/systemtap/runtime/linux/autoconf-task_work-struct.c: In function
‘__autoconf_func’:
/usr/share/systemtap/runtime/linux/autoconf-task_work-struct.c:7:26: error:
storage size of ‘work’ isn’t known
    7 |         struct task_work work;
      |                          ^~~~
/usr/share/systemtap/runtime/linux/autoconf-task_work-struct.c:9:9: error: too
many arguments to function ‘init_task_work’
    9 |         init_task_work(&work, NULL, NULL);
      |         ^~~~~~~~~~~~~~
In file included from
/usr/share/systemtap/runtime/linux/autoconf-task_work-struct.c:1:
./include/linux/task_work.h:11:1: note: declared here
   11 | init_task_work(struct callback_head *twork, task_work_func_t func)
      | ^~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/autoconf-task_work-struct.c:7:26: error:
unused variable ‘work’ [-Werror=unused-variable]
    7 |         struct task_work work;
      |                          ^~~~
cc1: all warnings being treated as errors

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2023-12-11 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 14:39 [Bug runtime/31039] New: " mcermak at redhat dot com
2023-12-06 22:36 ` [Bug runtime/31039] " wcohen at redhat dot com
2023-12-11 21:08 ` wcohen at redhat dot com [this message]
2023-12-11 22:15 ` wcohen at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31039-6586-BjUszrhEuK@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).