kernel-4.1.0-0.rc6.git0.1.fc23 doesn't build on ppc64le in f23. it looks like stubs-32.h is needed in this case to build perf-read-vdso.c. The build breaks with errors: gcc -m32 -Wall -Werror -o perf-read-vdso32 perf-read-vdso.c gcc -Wp,-MD,arch/powerpc/util/.skip-callchain-idx.o.d,-MT,arch/powerpc/util/skip-callchain-idx.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wshadow -Wstrict-aliasing=3 -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -O6 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D_FORTIFY_SOURCE=2 -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/perf/util/include -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/perf/arch/powerpc/include -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/include/ -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/arch/powerpc/include/uapi -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/arch/powerpc/include -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/include/uapi -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/include -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/perf/util -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/perf -I/builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/lib/ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP -DHAVE_LIBELF_SUPPORT -DHAVE_LIBELF_MMAP_SUPPORT -DHAVE_ELF_GETPHDRNUM_SUPPORT -DHAVE_DWARF_SUPPORT -DHAVE_SKIP_CALLCHAIN_IDX -DHAVE_LIBAUDIT_SUPPORT -I/usr/include/slang -DHAVE_SLANG_SUPPORT -DHAVE_TIMERFD_SUPPORT -DHAVE_LIBBFD_SUPPORT -DHAVE_ZLIB_SUPPORT -DHAVE_BACKTRACE_SUPPORT -DHAVE_LIBNUMA_SUPPORT -DHAVE_PERF_READ_VDSO32 -D"BUILD_STR(s)=#s" -c -o arch/powerpc/util/skip-callchain-idx.o arch/powerpc/util/skip-callchain-idx.c gcc -Wp,-MD,./.trace-seq.o.d,-MT,trace-seq.o -g -Wall -fPIC -I. -I /builddir/build/BUILD/kernel-4.0.fc23/linux-4.1.0-0.rc6.git0.1.fc23.ppc64le/tools/include '-DPLUGIN_DIR="/usr/lib64/traceevent/plugins"' -D_GNU_SOURCE -D"BUILD_STR(s)=#s" -c -o trace-seq.o trace-seq.c In file included from /usr/include/features.h:389:0, from /usr/include/stdio.h:27, from perf-read-vdso.c:1: /usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. ld -r -o scripts/python/Perf-Trace-Util/libperf-in.o scripts/python/Perf-Trace-Util/Context.o Makefile.perf:353: recipe for target 'perf-read-vdso32' failed make[1]: *** [perf-read-vdso32] Error 1
The error is not a clear kernel issue, but more a toolchain one (no 32-bit environment on ppc64le). It is related to the use of 32-bit code in 64-bit kernel, see also bug #1205236. Probably time to clean the kernel buildsystem so it is not trying to build 32-bit vdso support on pure 64-bit kernel.
There is even an option for it - http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Makefile.perf#n64
i created 2 solutions to fix the above issue. I attach both so you can review. 1. solution diff -Nur linux-4.0/tools/perf/config/Makefile.than linux-4.0/tools/perf/config/Makefile --- linux-4.0/tools/perf/config/Makefile.than 2015-06-02 11:58:17.525763988 +0200 +++ linux-4.0/tools/perf/config/Makefile 2015-06-02 12:31:04.898865043 +0200 @@ -642,6 +642,9 @@ CFLAGS += -DHAVE_KVM_STAT_SUPPORT endif +ifeq ($(ARCH),ppc64le) + NO_PERF_READ_VDSO32 := 1 +endif ifeq (${IS_64_BIT}, 1) ifndef NO_PERF_READ_VDSO32 $(call feature_check,compile-32) 2. solution diff --git a/kernel.spec b/kernel.spec index de76387..ad55636 100644 --- a/kernel.spec +++ b/kernel.spec @@ -351,7 +351,7 @@ Group: System Environment/Kernel License: GPLv2 and Redistributable, no modification permitted URL: http://www.kernel.org/ Version: %{rpmversion} -Release: %{pkg_release} +Release: %{pkg_release}.than # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD ExclusiveArch: %{all_x86} x86_64 ppc64 ppc64p7 s390 s390x %{arm} aarch64 ppc64le @@ -1746,8 +1746,13 @@ BuildKernel %make_target %kernel_image %{pae} BuildKernel %make_target %kernel_image %endif +%ifarch ppc64le +# no 32-bit environment on ppc64le, so disable it +%define no32bit NO_PERF_READ_VDSO32=1 +%endif + %global perf_make \ - make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} + make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 %{?no32bit} WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} %if %{with_perf} # perf %{perf_make} DESTDIR=$RPM_BUILD_ROOT all
I went with solution #2 for now so we don't have to carry a patch. Once the patch works its way upstream we can drop it.