0

I am attempting to run the bcc tool's "profile.py", and ran into the following error:

./bcc/tools/profile.py   
Sampling at 49 Hertz of all threads by user + kernel stack... Hit Ctrl-C to end.
In file included from <built-in>:1:
././include/linux/kconfig.h:5:10: fatal error: 'generated/autoconf.h' file not found
#include <generated/autoconf.h>
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
  File "./bcc/tools/profile.py", line 265, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 325, in __init__
    raise Exception("Failed to compile BPF text")

The linux headers are found under the normal location of /lib/modules. This is running under kernel version 4.19.88.

Any pointer will be appreciated.

hc6
  • 153
  • 9
  • What distribution are you running? Do `find /usr/src/linux-headers-$(uname -r) -name autoconf.h` or `locate autoconf.h` return something? (Do you have Linux headers installed on your machine?) – Qeole Jul 17 '20 at 07:59
  • Thanks for the tip. I did not install the linux headers properly. – hc6 Jul 21 '20 at 05:17

0 Answers0