Public bug reported:

I want to get systemtap working with ubuntu desktop 24.04 x64, but it
appears that Canonical does not test systemtap in any meaningful way on
the LTS release, and ships an old incompatible version of systemtap,
because simple stap commands fail, as does stap-prep and related
commands.

I am using ubuntu desktop 24.04.4 on x64, along with gcc 13.

$ lsb_release -rd
No LSB modules are available.
Description:    Ubuntu 24.04.4 LTS
Release:        24.04


apt-cache policy systemtap
systemtap:
  Installed: 5.0-2ubuntu1
  Candidate: 5.0-2ubuntu1
  Version table:
 *** 5.0-2ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status


$ apt-cache policy gcc
gcc:
  Installed: 4:13.2.0-7ubuntu1
  Candidate: 4:13.2.0-7ubuntu1
  Version table:
 *** 4:13.2.0-7ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status


Previously this computer was upgraded-in-place from 22.04 LTS and before that 
from 18.04 LTS on bare metal.

I installed systemtap by following the (somewhat out of date):
https://sourceware.org/systemtap/wiki/SystemtapOnUbuntu
and also 
https://wiki.ubuntu.com/Kernel/Systemtap

The `stap --version` command reports 5.0, and that kernel versions
between 2.6.32 and 6.6-rc1 are tested, but my kernel appears to be
6.8.0-124

The kernel symbols are installed ( linux-image-
unsigned-6.8.0-124-generic-dbgsym).

When I run the initial test for systemtap, as mentioned in the section
2.1.3 of the RedHat systemtap beginners guide, i.e.

#stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
Pass 1: parsed user script and 491 library scripts using 
148172virt/121288res/11764shr/108700data kb, in 190usr/70sys/280real ms.
WARNING: cannot find module nfs debuginfo: No DWARF information found [man 
warning::debuginfo]
(the above warning is repeated 217 times, although no nfs service is 
configured) 
WARNING: cannot find module nfs debuginfo: No DWARF information found [man 
warning::debuginfo]
Pass 2: analyzed script: 1 probe, 1 function, 5 embeds, 0 globals using 
520756virt/424836res/16704shr/415840data kb, in 4270usr/1910sys/7022real ms.
Pass 3: translated to C into 
"/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c" using 
520756virt/424996res/16864shr/415840data kb, in 10usr/0sys/23real ms.
In file included from /usr/share/systemtap/runtime/linux/access_process_vm.h:6,
                 from /usr/share/systemtap/runtime/linux/runtime.h:315,
                 from /usr/share/systemtap/runtime/runtime.h:26,
                 from 
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:21:
/usr/share/systemtap/runtime/linux/access_process_vm.h: In function 
‘__access_process_vm_’:
/usr/share/systemtap/runtime/linux/stap_mmap_lock.h:10:43: error: ‘struct 
mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
   10 | #define mmap_read_lock(mm) down_read(&mm->mmap_sem)
      |                                           ^~~~~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:33:3: note: in expansion 
of macro ‘mmap_read_lock’
   33 |   mmap_read_lock (mm);
      |   ^~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:63:36: error: passing 
argument 1 of ‘get_user_pages_remote’ from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   63 |       ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, 
&vma);
      |                                    ^~~
      |                                    |
      |                                    struct task_struct *
In file included from ./include/linux/kallsyms.h:13,
                 from ./include/linux/ftrace.h:13,
                 from ./include/linux/kprobes.h:28,
                 from /usr/share/systemtap/runtime/linux/runtime.h:21:
./include/linux/mm.h:2529:46: note: expected ‘struct mm_struct *’ but argument 
is of type ‘struct task_struct *’
 2529 | long get_user_pages_remote(struct mm_struct *mm,
      |                            ~~~~~~~~~~~~~~~~~~^~
/usr/share/systemtap/runtime/linux/access_process_vm.h:63:41: error: passing 
argument 2 of ‘get_user_pages_remote’ makes integer from pointer without a cast 
[-Werror=int-conversion]
   63 |       ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, 
&vma);
      |                                         ^~
      |                                         |
      |                                         struct mm_struct *
./include/linux/mm.h:2530:42: note: expected ‘long unsigned int’ but argument 
is of type ‘struct mm_struct *’
 2530 |                            unsigned long start, unsigned long nr_pages,
      |                            ~~~~~~~~~~~~~~^~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:63:54: error: passing 
argument 5 of ‘get_user_pages_remote’ makes pointer from integer without a cast 
[-Werror=int-conversion]
   63 |       ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, 
&vma);
      |                                                      ^~~~~
      |                                                      |
      |                                                      int
./include/linux/mm.h:2531:66: note: expected ‘struct page **’ but argument is 
of type ‘int’
 2531 |                            unsigned int gup_flags, struct page **pages,
      |                                                    ~~~~~~~~~~~~~~^~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:63:61: error: passing 
argument 6 of ‘get_user_pages_remote’ makes pointer from integer without a cast 
[-Werror=int-conversion]
   63 |       ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, 
&vma);
      |                                                             ^
      |                                                             |
      |                                                             int
./include/linux/mm.h:2532:33: note: expected ‘int *’ but argument is of type 
‘int’
 2532 |                            int *locked);
      |                            ~~~~~^~~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:63:13: error: too many 
arguments to function ‘get_user_pages_remote’
   63 |       ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, 
&vma);
      |             ^~~~~~~~~~~~~~~~~~~~~
./include/linux/mm.h:2529:6: note: declared here
 2529 | long get_user_pages_remote(struct mm_struct *mm,
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/stap_mmap_lock.h:12:43: error: ‘struct 
mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
   12 | #define mmap_read_unlock(mm) up_read(&mm->mmap_sem)
      |                                           ^~~~~~~~
/usr/share/systemtap/runtime/linux/access_process_vm.h:104:3: note: in 
expansion of macro ‘mmap_read_unlock’
  104 |   mmap_read_unlock(mm);
      |   ^~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:318:
/usr/share/systemtap/runtime/linux/alloc.c: In function ‘_stp_alloc_percpu’:
/usr/share/systemtap/runtime/linux/alloc.c:473:15: error: too few arguments to 
function ‘__alloc_percpu’
  473 |         ret = __alloc_percpu(size);
      |               ^~~~~~~~~~~~~~
In file included from ./include/linux/percpu_counter.h:14,
                 from ./include/linux/mm_types.h:21,
                 from ./include/linux/mmzone.h:22,
                 from ./include/linux/gfp.h:7,
                 from /usr/share/systemtap/runtime/linux/runtime_defines.h:20,
                 from /usr/share/systemtap/runtime/runtime_defines.h:8,
                 from 
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:12:
./include/linux/percpu.h:133:23: note: declared here
  133 | extern void __percpu *__alloc_percpu(size_t size, size_t align) 
__alloc_size(1);
      |                       ^~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:320:
/usr/share/systemtap/runtime/stp_string.c: In function ‘_stp_text_str’:
/usr/share/systemtap/runtime/stp_string.c:304:9: error: implicit declaration of 
function ‘strlcpy’; did you mean ‘strscpy’? 
[-Werror=implicit-function-declaration]
  304 |         strlcpy (outstr, "<unknown>", outlen);
      |         ^~~~~~~
      |         strscpy
In file included from /usr/share/systemtap/runtime/linux/../linux/regs.c:16,
                 from /usr/share/systemtap/runtime/linux/../regs.c:20,
                 from /usr/share/systemtap/runtime/linux/runtime.h:323:
/usr/share/systemtap/runtime/compatdefs.h: At top level:
/usr/share/systemtap/runtime/compatdefs.h:112:33: error: redefinition of 
‘get_kretprobe’
  112 | static inline struct kretprobe* get_kretprobe(struct kretprobe_instance 
*inst)
      |                                 ^~~~~~~~~~~~~
./include/linux/kprobes.h:198:42: note: previous definition of ‘get_kretprobe’ 
with type ‘struct kretprobe *(struct kretprobe_instance *)’
  198 | static nokprobe_inline struct kretprobe *get_kretprobe(struct 
kretprobe_instance *ri)
      |                                          ^~~~~~~~~~~~~
/usr/share/systemtap/runtime/compatdefs.h: In function ‘get_kretprobe’:
/usr/share/systemtap/runtime/compatdefs.h:114:14: error: ‘struct 
kretprobe_instance’ has no member named ‘rp’
  114 |   return inst->rp;
      |              ^~
In file included from /usr/share/systemtap/runtime/vma.c:18,
                 from /usr/share/systemtap/runtime/sym.c:16,
                 from /usr/share/systemtap/runtime/linux/runtime.h:341:
/usr/share/systemtap/runtime/task_finder_vma.c: At top level:
/usr/share/systemtap/runtime/task_finder_vma.c:29:20: error: redefinition of 
‘hlist_add_tail_rcu’
   29 | static inline void hlist_add_tail_rcu(struct hlist_node *n,
      |                    ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/dcache.h:8,
                 from ./include/linux/fs.h:8,
                 from ./include/linux/compat.h:17,
                 from ./arch/x86/include/asm/ia32.h:7,
                 from ./arch/x86/include/asm/elf.h:10,
                 from ./include/linux/elf.h:6,
                 from ./include/linux/module.h:19,
                 from /usr/share/systemtap/runtime/linux/runtime.h:14:
./include/linux/rculist.h:615:20: note: previous definition of 
‘hlist_add_tail_rcu’ with type ‘void(struct hlist_node *, struct hlist_head *)’
  615 | static inline void hlist_add_tail_rcu(struct hlist_node *n,
      |                    ^~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/task_finder_vma.c:48:19: error: redefinition of 
‘atomic_fetch_add_unless’
   48 | static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/atomic.h:82,
                 from ./include/linux/cpumask.h:13,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/irqflags.h:82,
                 from ./include/linux/irqflags.h:18,
                 from ./include/linux/spinlock.h:59,
                 from ./include/linux/mmzone.h:8:
./include/linux/atomic/atomic-instrumented.h:1484:1: note: previous definition 
of ‘atomic_fetch_add_unless’ with type ‘int(atomic_t *, int,  int)’
 1484 | atomic_fetch_add_unless(atomic_t *v, int a, int u)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/sym.c:371:15: error: no previous prototype for 
‘_stp_linenumber_lookup’ [-Werror=missing-prototypes]
  371 | unsigned long _stp_linenumber_lookup(unsigned long addr, struct 
task_struct *task,
      |               ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:345:
/usr/share/systemtap/runtime/linux/addr-map.c: In function 
‘lookup_bad_addr_user’:
/usr/share/systemtap/runtime/linux/addr-map.c:96:49: error: macro "access_ok" 
passed 3 arguments, but takes just 2
   96 |       || !stp_access_ok(type, (void *)addr, size))
      |                                                 ^
In file included from ./arch/x86/include/asm/uaccess.h:25,
                 from ./include/linux/uaccess.h:11,
                 from /usr/share/systemtap/runtime/addr-map.h:17,
                 from /usr/share/systemtap/runtime/runtime.h:22:
./include/asm-generic/access_ok.h:45: note: macro "access_ok" defined here
   45 | #define access_ok(addr, size) likely(__access_ok(addr, size))
      | 
/usr/share/systemtap/runtime/linux/addr-map.c:48:30: error: ‘access_ok’ 
undeclared (first use in this function)
   48 | #define stp_access_ok(x,y,z) access_ok(x,y,z)
      |                              ^~~~~~~~~
/usr/share/systemtap/runtime/linux/addr-map.c:96:11: note: in expansion of 
macro ‘stp_access_ok’
   96 |       || !stp_access_ok(type, (void *)addr, size))
      |           ^~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/addr-map.c:48:30: note: each undeclared 
identifier is reported only once for each function it appears in
   48 | #define stp_access_ok(x,y,z) access_ok(x,y,z)
      |                              ^~~~~~~~~
/usr/share/systemtap/runtime/linux/addr-map.c:96:11: note: in expansion of 
macro ‘stp_access_ok’
   96 |       || !stp_access_ok(type, (void *)addr, size))
      |           ^~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h: At top level:
/usr/share/systemtap/runtime/linux/runtime.h:451:6: error: no previous 
prototype for ‘stap_cleanup_module’ [-Werror=missing-prototypes]
  451 | void stap_cleanup_module(void)
      |      ^~~~~~~~~~~~~~~~~~~
./include/net/scm.h: In function ‘__scm_recv_common’:
/usr/share/systemtap/runtime/linux/runtime.h:151:40: error: incompatible types 
when initializing type ‘unsigned int’ using type ‘kuid_t’
  151 | #define from_kuid_munged(user_ns, uid) ((uid))
      |                                        ^
./include/net/scm.h:188:32: note: in expansion of macro ‘from_kuid_munged’
  188 |                         .uid = from_kuid_munged(current_ns, 
scm->creds.uid),
      |                                ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:152:40: error: incompatible types 
when initializing type ‘unsigned int’ using type ‘kgid_t’
  152 | #define from_kgid_munged(user_ns, gid) ((gid))
      |                                        ^
./include/net/scm.h:189:32: note: in expansion of macro ‘from_kgid_munged’
  189 |                         .gid = from_kgid_munged(current_ns, 
scm->creds.gid),
      |                                ^~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/transport/transport.c:70,
                 from /usr/share/systemtap/runtime/linux/print.c:17,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime_context.h:22,
                 from 
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:104:
/usr/share/systemtap/runtime/transport/relay_v2.c: At top level:
/usr/share/systemtap/runtime/transport/relay_v2.c:269:35: error: initialization 
of ‘struct dentry * (*)(const char *, struct dentry *, umode_t,  struct 
rchan_buf *, int *)’ {aka ‘struct dentry * (*)(const char *, struct dentry *, 
short unsigned int,  struct rchan_buf *, int *)’} from incompatible pointer 
type ‘struct dentry * (*)(const char *, struct dentry *, int,  struct rchan_buf 
*, int *)’ [-Werror=incompatible-pointer-types]
  269 |         .create_buf_file        = __stp_relay_create_buf_file_callback,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/relay_v2.c:269:35: note: (near 
initialization for ‘__stp_relay_callbacks.create_buf_file’)
In file included from ./include/linux/kernel.h:22,
                 from ./include/linux/cpumask.h:10:
/usr/share/systemtap/runtime/transport/debugfs.c: In function 
‘_stp_debugfs_get_root_dir’:
/usr/share/systemtap/runtime/transport/debugfs.c:185:46: error: ‘struct 
hlist_head’ has no member named ‘next’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                                              ^
./include/linux/container_of.h:19:33: note: in definition of macro 
‘container_of’
   19 |         void *__mptr = (void *)(ptr);                                   
\
      |                                 ^~~
/usr/share/systemtap/runtime/transport/debugfs.c:185:22: note: in expansion of 
macro ‘list_entry’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                      ^~~~~~~~~~
In file included from ./include/linux/bits.h:31,
                 from ./include/linux/gfp_types.h:5,
                 from ./include/linux/gfp.h:5:
/usr/share/systemtap/runtime/transport/debugfs.c:185:46: error: ‘struct 
hlist_head’ has no member named ‘next’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                                              ^
./include/linux/build_bug.h:78:56: note: in definition of macro 
‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:20:9: note: in expansion of macro ‘static_assert’
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       
\
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       
\
      |                       ^~~~~~~~~~~
./include/linux/list.h:601:9: note: in expansion of macro ‘container_of’
  601 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/debugfs.c:185:22: note: in expansion of 
macro ‘list_entry’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                      ^~~~~~~~~~
/usr/share/systemtap/runtime/transport/debugfs.c:185:46: error: ‘struct 
hlist_head’ has no member named ‘next’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                                              ^
./include/linux/build_bug.h:78:56: note: in definition of macro 
‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:20:9: note: in expansion of macro ‘static_assert’
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       
\
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:21:23: note: in expansion of macro ‘__same_type’
   21 |                       __same_type(*(ptr), void),                        
\
      |                       ^~~~~~~~~~~
./include/linux/list.h:601:9: note: in expansion of macro ‘container_of’
  601 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/debugfs.c:185:22: note: in expansion of 
macro ‘list_entry’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                      ^~~~~~~~~~
././include/linux/compiler_types.h:436:27: error: expression in static 
assertion is not an integer
  436 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), 
typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro 
‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:20:9: note: in expansion of macro ‘static_assert’
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       
\
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       
\
      |                       ^~~~~~~~~~~
./include/linux/list.h:601:9: note: in expansion of macro ‘container_of’
  601 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/debugfs.c:185:22: note: in expansion of 
macro ‘list_entry’
  185 |                 sb = list_entry(fs->fs_supers.next, struct super_block,
      |                      ^~~~~~~~~~
In file included from /usr/share/systemtap/runtime/transport/procfs.c:13,
                 from /usr/share/systemtap/runtime/transport/transport.c:72:
/usr/share/systemtap/runtime/proc_fs_compatibility.h: At top level:
/usr/share/systemtap/runtime/proc_fs_compatibility.h:29:13: error: static 
declaration of ‘proc_set_user’ follows non-static declaration
   29 | static void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t 
gid)
      |             ^~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:22:
./include/linux/proc_fs.h:117:13: note: previous declaration of ‘proc_set_user’ 
with type ‘void(struct proc_dir_entry *, kuid_t,  kgid_t)’
  117 | extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
      |             ^~~~~~~~~~~~~
/usr/share/systemtap/runtime/proc_fs_compatibility.h: In function 
‘proc_set_user’:
/usr/share/systemtap/runtime/proc_fs_compatibility.h:31:11: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   31 |         de->uid = __kuid_val(uid);
      |           ^~
/usr/share/systemtap/runtime/proc_fs_compatibility.h:32:11: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   32 |         de->gid = __kgid_val(gid);
      |           ^~
/usr/share/systemtap/runtime/proc_fs_compatibility.h: At top level:
/usr/share/systemtap/runtime/proc_fs_compatibility.h:43:13: error: static 
declaration of ‘proc_remove’ follows non-static declaration
   43 | static void proc_remove(struct proc_dir_entry *de)
      |             ^~~~~~~~~~~
./include/linux/proc_fs.h:129:13: note: previous declaration of ‘proc_remove’ 
with type ‘void(struct proc_dir_entry *)’
  129 | extern void proc_remove(struct proc_dir_entry *);
      |             ^~~~~~~~~~~
/usr/share/systemtap/runtime/proc_fs_compatibility.h: In function ‘proc_remove’:
/usr/share/systemtap/runtime/proc_fs_compatibility.h:45:21: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   45 |         if (de && de->subdir == NULL) {
      |                     ^~
/usr/share/systemtap/runtime/proc_fs_compatibility.h:46:36: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   46 |                 if (atomic_read(&de->count) != LAST_ENTRY_COUNT)
      |                                    ^~
In file included from ./include/asm-generic/bug.h:22,
                 from ./arch/x86/include/asm/bug.h:100,
                 from ./arch/x86/include/asm/alternative.h:8,
                 from ./arch/x86/include/asm/nospec-branch.h:10,
                 from ./arch/x86/include/asm/irqflags.h:9:
/usr/share/systemtap/runtime/proc_fs_compatibility.h:50:34: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   50 |                                de->name);
      |                                  ^~
./include/linux/printk.h:436:33: note: in definition of macro 
‘printk_index_wrap’
  436 |                 _p_func(_fmt, ##__VA_ARGS__);                           
\
      |                                 ^~~~~~~~~~~
/usr/share/systemtap/runtime/proc_fs_compatibility.h:47:25: note: in expansion 
of macro ‘printk’
   47 |                         printk(KERN_ERR "Removal of %s from /proc"
      |                         ^~~~~~
/usr/share/systemtap/runtime/proc_fs_compatibility.h:51:37: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   51 |                 remove_proc_entry(de->name, de->parent);
      |                                     ^~
/usr/share/systemtap/runtime/proc_fs_compatibility.h:51:47: error: invalid use 
of undefined type ‘struct proc_dir_entry’
   51 |                 remove_proc_entry(de->name, de->parent);
      |                                               ^~
/usr/share/systemtap/runtime/transport/procfs.c: In function 
‘_stp_procfs_register_ctl_channel_fs’:
/usr/share/systemtap/runtime/transport/procfs.c:245:64: error: passing argument 
4 of ‘proc_create’ from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  245 |         de = proc_create(".cmd", 0600, _stp_procfs_module_dir, 
&_stp_ctl_fops_cmd);
      |                                                                
^~~~~~~~~~~~~~~~~~
      |                                                                |
      |                                                                struct 
file_operations *
./include/linux/proc_fs.h:115:122: note: expected ‘const struct proc_ops *’ but 
argument is of type ‘struct file_operations *’
  115 | roc_dir_entry *proc_create(const char *name, umode_t mode, struct 
proc_dir_entry *parent, const struct proc_ops *proc_ops);
      |                                                                         
                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

/usr/share/systemtap/runtime/transport/procfs.c: In function 
‘__stp_procfs_relay_create_buf_file_callback’:
/usr/share/systemtap/runtime/transport/procfs.c:401:22: error: passing argument 
4 of ‘proc_create’ from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  401 |                      & relay_procfs_operations);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      struct file_operations *
./include/linux/proc_fs.h:115:122: note: expected ‘const struct proc_ops *’ but 
argument is of type ‘struct file_operations *’
  115 | roc_dir_entry *proc_create(const char *name, umode_t mode, struct 
proc_dir_entry *parent, const struct proc_ops *proc_ops);
      |                                                                         
                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

In file included from /usr/share/systemtap/runtime/transport/control.c:14,
                 from /usr/share/systemtap/runtime/transport/transport.c:73:
/usr/share/systemtap/runtime/transport/symbols.c: At top level:
/usr/share/systemtap/runtime/transport/symbols.c:157:6: error: no previous 
prototype for ‘put_module_sect_attrs’ [-Werror=missing-prototypes]
  157 | void put_module_sect_attrs(struct stap_module_sect_attrs* as)
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/symbols.c: In function 
‘_stp_read_file_from_path’:
/usr/share/systemtap/runtime/transport/symbols.c:175:33: error: passing 
argument 2 of ‘kernel_read’ makes pointer from integer without a cast 
[-Werror=int-conversion]
  175 |         ret = kernel_read(file, pos, buf, len);
      |                                 ^~~
      |                                 |
      |                                 loff_t {aka long long int}
./include/linux/fs.h:2932:43: note: expected ‘void *’ but argument is of type 
‘loff_t’ {aka ‘long long int’}
 2932 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                           ^~~~~~
/usr/share/systemtap/runtime/transport/symbols.c:175:38: error: passing 
argument 3 of ‘kernel_read’ makes integer from pointer without a cast 
[-Werror=int-conversion]
  175 |         ret = kernel_read(file, pos, buf, len);
      |                                      ^~~
      |                                      |
      |                                      char *
./include/linux/fs.h:2932:51: note: expected ‘size_t’ {aka ‘long unsigned int’} 
but argument is of type ‘char *’
 2932 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                   ^~~~~~
/usr/share/systemtap/runtime/transport/symbols.c:175:43: error: passing 
argument 4 of ‘kernel_read’ makes pointer from integer without a cast 
[-Werror=int-conversion]
  175 |         ret = kernel_read(file, pos, buf, len);
      |                                           ^~~
      |                                           |
      |                                           size_t {aka long unsigned int}
./include/linux/fs.h:2932:59: note: expected ‘loff_t *’ {aka ‘long long int *’} 
but argument is of type ‘size_t’ {aka ‘long unsigned int’}
 2932 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                           ^~~~~~~~
/usr/share/systemtap/runtime/transport/control.c: In function 
‘_stp_ctl_write_cmd’:
/usr/share/systemtap/runtime/linux/runtime.h:151:40: error: incompatible types 
when initializing type ‘uid_t’ {aka ‘unsigned int’} using type ‘kuid_t’
  151 | #define from_kuid_munged(user_ns, uid) ((uid))
      |                                        ^
/usr/share/systemtap/runtime/transport/control.c:41:22: note: in expansion of 
macro ‘from_kuid_munged’
   41 |         uid_t euid = from_kuid_munged(current_user_ns(), 
current_euid());
      |                      ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/transport/transport.c: In function 
‘_stp_transport_init’:
/usr/share/systemtap/runtime/linux/runtime.h:151:40: error: incompatible types 
when assigning to type ‘uid_t’ {aka ‘unsigned int’} from type ‘kuid_t’
  151 | #define from_kuid_munged(user_ns, uid) ((uid))
      |                                        ^
/usr/share/systemtap/runtime/transport/transport.c:582:20: note: in expansion 
of macro ‘from_kuid_munged’
  582 |         _stp_uid = from_kuid_munged(current_user_ns(), current_uid());
      |                    ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:152:40: error: incompatible types 
when assigning to type ‘gid_t’ {aka ‘unsigned int’} from type ‘kgid_t’
  152 | #define from_kgid_munged(user_ns, gid) ((gid))
      |                                        ^
/usr/share/systemtap/runtime/transport/transport.c:583:20: note: in expansion 
of macro ‘from_kgid_munged’
  583 |         _stp_gid = from_kgid_munged(current_user_ns(), current_gid());
      |                    ^~~~~~~~~~~~~~~~
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c: At top level:
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:118:18: error: 
no previous prototype for ‘module_refresh_timer_cb’ [-Werror=missing-prototypes]
  118 | hrtimer_return_t module_refresh_timer_cb(struct hrtimer *timer) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/timer.h:17,
                 from 
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:113:
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c: In function 
‘module_refresh_timer_cb’:
/usr/share/systemtap/runtime/linux/timer.h:38:56: error: ‘struct hrtimer’ has 
no member named ‘expires’
   38 | #define hrtimer_set_expires(timer, time) (void)((timer)->expires = 
(time))
      |                                                        ^~
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:121:3: note: 
in expansion of macro ‘hrtimer_set_expires’
  121 |   hrtimer_set_expires(timer,
      |   ^~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/timer.h:37:44: error: ‘struct hrtimer’ has 
no member named ‘expires’
   37 | #define hrtimer_get_expires(timer) ((timer)->expires)
      |                                            ^~
/usr/share/systemtap/runtime/linux/timer.h:38:69: note: in definition of macro 
‘hrtimer_set_expires’
   38 | #define hrtimer_set_expires(timer, time) (void)((timer)->expires = 
(time))
      |                                                                     ^~~~
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:122:5: note: 
in expansion of macro ‘ktime_add’
  122 |     ktime_add(hrtimer_get_expires(timer),
      |     ^~~~~~~~~
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.c:122:15: note: 
in expansion of macro ‘hrtimer_get_expires’
  122 |     ktime_add(hrtimer_get_expires(timer),
      |               ^~~~~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/namespaces.h: In function 
‘from_target_user_ns’:
/usr/share/systemtap/runtime/linux/runtime.h:151:40: error: incompatible types 
when assigning to type ‘int’ from type ‘kuid_t’
  151 | #define from_kuid_munged(user_ns, uid) ((uid))
      |                                        ^
/usr/share/systemtap/runtime/linux/namespaces.h:220:13: note: in expansion of 
macro ‘from_kuid_munged’
  220 |       ret = from_kuid_munged(target_user_ns, task_uid(ts));
      |             ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:151:40: error: incompatible types 
when assigning to type ‘int’ from type ‘kuid_t’
  151 | #define from_kuid_munged(user_ns, uid) ((uid))
      |                                        ^
/usr/share/systemtap/runtime/linux/namespaces.h:223:13: note: in expansion of 
macro ‘from_kuid_munged’
  223 |       ret = from_kuid_munged(target_user_ns, task_euid(ts));
      |             ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:152:40: error: incompatible types 
when assigning to type ‘int’ from type ‘kgid_t’
  152 | #define from_kgid_munged(user_ns, gid) ((gid))
      |                                        ^
/usr/share/systemtap/runtime/linux/namespaces.h:230:13: note: in expansion of 
macro ‘from_kgid_munged’
  230 |       ret = from_kgid_munged(target_user_ns, task_gid(ts));
      |             ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:152:40: error: incompatible types 
when assigning to type ‘int’ from type ‘kgid_t’
  152 | #define from_kgid_munged(user_ns, gid) ((gid))
      |                                        ^
/usr/share/systemtap/runtime/linux/namespaces.h:237:13: note: in expansion of 
macro ‘from_kgid_munged’
  237 |       ret = from_kgid_munged(target_user_ns, task_egid(ts));
      |             ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/compatdefs.h: In function ‘get_kretprobe’:
/usr/share/systemtap/runtime/compatdefs.h:115:1: error: control reaches end of 
non-void function [-Werror=return-type]
  115 | }
      | ^
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:243: 
/tmp/stapMbyUaH/stap_e4e444ad8b04d06c888cfa5e6b591215_2623_src.o] Error 1
make: *** [Makefile:1936: /tmp/stapMbyUaH] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_e4e444ad8b04d06c888cfa5e6b591215_2623.ko" in 
30530usr/5220sys/2957real ms.
Pass 4: compilation failed.  [man error::pass4]
Kernel version 6.8.0 is outside tested range 2.6.32 ... 6.6-rc1
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
root@t7920:~#

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: systemtap 5.0-2ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-124.124-generic 6.8.12
Uname: Linux 6.8.0-124-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.8
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Fri Jun  5 15:45:26 2026
InstallationDate: Installed on 2019-05-17 (2576 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
ProcEnviron:
 LANG=en_GB.UTF-8
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 SHELL=/bin/bash
 XDG_RUNTIME_DIR=<set>
SourcePackage: systemtap
UpgradeStatus: Upgraded to noble on 2026-03-28 (69 days ago)

** Affects: systemtap (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2155656

Title:
  systemtap version outdated and incompatible with 24.04.4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/2155656/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to