-
Notifications
You must be signed in to change notification settings - Fork 3.9k
BPF::init() failed on Kernel 5.18.4 with /virtual/main.c:4:12: error: use of undeclared identifier 'TASK_COMM_LEN'
#4092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
chenhengqi
added a commit
to chenhengqi/bcc
that referenced
this issue
Jul 7, 2022
Commit 3087c61ed2c4 ([0]) changes `TASK_COMM_LEN` from macro to enum. With this change, we have: field:char comm[TASK_COMM_LEN]; offset:8; size:16; signed:1; in tracepoint format. If users do NOT include proper headers, will result in: /virtual/main.c:4:12: error: use of undeclared identifier 'TASK_COMM_LEN' char comm[TASK_COMM_LEN]; ^ 1 error generated. Let's handle this with BTF info. Closes iovisor#4092. [0]: torvalds/linux@3087c61 Signed-off-by: Hengqi Chen <[email protected]>
Just opened #4095 to fix this issue. |
yonghong-song
pushed a commit
that referenced
this issue
Jul 10, 2022
Commit 3087c61ed2c4 ([0]) changes `TASK_COMM_LEN` from macro to enum. With this change, we have: field:char comm[TASK_COMM_LEN]; offset:8; size:16; signed:1; in tracepoint format. If users do NOT include proper headers, will result in: /virtual/main.c:4:12: error: use of undeclared identifier 'TASK_COMM_LEN' char comm[TASK_COMM_LEN]; ^ 1 error generated. Let's handle this with BTF info. Closes #4092. [0]: torvalds/linux@3087c61 Signed-off-by: Hengqi Chen <[email protected]>
sterchelen
pushed a commit
to sterchelen/bcc
that referenced
this issue
Sep 9, 2022
Commit 3087c61ed2c4 ([0]) changes `TASK_COMM_LEN` from macro to enum. With this change, we have: field:char comm[TASK_COMM_LEN]; offset:8; size:16; signed:1; in tracepoint format. If users do NOT include proper headers, will result in: /virtual/main.c:4:12: error: use of undeclared identifier 'TASK_COMM_LEN' char comm[TASK_COMM_LEN]; ^ 1 error generated. Let's handle this with BTF info. Closes iovisor#4092. [0]: torvalds/linux@3087c61 Signed-off-by: Hengqi Chen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A rather simple BPF::init() call with a trivial BPF program written in BCC format:
Failed with error message:
I suppose this is part of BCC's rewriting added this?
The text was updated successfully, but these errors were encountered: