Re: [PATCH 5.6 00/23] 5.6.1-rc1 review

From: Daniel DÃaz
Date: Tue Mar 31 2020 - 19:19:14 EST


Hello!

On Tue, 31 Mar 2020 at 13:29, Arnaldo Carvalho de Melo
<arnaldo.melo@xxxxxxxxx> wrote:
>
> Em Tue, Mar 31, 2020 at 11:20:37AM -0700, Linus Torvalds escreveu:
> > On Tue, Mar 31, 2020 at 11:08 AM Naresh Kamboju
> > <naresh.kamboju@xxxxxxxxxx> wrote:
> > >
> > > Perf build broken on Linux next and mainline and now on stable-rc-5.6 branch.
> >
> > Strange. What is it that triggers the problem for you? It works fine
> > here.. The error looks like some kind of command line quoting error,
> > but I don't see the direct cause.
> >
> > Have you bisected the failure? Build failures should be particularly
> > easy and quick to bisect.
>
> Naresh, can you try with the patch below? There was some back and forth
> about a second patch in a series and this fell thru the cracks.

I tried that patch, did not help.

Bisection led to the expected merge, "perf-urgent-for-linus", so I
went one by one and found this commit: a7ffd416d804 ("perf python: Fix
clang detection when using CC=clang-version"). Specifically, the line
that fails is:

cc_is_clang = b"clang version" in Popen([cc, "-v"],
stderr=PIPE).stderr.readline()

with:

Traceback (most recent call last):
File "util/setup.py", line 6, in <module>
cc_is_clang = b"clang version" in Popen([cc, "-v"],
stderr=PIPE).stderr.readline()
File "/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot-native/usr/lib/python2.7/subprocess.py",
line 394, in __init__
errread, errwrite)
File "/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot-native/usr/lib/python2.7/subprocess.py",
line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

There, the value for CC is "aarch64-linaro-linux-gcc
--sysroot=/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot".

> And also, BTW, can you please send me instructions on how to get hold of
> the toolchain you use to crossbuild perf, so that I can add it to my set
> of test build containers?

It's an OE build, so it's bound to take quite a bit of space. I'll try
to get something dockerized so that it's easier to replicate.

Thanks and greetings!

Daniel DÃaz
daniel.diaz@xxxxxxxxxx



> - Arnaldo
>
> ---
>
> From: He Zhe <zhe.he@xxxxxxxxxxxxx>
>
> The $(CC) passed to arch_errno_names.sh may include a series of parameters
> along with gcc itself. To avoid overwriting the following parameters of
> arch_errno_names.sh and break the build like below, we just pick up the
> first word of the $(CC).
>
> find: unknown predicate `-m64/arch'
> x86_64-wrs-linux-gcc: warning: '-x c' after last input file has no effect
> x86_64-wrs-linux-gcc: error: unrecognized command line option '-m64/include/uapi/asm-generic/errno.h'
> x86_64-wrs-linux-gcc: fatal error: no input files
>
> Signed-off-by: He Zhe <zhe.he@xxxxxxxxxxxxx>
> ---
> tools/perf/Makefile.perf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 3eda9d4..7114c11 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -573,7 +573,7 @@ arch_errno_hdr_dir := $(srctree)/tools
> arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
>
> $(arch_errno_name_array): $(arch_errno_tbl)
> - $(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
> + $(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
>
> sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
> sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
> --
> 2.7.4
>