Open Safari77 opened 4 years ago
I did make headers_install
after checkout, bcc works.
Could a useful error message be printed, it could check kern_version and say something cool if EINVAL is caught and bpf's kern_version is different from uname -r
.
@Safari77 yes, such a message will be useful. could you help with a pull request? The message should only be printed out if not for cross compilation.
This worked with bcc 0.12.0 (libbpf 0.0.7) on x86_64 Fedora 30 (kernel 4.19.106), but the next day (running the same kernel!) I get EINVAL error... :roll_eyes: Fedora uses flags
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_CMD=python3 -DCMAKE_USE_LIBBPF_PACKAGE:BOOL=TRUE
.I tried also 0.13.0 without that libbpf flag but I still get EINVAL.
In the bpf() call there is
kern_version=KERNEL_VERSION(4, 19, 107)
. I compiled 4.19.107 but where does bcc pull that version from, I run 4.19.106?/lib/modules/4.19.106+/build
points to directory where linux-stable git repo is located at. Even though I dogit checkout
in the directory to version 4.19.106 and rebuild bcc, bcc still wants to use kern_version 4.19.107...? :roll_eyes: