Open tpgxyz opened 1 year ago
Hi, i'd like to confirm that applying abovementioned patch fixed th compilation issue of bpftool with clang. Here is my local patch: https://github.com/OpenMandrivaAssociation/kernel/blob/master/bpftool-use-a-local-bpf_perf_event_value-to-fix-accessing-its-fields.patch
Hi, any chance you can push this to upstream ?
Sorry for taking so long to respond! I've ping the thread upstream: https://lore.kernel.org/bpf/ZH+e9IYk+DIZzUFL@google.com/.
Quentin replied on the thread pointing to https://lore.kernel.org/all/20230512103354.48374-1-quentin@isovalent.com/t/#u as the newer series. You may need to take that for a spin.
when CC=clang.
Just as a precision, this should not be related to CC=clang. I would expect this error to happen just as well with gcc, as long as you try to compile on < 5.15 kernels and with bpftool's clang-bpf-co-re
feature. I suspect that the difference when using clang is that you have clang actually installed on the system, and that clang-bpf-co-re
is detected as supported and picked up by the Makefile.
Compiling on newer kernels should work, compiling without this feature should work too (Although I'd strongly recommend keeping this feature when packaging bpftool. It's also necessary for building some optional parts of Linux (preloaded BPF iterators, BPF selftests/samples)).
Hi,
looks like bpftool does not compile when CC=clang. What i only found is only this https://lore.kernel.org/bpf/20220421003152.339542-4-alobakin@pm.me/ i'm going to apply it locally and see if this is going to help. Kindply please take a look on this.
Sources: https://github.com/OpenMandrivaAssociation/kernel