Re: [PATCH bpf-next v5] selftests/bpf: trace_helpers.c: optimize kallsyms cache
From: Rong Tao
Date: Mon Aug 21 2023 - 02:55:10 EST
tools/testing/selftests/bpf/ compile OK, however, samples/bpf/ compile failed.
>> tools/testing/selftests/bpf/trace_helpers.c:17:10:
>> fatal error: libbpf_internal.h: No such file or directory
>> 17 | #include "libbpf_internal.h"
>> | ^~~~~~~~~~~~~~~~~~~
>>
>> tools/testing/selftests/bpf/trace_helpers.c:17:10:
>> fatal error: bpf/libbpf_internal.h: No such file or directory
>> 17 | #include "bpf/libbpf_internal.h"
>> | ^~~~~~~~~~~~~~~~~~~~~~~
I just submit v6 [0], which apply libbpf_ensure_mem() and
TPROGS_CFLAGS += -I$(srctree)/tools/lib
to samples/bpf/Makefile, make sure, samples/bpf/Makefile could found
libbpf_internal.h.
Please review, thanks.
Rong Tao
[0] https://lore.kernel.org/lkml/tencent_4A09A36F883A06EA428A593497642AF8AF08@xxxxxx/