Replies: 9 comments 1 reply
-
Hi @Hugo96870, it's nice to see you trying libbpfgo. We recommend you build it statically since you'll have a different libbpf system version (most of the time). For building your code correctly, please refer to the selftests Makefile that sets the required flags: https://github.com/aquasecurity/libbpfgo/blob/main/selftest/common/Makefile |
Beta Was this translation helpful? Give feedback.
-
Hi @geyslan! I'm sorry for the delayed response
Even if I comment everything related with
These are with the changes to use the local repos (example of my go.mod file):
If I don't use the local repos the error is the one I started with as expected |
Beta Was this translation helpful? Give feedback.
-
Check if your libbpfgo/selftest/common/vmlinux.h Line 128 in 3c5cd66 More related: |
Beta Was this translation helpful? Give feedback.
-
Yes the vmlinux.h has a definition for
This also happens on version of libbpf 1.2 and libbpfgo v0.5.1-libbpf-1.2, from what I could gather the issue is in the struct I see its definition in here: |
Beta Was this translation helpful? Give feedback.
-
How did you solved it (BPF_MAP_TYPE_BLOOM_FILTER missing def)? I ask since the lack of bpf_cgroup_iter_order seems related to it.
The last libbpfgo release - v0.6.0-libbpf-1.3 - requires libbpf 1.3. Please, try using the last release and itslibbpf 1.3 submodule. We don't recommend to use the system or other local version. |
Beta Was this translation helpful? Give feedback.
-
With some local changes, but it led to a dead end.
With this version the error that pops is the first one:
All the selftests pass and following the other threads led to dead ends as well |
Beta Was this translation helpful? Give feedback.
-
Well, I did a local test with your code and realized that your golang import is wrong: "github.com/aquasecurity/tracee/libbpfgo" Replace it with:
My local test:
Command to compile it:
It outputs other error since you don't have a |
Beta Was this translation helpful? Give feedback.
-
I'm going to convert it to a discussion since we didn't detect any issue. |
Beta Was this translation helpful? Give feedback.
-
We can continue this as a discussion yes! I just replaced evertything with the programs you specified and the first error still persists:
|
Beta Was this translation helpful? Give feedback.
-
Hey!
I installed cilium and the go library
Now I'm trying to run the program but I'm getting incompatibility issues.
ebpf program
Go loader:
Error on command go build -o ./loader ./loader.go
From what I saw this seems like some incompatibility between versions, but I reinstalled both go and libbpf 3 times and it didn't work
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions