-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile error while running make in example/c #95
Comments
You can either update your LLVM or apply the following diff: diff --git a/examples/c/usdt.bpf.c b/examples/c/usdt.bpf.c
index 418aa48..ce6eedd 100644
--- a/examples/c/usdt.bpf.c
+++ b/examples/c/usdt.bpf.c
@@ -3,6 +3,7 @@
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
+#define BPF_USDT_HAS_BPF_COOKIE 0
#include <bpf/usdt.bpf.h>
pid_t my_pid; |
Applied it. Now have a new error
|
@ANOLASC, please try to repull libbpf-bootstrap (we've updated libbpf and other stuff meanwhile) and try again? You shouldn't need BPF_USDT_HAS_BPF_COOKIE anymore, btw. Please also make sure you are using a decently recent LLVM/Clang (as recent as you can). Please also report what Clang version you are using. Thanks. |
Still got the same error issue-1313523553. I use apt to install clang. clang --version clang version 10.0.0-4ubuntu1 |
Clang 10 is pretty old. Try upgrading to something newer. Also please check that your Clang supports BPF target. |
Make success by upgrading clang to 15. Thx. |
git clone and git submodule update --init --recursive
run make in example/c dir
ubuntu 20.04 with 5.13.0-52-generic kernel
The text was updated successfully, but these errors were encountered: