]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: disable parallelism for 'make clean'
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Fri, 6 Jul 2018 07:48:36 +0000 (09:48 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Jul 2018 15:32:38 +0000 (16:32 +0100)
Whenever perf got rebuilt, I was consistently getting errors such as

| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
| find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory
|
[...]
| find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory

breaking the whole build. The root cause seems to be that the implicit
'make clean' done during do_configure ends up running in parallel, and
thus multiple find commands attempt to stat and/or delete the same
file.

A patch disabling parallelism for the clean target has been ack'ed
upstream (lkml.kernel.org/r/20180705134955.GB3686@krava), but it should
be harmless to pass JOBS=1 even with a fixed kernel. This can be removed
if and when all relevant -stable kernels have that patch.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-kernel/perf/perf.bb

index 51f5597eb921e01763843d83286b72816d2bdad2..90bbed25c7f94c32c5742cfe2cb09d40341e755c 100644 (file)
@@ -97,6 +97,13 @@ EXTRA_OEMAKE += "\
     'infodir=${@os.path.relpath(infodir, prefix)}' \
 "
 
+# During do_configure, we might run a 'make clean'. That often breaks
+# when done in parallel, so disable parallelism for do_configure. Note
+# that it has to be done this way rather than by passing -j1, since
+# perf's build system by default ignores any -j argument, but does
+# honour a JOBS variable.
+EXTRA_OEMAKE_append_task-configure = " JOBS=1"
+
 PERF_SRC ?= "Makefile \
              include \
              tools/arch \