memleak reports asm/types.h file not found
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 3
Description
I build bcc from source successfully, but when I run memleak, it reports this error:
```
❯ ./memleak -p 3698
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 "./memleak", line 427, in
bpf = BPF(text=bpf_source)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 479, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or ""))
Exception: Failed to compile BPF module
```
And actually this file "asm/types.h" exists in the default include directory:
```
❯ ll /usr/include/x86_64-linux-gnu/asm/types.h
-rw-r--r-- 1 root root 152 Nov 5 19:22 /usr/include/x86_64-linux-gnu/asm/types.h
```
My system is ubuntu 18.04.
Can someone help to solve this issue?
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with ./memleak -p 3698 on Ubuntu 18.04, then inspect include/linux/types.h and include/uapi/linux/types.h alongside the BCC compilation path reported by bcc/__init__.py. Done means memleak can compile its BPF module and run without the asm/types.h error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100