The perf build failed on i386 on Linux next-20210519 and next-20210520 tag with gcc-7.3 due to below warnings / errors.
In file included from libbpf.c:55:0: libbpf.c: In function 'init_map_slots': libbpf_internal.h:102:22: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Werror=format=] libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \ ^ libbpf_internal.h:105:27: note: in expansion of macro '__pr' #define pr_warn(fmt, ...) __pr(LIBBPF_WARN, fmt, ##__VA_ARGS__) ^~~~ libbpf.c:4568:4: note: in expansion of macro 'pr_warn' pr_warn("// TODO map_update_elem: idx %ld key %d value==map_idx %ld\n", ^~~~~~~ libbpf.c:4568:44: note: format string is defined here pr_warn("// TODO map_update_elem: idx %ld key %d value==map_idx %ld\n", ~~^ %d In file included from libbpf.c:55:0: libbpf_internal.h:102:22: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Werror=format=] libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \ ^ libbpf_internal.h:105:27: note: in expansion of macro '__pr' #define pr_warn(fmt, ...) __pr(LIBBPF_WARN, fmt, ##__VA_ARGS__) ^~~~ libbpf.c:4568:4: note: in expansion of macro 'pr_warn' pr_warn("// TODO map_update_elem: idx %ld key %d value==map_idx %ld\n", ^~~~~~~ libbpf.c:4568:70: note: format string is defined here pr_warn("// TODO map_update_elem: idx %ld key %d value==map_idx %ld\n", ~~^ %d CC /srv/oe/build/tmp-lkft-glibc/work/intel_core2_32-linaro-linux/perf/1.0-r9/perf-1.0/cpu.o In file included from libbpf.c:55:0: libbpf.c: In function 'bpf_core_apply_relo': libbpf_internal.h:102:22: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Werror=format=] libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \ ^ libbpf_internal.h:105:27: note: in expansion of macro '__pr' #define pr_warn(fmt, ...) __pr(LIBBPF_WARN, fmt, ##__VA_ARGS__) ^~~~ libbpf.c:6192:3: note: in expansion of macro 'pr_warn' pr_warn("// TODO core_relo: prog %ld insn[%d] %s %s kind %d\n", ^~~~~~~ libbpf.c:6192:38: note: format string is defined here pr_warn("// TODO core_relo: prog %ld insn[%d] %s %s kind %d\n", ~~^ %d
Reported-by: Naresh Kamboju naresh.kamboju@linaro.org
https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DISTRO=lkft...
-- Linaro LKFT https://lkft.linaro.org