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.

This patch of tools/perf/Makefile has been ack'ed
upstream (lkml.kernel.org/r/20180705134955.GB3686@krava). Since the sed
script matches exactly the lines

clean:
        $(make)

it should be harmless to have this even with a fixed kernel, and it can
be removed if and when all relevant -stable kernels have it.

Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk>
---
 meta/recipes-kernel/perf/perf.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 51f5597eb9..1cf2666ee5 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -145,6 +145,11 @@ python copy_perf_source_from_kernel() {
             bb.utils.copyfile(src, dest)
 }
 
+do_configure[prefuncs] += "disable_clean_parallelism"
+disable_clean_parallelism () {
+       sed -i '/^clean:$/{n;s/^\t\$(make)$/\t\$(make) -j1/}' 
${S}/tools/perf/Makefile
+}
+
 do_configure_prepend () {
     # If building a multlib based perf, the incorrect library path will be
     # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 
bit
-- 
2.16.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to