tcplife-bpfcc failed on ubuntu22.04 lts
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
env info:
```shell
root@charles:/usr/share/bpfcc-tools# apt list bpfcc-tools
Listing... Done
bpfcc-tools/jammy,now 0.18.0+ds-2 all [installed]
root@charles:/usr/share/bpfcc-tools#
root@charles:/usr/share/bpfcc-tools# uname -a
Linux charles 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:50 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
root@charles:/usr/share/bpfcc-tools#
root@charles:/usr/share/bpfcc-tools#
root@charles:/usr/share/bpfcc-tools# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
```
**command output:**
```
root@charles:/usr/share/bpfcc-tools# tcplife-bpfcc
In file included from /virtual/main.c:3:
In file included from include/linux/tcp.h:19:
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:211: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:211:49: note: forward declaration of 'struct bpf_timer'
memset(dst + map->timer_off, 0, sizeof(struct bpf_timer));
^
include/linux/bpf.h:225:10: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_timer'
t_sz = sizeof(struct bpf_timer);
^ ~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:225:24: note: forward declaration of 'struct bpf_timer'
t_sz = sizeof(struct bpf_timer);
^
include/linux/bpf.h:539:26: error: use of undeclared identifier 'BPF_PSEUDO_FUNC'
insn->src_reg == BPF_PSEUDO_FUNC;
^
In file included from /virtual/main.c:3:
In file included from include/linux/tcp.h:19:
In file included from include/net/sock.h:59:
include/linux/filter.h:1518: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:3:
In file included from include/linux/tcp.h:19:
In file included from include/net/sock.h:59:
include/linux/filter.h:1533: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 */
^
5 errors generated.
Traceback (most recent call last):
File "/usr/sbin/tcplife-bpfcc", line 455, in
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 ""))
Exception: Failed to compile BPF module
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by running /usr/sbin/tcplife-bpfcc on the reported Ubuntu 22.04 arm64 environment, then trace compilation through /usr/lib/python3/dist-packages/bcc/__init__.py and the generated /virtual/main.c. Investigate the reported kernel-header symbols and compatibility between bpfcc 0.18.0 and the 5.15 headers. Done means tcplife-bpfcc compiles and starts without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python
- Domain
- networking, observability, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100