* [mainline][bpf] build failure: conflicting bpf_arena_* prototypes between vmlinux.h and bpf_arena_common.h
@ 2026-05-04 8:42 Venkat Rao Bagalkote
2026-05-04 8:44 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: Venkat Rao Bagalkote @ 2026-05-04 8:42 UTC (permalink / raw)
To: Saket Kumar Bhaskar, Hari Bathini, Madhavan Srinivasan, bpf,
linuxppc-dev
Cc: LKML
Greetings!!!
I’m seeing a CLANG-BPF build failure in tools/testing/selftests/bpf
related to conflicting prototypes of bpf_arena_* helpers between
vmlinux.h and bpf_arena_common.h, on mainline kernel.
Error log:
In file included from progs/arena_strsearch.c:12:
In file included from
tools/testing/selftests/bpf/bpf_arena_strsearch.h:4:
tools/testing/selftests/bpf/bpf_arena_common.h:47:15:
error: conflicting types for 'bpf_arena_alloc_pages'
void __arena* bpf_arena_alloc_pages(void *map,
void __arena *addr,
__u32 page_cnt,
__u32 node_id,
__u64 flags);
tools/testing/selftests/bpf/tools/include/vmlinux.h:135295:14:
note: previous declaration is here
extern void *bpf_arena_alloc_pages(void *p__map,
void *addr__ign,
u32 page_cnt,
int node_id,
u64 flags) __weak __ksym;
tools/testing/selftests/bpf/bpf_arena_common.h:49:5:
error: conflicting types for 'bpf_arena_reserve_pages'
int bpf_arena_reserve_pages(void *map,
void __arena *addr,
__u32 page_cnt) __ksym __weak;
tools/testing/selftests/bpf/tools/include/vmlinux.h:135297:12:
note: previous declaration is here
extern int bpf_arena_reserve_pages(void *p__map,
void *ptr__ign,
u32 page_cnt) __weak __ksym;
tools/testing/selftests/bpf/bpf_arena_common.h:50:6:
error: conflicting types for 'bpf_arena_free_pages'
void bpf_arena_free_pages(void *map,
void __arena *ptr,
__u32 page_cnt) __ksym __weak;
tools/testing/selftests/bpf/tools/include/vmlinux.h:135296:13:
note: previous declaration is here
extern void bpf_arena_free_pages(void *p__map,
void *ptr__ign,
u32 page_cnt) __weak __ksym;
Tool chain Versions:
gcc (GCC) 14.2.0
# clang --version
clang version 23.0.0git (https://github.com/llvm/llvm-project.git
bd6bfba3e50343c112a04b639394ab85be17c29b)
# llc --version
LLVM (http://llvm.org/):
LLVM version 23.0.0git
Optimized build.
Default target: powerpc64le-unknown-linux-gnu
Host CPU: (unknown)
Registered Targets:
bpf - BPF (host endian)
bpfeb - BPF (big endian)
bpfel - BPF (little endian)
ppc32 - PowerPC 32
ppc32le - PowerPC 32 LE
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
# objcopy --version | head -1
GNU objcopy version 2.35.2-67.el9_7.1
# ld --version | head -1
GNU ld version 2.35.2-67.el9_7.1
If you happen to fix this, please add below tag.
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Regards,
Venkat.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [mainline][bpf] build failure: conflicting bpf_arena_* prototypes between vmlinux.h and bpf_arena_common.h
2026-05-04 8:42 [mainline][bpf] build failure: conflicting bpf_arena_* prototypes between vmlinux.h and bpf_arena_common.h Venkat Rao Bagalkote
@ 2026-05-04 8:44 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2026-05-04 8:44 UTC (permalink / raw)
To: Venkat Rao Bagalkote
Cc: Saket Kumar Bhaskar, Hari Bathini, Madhavan Srinivasan, bpf,
linuxppc-dev, LKML
On Mon, May 4, 2026 at 10:42 AM Venkat Rao Bagalkote
<venkat88@linux.ibm.com> wrote:
>
> Greetings!!!
>
> I’m seeing a CLANG-BPF build failure in tools/testing/selftests/bpf
> related to conflicting prototypes of bpf_arena_* helpers between
> vmlinux.h and bpf_arena_common.h, on mainline kernel.
>
>
> Error log:
>
> In file included from progs/arena_strsearch.c:12:
> In file included from
> tools/testing/selftests/bpf/bpf_arena_strsearch.h:4:
> tools/testing/selftests/bpf/bpf_arena_common.h:47:15:
> error: conflicting types for 'bpf_arena_alloc_pages'
> void __arena* bpf_arena_alloc_pages(void *map,
> void __arena *addr,
> __u32 page_cnt,
> __u32 node_id,
> __u64 flags);
>
> tools/testing/selftests/bpf/tools/include/vmlinux.h:135295:14:
> note: previous declaration is here
> extern void *bpf_arena_alloc_pages(void *p__map,
> void *addr__ign,
> u32 page_cnt,
> int node_id,
> u64 flags) __weak __ksym;
>
> tools/testing/selftests/bpf/bpf_arena_common.h:49:5:
> error: conflicting types for 'bpf_arena_reserve_pages'
> int bpf_arena_reserve_pages(void *map,
> void __arena *addr,
> __u32 page_cnt) __ksym __weak;
>
> tools/testing/selftests/bpf/tools/include/vmlinux.h:135297:12:
> note: previous declaration is here
> extern int bpf_arena_reserve_pages(void *p__map,
> void *ptr__ign,
> u32 page_cnt) __weak __ksym;
>
> tools/testing/selftests/bpf/bpf_arena_common.h:50:6:
> error: conflicting types for 'bpf_arena_free_pages'
> void bpf_arena_free_pages(void *map,
> void __arena *ptr,
> __u32 page_cnt) __ksym __weak;
>
> tools/testing/selftests/bpf/tools/include/vmlinux.h:135296:13:
> note: previous declaration is here
> extern void bpf_arena_free_pages(void *p__map,
> void *ptr__ign,
> u32 page_cnt) __weak __ksym;
>
> Tool chain Versions:
>
> gcc (GCC) 14.2.0
> # clang --version
> clang version 23.0.0git (https://github.com/llvm/llvm-project.git
> bd6bfba3e50343c112a04b639394ab85be17c29b)
>
> # llc --version
> LLVM (http://llvm.org/):
> LLVM version 23.0.0git
> Optimized build.
> Default target: powerpc64le-unknown-linux-gnu
> Host CPU: (unknown)
>
> Registered Targets:
> bpf - BPF (host endian)
> bpfeb - BPF (big endian)
> bpfel - BPF (little endian)
> ppc32 - PowerPC 32
> ppc32le - PowerPC 32 LE
> ppc64 - PowerPC 64
> ppc64le - PowerPC 64 LE
>
> # objcopy --version | head -1
> GNU objcopy version 2.35.2-67.el9_7.1
> # ld --version | head -1
> GNU ld version 2.35.2-67.el9_7.1
>
>
> If you happen to fix this, please add below tag.
>
>
> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
The issue is in your setup.
It was brought up a couple times in the past.
Please search archives.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-04 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 8:42 [mainline][bpf] build failure: conflicting bpf_arena_* prototypes between vmlinux.h and bpf_arena_common.h Venkat Rao Bagalkote
2026-05-04 8:44 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox