From: Viktor Malik on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2749#note_1608...
I don't think that setting `TPROGS_CFLAGS` here is correct.
The reason is that `samples/bpf/Makefile` appends a couple of options to
`TPROGS_CFLAGS`, particularly several include paths
([
samples/bpf/Makefile:173-177](https://gitlab.com/cki-project/kernel-
ark/-/blob/os-build/samples/bpf/Makefile?ref_type=heads#L173-L177)):
```
TPROGS_CFLAGS += -I$(objtree)/usr/include
TPROGS_CFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
TPROGS_CFLAGS += -I$(LIBBPF_INCLUDE)
TPROGS_CFLAGS += -I$(srctree)/tools/include
TPROGS_CFLAGS += -I$(srctree)/tools/perf
```
Due to the way Make works, these are overridden by setting `TPROGS_CFLAGS`
from CLI, resulting in include errors:
```
samples/bpf/test_lru_dist.c:20:10: fatal error: bpf/bpf.h: No such file or
directory
20 | #include <bpf/bpf.h>
| ^~~~~~~~~~~
compilation terminated.
```
I don't have a proper solution for now but will try to think about it.