From: Viktor Malik on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2749#note_1608645136

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.
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to