iovisor / iovisor/bcc

arm64: 'asm/types.h' file not found

Open
#4,253 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi there,

I'm trying to use bcc tools 0.17.0-ad5b82a5 on a arm64. Python version is 3.9,
Kernel version is 5.10.109, and I have the kernel headers installed on the file system.

When trying to use any tool, I'm getting the following error:

# ./tcptop
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
include/uapi/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
#include
^~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
File "/usr/share/bcc/tools/./tcptop", line 225, in
b = BPF(text=bpf_text)
File "/usr/lib/python3.9/site-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

Referring to issue #3731 I tried setting the environment variable BCC_KERNEL_SOURCE, but the result is the same.
Anyway, this issue is relevant to x86-64, my case is arm64.

Can you advise?

Thanks,

Nir.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the tcptop entry point and inspect the include/linux/types.h and include/uapi/linux/types.h paths involved in the missing asm/types.h error. Review how BCC_KERNEL_SOURCE is consumed in bcc/__init__.py, then verify that a BCC tool compiles and runs on arm64 with the installed kernel headers.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, python
Domain
cli, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.