iovisor / iovisor/bcc

Getting fatal error: './include/linux/kconfig.h' file not found

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

Description

Hi @rtomayko,

I am running bcc on 6.1 kernel and can not use memleak due to below error.

I have installed the headers too.
`root@localhost:/lib/modules/6.1.0-mainline-qki-consolidate-maybe-dirty/build# ls
arch include
`
`
root@localhost:/usr/share/bcc/tools# python3 memleak
:1:10: fatal error: './include/linux/kconfig.h' file not found
#include "./include/linux/kconfig.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
File "memleak", line 445, 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
`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `/usr/share/bcc/tools/memleak` on the reported 6.1 kernel and inspect the `BPF(text=bpf_source)` path in `/usr/lib/python3/dist-packages/bcc/__init__.py`. Compare the kernel build tree under `/lib/modules/6.1.0-mainline-qki-consolidate-maybe-dirty/build`, especially `include/linux/kconfig.h`, with the include paths used during compilation. Done means memleak compiles and runs without the missing-header error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.