Public bug reported:

I received multiple errors while trying to run tcptop-bpfcc:

$ sudo tcptop-bpfcc
[sudo] password for sarnold: 
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:41:9: warning: '__HAVE_BUILTIN_BSWAP32__' macro 
redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP32__
        ^
<command line>:4:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP32__ 1
        ^
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:42:9: warning: '__HAVE_BUILTIN_BSWAP64__' macro 
redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP64__
        ^
<command line>:5:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP64__ 1
        ^
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:43:9: warning: '__HAVE_BUILTIN_BSWAP16__' macro 
redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP16__
        ^
<command line>:3:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP16__ 1
        ^
In file included from /virtual/main.c:15:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:41:
In file included from include/net/netprio_cgroup.h:11:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:220:35: error: invalid application of 'sizeof' to an 
incomplete type 'struct bpf_timer'
                memset(dst + map->timer_off, 0, sizeof(struct bpf_timer));
                                                ^     ~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:220:49: note: forward declaration of 'struct bpf_timer'
                memset(dst + map->timer_off, 0, sizeof(struct bpf_timer));
                                                              ^
include/linux/bpf.h:234:10: error: invalid application of 'sizeof' to an 
incomplete type 'struct bpf_timer'
                t_sz = sizeof(struct bpf_timer);
                       ^     ~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:234:24: note: forward declaration of 'struct bpf_timer'
                t_sz = sizeof(struct bpf_timer);
                                     ^
include/linux/bpf.h:548:26: error: use of undeclared identifier 
'BPF_PSEUDO_FUNC'
               insn->src_reg == BPF_PSEUDO_FUNC;
                                ^
In file included from /virtual/main.c:15:
In file included from include/net/sock.h:59:
include/linux/filter.h:1520:44: error: use of undeclared identifier 
'BPF_F_BROADCAST'; did you mean 'IFF_BROADCAST'?
        if (unlikely(!ri->tgt_value) && !(flags & BPF_F_BROADCAST)) {
                                                  ^~~~~~~~~~~~~~~
                                                  IFF_BROADCAST
include/uapi/linux/if.h:86:2: note: 'IFF_BROADCAST' declared here
        IFF_BROADCAST                   = 1<<1,  /* volatile */
        ^
In file included from /virtual/main.c:15:
In file included from include/net/sock.h:59:
include/linux/filter.h:1535:14: error: use of undeclared identifier 
'BPF_F_BROADCAST'; did you mean 'IFF_BROADCAST'?
        if (flags & BPF_F_BROADCAST) {
                    ^~~~~~~~~~~~~~~
                    IFF_BROADCAST
include/uapi/linux/if.h:86:2: note: 'IFF_BROADCAST' declared here
        IFF_BROADCAST                   = 1<<1,  /* volatile */
        ^
3 warnings and 5 errors generated.
Traceback (most recent call last):
  File "/usr/sbin/tcptop-bpfcc", line 225, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 364, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: bpfcc-tools 0.18.0+ds-2
ProcVersionSignature: Ubuntu 5.15.0-113.123-generic 5.15.152
Uname: Linux 5.15.0-113-generic x86_64
NonfreeKernelModules: lkp_Ubuntu_5_15_0_113_123_generic_106 zfs zunicode zavl 
icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Tue Oct  1 16:02:52 2024
InstallationDate: Installed on 2016-04-04 (3102 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Beta amd64 
(20160325)
PackageArchitecture: all
ProcEnviron:
 LC_TIME=C
 TERM=rxvt-unicode-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: bpfcc
UpgradeStatus: Upgraded to jammy on 2022-08-14 (779 days ago)

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


** Tags: amd64 apport-bug jammy

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

Title:
  error: invalid application of 'sizeof' to an incomplete type 'struct
  bpf_timer'

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to