lkml.org 
[lkml]   [2017]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: container test for cross building s390 tools failing
Em Thu, Dec 14, 2017 at 02:26:56PM +0100, Thomas-Mich Richter escreveu:
> On 12/13/2017 05:31 PM, Arnaldo Carvalho de Melo wrote:
> > Hi, noticed this with my perf/core branch, will investigate later.

> > [root@jouet ubuntu]# cat /tmp/dm.log.JAK3XV/ubuntu\:16.04-x-s390
> > ubuntu:16.04-x-s390
> > Downloading http://192.168.124.1/perf/perf-4.15.0-rc3.tar.xz...
> > % Total % Received % Xferd Average Speed Time Time Time Current
> > Dload Upload Total Spent Left Speed
> > 100 1237k 100 1237k 0 0 236M 0 --:--:-- --:--:-- --:--:-- 402M
> > make: Entering directory '/git/linux/tools/perf'
> > BUILD: Doing 'make -j4' parallel build
> > HOSTCC /tmp/build/perf/fixdep.o
<SNIP>
> > CC /tmp/build/perf/builtin-bench.o
> > In file included from util/perf_regs.h:27:0,
> > from util/event.h:11,
> > from util/symbol.h:16,
> > from util/sort.h:12,
> > from util/annotate.c:14:
> > /git/linux/tools/perf/arch/s390/include/perf_regs.h:6:62: fatal error: ../../../../arch/s390/include/uapi/asm/perf_regs.h: No such file or directory
> > compilation terminated.
> > CC /tmp/build/perf/builtin-annotate.o
> > mv: cannot stat '/tmp/build/perf/util/.annotate.o.tmp': No such file or directory
> > /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/util/annotate.o' failed
> > make[4]: *** [/tmp/build/perf/util/annotate.o] Error 1
> > /git/linux/tools/build/Makefile.build:139: recipe for target 'util' failed
> > make[3]: *** [util] Error 2
> > Makefile.perf:619: recipe for target '/tmp/build/perf/libperf-in.o' failed
> > make[2]: *** [/tmp/build/perf/libperf-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> > CC /tmp/build/perf/builtin-config.o
> > In file included from util/perf_regs.h:27:0,
> > from util/event.h:11,
> > from util/symbol.h:16,
> > from builtin-annotate.c:16:
> > /git/linux/tools/perf/arch/s390/include/perf_regs.h:6:62: fatal error: ../../../../arch/s390/include/uapi/asm/perf_regs.h: No such file or directory
> > In file included from util/perf_regs.h:27:0,
> > from util/event.h:11,
> > from util/debug.h:9,
> > from builtin-config.c:15:
> > /git/linux/tools/perf/arch/s390/include/perf_regs.h:6:62: fatal error: ../../../../arch/s390/include/uapi/asm/perf_regs.h: No such file or directory
> > compilation terminated.
> > compilation terminated.
> > mv: cannot stat '/tmp/build/perf/.builtin-config.o.tmp': No such file or directory
> > /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/builtin-config.o' failed
> > make[3]: *** [/tmp/build/perf/builtin-config.o] Error 1
> > make[3]: *** Waiting for unfinished jobs....
> > mv: cannot stat '/tmp/build/perf/.builtin-annotate.o.tmp': No such file or directory
> > /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/builtin-annotate.o' failed
> > make[3]: *** [/tmp/build/perf/builtin-annotate.o] Error 1
> > CC /tmp/build/perf/plugin_mac80211.o
<SNIP>
> > Makefile.perf:495: recipe for target '/tmp/build/perf/perf-in.o' failed
> > make[2]: *** [/tmp/build/perf/perf-in.o] Error 2
> > CC /tmp/build/perf/plugin_cfg80211.o
<SNIP>
> > Makefile.perf:209: recipe for target 'sub-make' failed
> > make[1]: *** [sub-make] Error 2
> > Makefile:69: recipe for target 'all' failed
> > make: *** [all] Error 2
> > make: Leaving directory '/git/linux/tools/perf'
> > [root@jouet ubuntu]#

> Maybe I miss something.

> I just downloded the latest linux-4.15.0-rc3 and built the kernel and the perf tool on an s390x LPAR
> without any errors:

> [root@s35lp76 perf]# git tag|fgrep 4.15
> v4.15-rc1
> v4.15-rc2
> v4.15-rc3
> [root@s35lp76 perf]# pwd
> /root/linux2/tools/perf
> [root@s35lp76 perf]# make
> BUILD: Doing 'make -j1' parallel build
> Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
> Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
>
> Auto-detecting system features:
> ... dwarf: [ on ]
> ... dwarf_getlocations: [ on ]
> ... glibc: [ on ]
> ... gtk2: [ OFF ]
> ... libaudit: [ on ]
> ... libbfd: [ on ]
> ... libelf: [ on ]
> ... libnuma: [ on ]
> ... numa_num_possible_cpus: [ on ]
> ... libperl: [ on ]
> ... libpython: [ on ]
> ... libslang: [ on ]
> ... libcrypto: [ on ]
> ... libunwind: [ OFF ]
> ... libdw-dwarf-unwind: [ on ]
> ... zlib: [ on ]
> ... lzma: [ on ]
> ... get_cpuid: [ OFF ]
> ... bpf: [ on ]

> Makefile.config:566: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
> Makefile.config:817: No openjdk development package found, please install JDK package
> [root@s35lp76 perf]#

> The perf build went smoothly and when I type 'make'
> again, the build process does not complain about missing files.

Right, when you build tools/perf inside a checked out copy of the kernel
sources, you'll be able to access files outside tools/ and everything
will build just fine.

But tools/ living code shouldn't access anything outside tools/, so when
you do:

[acme@jouet perf]$ make help | grep perf
perf-tar-src-pkg - Build perf-4.15.0-rc3.tar source tarball
perf-targz-src-pkg - Build perf-4.15.0-rc3.tar.gz source tarball
perf-tarbz2-src-pkg - Build perf-4.15.0-rc3.tar.bz2 source tarball
perf-tarxz-src-pkg - Build perf-4.15.0-rc3.tar.xz source tarball
[acme@jouet perf]$

And grab the resulting tarball (just run ls -lart), extract it, say,
under /tmp/, or in some other machine, and try to build it, it'll fail.

I've fixed this already, please check:

https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=642d3d0964efb216c2823af78147c46913f26804

Doing it this way will also warn us when something changes in the files
used by tools/perf/ that may be of interest to tooling, just like with
the other tools/{arch,include/lib}/ files we copied from the kernel
sources.

- Arnaldo

\
 
 \ /
  Last update: 2017-12-14 15:06    [W:0.177 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site