2022-07-22 07:25:31

by Sachin Sant

[permalink] [raw]
Subject: [next-20220721] Build failure powerpc (tools/bpf)

next-20220721 build fails on IBM Power server with following error:

libbpf.c: In function 'bpf_program__attach_ksyscall':
libbpf.c:10130:45: error: '%s' directive argument is null [-Werror=format-truncation=]
snprintf(func_name, sizeof(func_name), "__%s_sys_%s",
^~
cc1: all warnings being treated as errors
make[4]: *** [/home/linux-next/tools/build/Makefile.build:96: /home/linux-next/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
make[3]: *** [Makefile:157: /home/linux-next/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
make[2]: *** [Makefile:55: /home/linux-next/tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
make[1]: *** [Makefile:76: bpf/resolve_btfids] Error 2
make: *** [Makefile:1439: tools/bpf/resolve_btfids] Error 2

next-20220719 was good. Git bisect points to following commit

Commit 708ac5bea0ce
libbpf: add ksyscall/kretsyscall sections support for syscall kprobes


Reverting this commit allows me to build the kernel.

Have attached .config used for build.

- Sachin


Attachments:
config_next (172.14 kB)

2022-07-29 01:53:16

by Andrii Nakryiko

[permalink] [raw]
Subject: Re: [next-20220721] Build failure powerpc (tools/bpf)

On Fri, Jul 22, 2022 at 12:04 AM Sachin Sant <[email protected]> wrote:
>
> next-20220721 build fails on IBM Power server with following error:
>
> libbpf.c: In function 'bpf_program__attach_ksyscall':
> libbpf.c:10130:45: error: '%s' directive argument is null [-Werror=format-truncation=]
> snprintf(func_name, sizeof(func_name), "__%s_sys_%s",
> ^~
> cc1: all warnings being treated as errors
> make[4]: *** [/home/linux-next/tools/build/Makefile.build:96: /home/linux-next/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
> make[3]: *** [Makefile:157: /home/linux-next/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
> make[2]: *** [Makefile:55: /home/linux-next/tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
> make[1]: *** [Makefile:76: bpf/resolve_btfids] Error 2
> make: *** [Makefile:1439: tools/bpf/resolve_btfids] Error 2
>
> next-20220719 was good. Git bisect points to following commit
>
> Commit 708ac5bea0ce
> libbpf: add ksyscall/kretsyscall sections support for syscall kprobes
>
>

This was addressed by [0], thanks for report!

[0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=64893e83f916

> Reverting this commit allows me to build the kernel.
>
> Have attached .config used for build.
>
> - Sachin
>