Linux next perf build failing for i386 architecture. - build/gcc-11-lkftconfig-perf
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Build log: CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/syscall.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/tests/parse-events.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/build-id.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/cacheline.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/config.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/copyfile.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/mem-functions.o bench/syscall.c: In function 'bench_syscall_common': bench/syscall.c:101:22: error: '__NR_execve' undeclared (first use in this function) 101 | case __NR_execve: | ^~~~~~~~~~~ bench/syscall.c:101:22: note: each undeclared identifier is reported only once for each function it appears in bench/syscall.c: In function 'bench_syscall_execve': bench/syscall.c:183:49: error: '__NR_execve' undeclared (first use in this function) 183 | return bench_syscall_common(argc, argv, __NR_execve); | ^~~~~~~~~~~ bench/syscall.c:184:1: error: control reaches end of non-void function [-Werror=return-type] 184 | } | ^ cc1: all warnings being treated as errors
logs: - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/tes... - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/tes...
Steps to reproduce: ============= # To install tuxmake on your system globally: # sudo pip3 install -U tuxmake # # See https://docs.tuxmake.org/ for complete documentation. # Original tuxmake command with fragments listed below. # tuxmake \ --runtime podman \ --target-arch i386 \ --toolchain gcc-11 \ --kconfig defconfig \ --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-ke... \ --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-ke... \ --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-ke... \ --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-ke... \ --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-ke... \ --kconfig-add CONFIG_IGB=y \ --kconfig-add CONFIG_UNWINDER_FRAME_POINTER=y \ --kconfig-add CONFIG_SYN_COOKIES=y \ --kconfig-add CONFIG_FTRACE_SYSCALLS=y NO_BPF_SKEL=1 debugkernel headers kernel modules perf
-- Linaro LKFT https://lkft.linaro.org
On 05/17/2023 11:04 PM, Naresh Kamboju wrote:
Linux next perf build failing for i386 architecture.
- build/gcc-11-lkftconfig-perf
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Build log: CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/syscall.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/tests/parse-events.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/build-id.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/cacheline.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/config.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/copyfile.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/mem-functions.o bench/syscall.c: In function 'bench_syscall_common': bench/syscall.c:101:22: error: '__NR_execve' undeclared (first use in this function)
Hi Naresh,
Sorry for that, the __NR_execve definition for i386 was deleted by mistake in the commit ece7f7c0507c ("perf bench syscall: Add fork syscall benchmark").
Could you please help to check whether the build error can be fixed with the following changes? If yes, I will send a formal patch as soon as possible, thank you.
$ git diff tools/arch/x86/include/uapi/asm/unistd_32.h diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h index b8ddfc4..bc48a4d 100644 --- a/tools/arch/x86/include/uapi/asm/unistd_32.h +++ b/tools/arch/x86/include/uapi/asm/unistd_32.h @@ -2,6 +2,9 @@ #ifndef __NR_fork #define __NR_fork 2 #endif +#ifndef __NR_execve +#define __NR_execve 11 +#endif #ifndef __NR_getppid #define __NR_getppid 64 #endif
Thanks, Tiezhu
On Thu, 18 May 2023 at 12:17, Tiezhu Yang yangtiezhu@loongson.cn wrote:
On 05/17/2023 11:04 PM, Naresh Kamboju wrote:
Linux next perf build failing for i386 architecture.
- build/gcc-11-lkftconfig-perf
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Build log: CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/syscall.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/tests/parse-events.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/build-id.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/cacheline.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/config.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/util/copyfile.o CC /home/tuxbuild/.cache/tuxmake/builds/1/build/bench/mem-functions.o bench/syscall.c: In function 'bench_syscall_common': bench/syscall.c:101:22: error: '__NR_execve' undeclared (first use in this function)
Hi Naresh,
Sorry for that, the __NR_execve definition for i386 was deleted by mistake in the commit ece7f7c0507c ("perf bench syscall: Add fork syscall benchmark").
Could you please help to check whether the build error can be fixed with the following changes? If yes, I will send a formal patch as soon as possible, thank you.
Tested-by: Naresh Kamboju naresh.kamboju@linaro.org Build tested this patch and perf build pass on i386 now.
Thanks for the quick fix patch.
$ git diff tools/arch/x86/include/uapi/asm/unistd_32.h diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h index b8ddfc4..bc48a4d 100644 --- a/tools/arch/x86/include/uapi/asm/unistd_32.h +++ b/tools/arch/x86/include/uapi/asm/unistd_32.h @@ -2,6 +2,9 @@ #ifndef __NR_fork #define __NR_fork 2 #endif +#ifndef __NR_execve +#define __NR_execve 11 +#endif #ifndef __NR_getppid #define __NR_getppid 64 #endif
Thanks, Tiezhu
- Naresh