Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1530789 > unrolled thread
| Started by | Peter Foley <pefoley2@pefoley.com> |
|---|---|
| First post | 2016-11-26 23:30 +0100 |
| Last post | 2016-12-06 09:30 +0100 |
| Articles | 20 on this page of 25 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH] Fix objtool with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-26 23:30 +0100
Re: [PATCH] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-27 17:20 +0100
[PATCH v2] Fix objtool with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-28 03:50 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-28 12:40 +0100
Re: [PATCH v2] Fix objtool with clang Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-11-28 16:10 +0100
Re: [PATCH v2] Fix objtool with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-28 16:30 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-28 18:00 +0100
Re: [PATCH v2] Fix objtool with clang Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-11-28 20:50 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-28 21:10 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-29 10:40 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-29 11:00 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-29 15:30 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-29 15:40 +0100
Re: [PATCH v2] Fix objtool with clang Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-11-29 15:50 +0100
Re: [PATCH v2] Fix objtool with clang Jiri Olsa <jolsa@redhat.com> - 2016-11-29 16:30 +0100
[PATCHv3] tools build: Make fixdep parsing wait for last target Jiri Olsa <jolsa@redhat.com> - 2016-12-01 14:10 +0100
Re: [PATCHv3] tools build: Make fixdep parsing wait for last target Peter Foley <pefoley2@pefoley.com> - 2016-12-01 18:50 +0100
Re: [PATCHv3] tools build: Make fixdep parsing wait for last target Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-12-01 20:00 +0100
Re: [PATCHv3] tools build: Make fixdep parsing wait for last target Jiri Olsa <jolsa@redhat.com> - 2016-12-02 09:50 +0100
Re: [PATCHv3] tools build: Make fixdep parsing wait for last target Jiri Olsa <jolsa@redhat.com> - 2016-12-02 10:20 +0100
Re: [PATCHv3] tools build: Make fixdep parsing wait for last target Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-12-02 16:20 +0100
[tip:perf/core] tools build: Make fixdep parsing wait for last target tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:30 +0100
Re: [PATCH v2] Fix objtool with clang Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-11-29 15:40 +0100
Re: [PATCH v2] Fix objtool with clang Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-11-28 20:40 +0100
[tip:perf/core] tools build: Fix objtool build with clang tip-bot for Peter Foley <tipbot@zytor.com> - 2016-12-06 09:30 +0100
Page 1 of 2 [1] 2 Next page →
| From | Peter Foley <pefoley2@pefoley.com> |
|---|---|
| Date | 2016-11-26 23:30 +0100 |
| Subject | [PATCH] Fix objtool with clang |
| Message-ID | <sHTDQ-47v-23@gated-at.bofh.it> |
Clang doesn't support multiple arguments being passed to -Wp, so split them. Fixes this error: HOSTCC tools/objtool/fixdep.o cat: tools/objtool/.fixdep.o.d: No such file or directory Signed-off-by: Peter Foley <pefoley2@pefoley.com> --- tools/build/Build.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/Build.include b/tools/build/Build.include index 1dcb95e76f70..83c7be908009 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include @@ -89,10 +89,10 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ # - per target C flags # - per object C flags # - BUILD_STR macro to allow '-D"$(variable)"' constructs -c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) -cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) +c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) +cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) ### ## HOSTCC C flags -host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) +host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) -- 2.11.0.rc2
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-27 17:20 +0100 |
| Message-ID | <sIalk-6B5-17@gated-at.bofh.it> |
| In reply to | #1530789 |
On Sat, Nov 26, 2016 at 05:20:35PM -0500, Peter Foley wrote: > Clang doesn't support multiple arguments being passed to -Wp, so split > them. > > Fixes this error: > HOSTCC tools/objtool/fixdep.o > cat: tools/objtool/.fixdep.o.d: No such file or directory > > Signed-off-by: Peter Foley <pefoley2@pefoley.com> > --- > tools/build/Build.include | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/build/Build.include b/tools/build/Build.include > index 1dcb95e76f70..83c7be908009 100644 > --- a/tools/build/Build.include > +++ b/tools/build/Build.include > @@ -89,10 +89,10 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ > # - per target C flags > # - per object C flags > # - BUILD_STR macro to allow '-D"$(variable)"' constructs > -c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) > -cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) > +c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) > +cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) could you please rebase this on Arnaldo's latest perf/core branch? (git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git) thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Peter Foley <pefoley2@pefoley.com> |
|---|---|
| Date | 2016-11-28 03:50 +0100 |
| Subject | [PATCH v2] Fix objtool with clang |
| Message-ID | <sIkaZ-4qv-1@gated-at.bofh.it> |
| In reply to | #1530899 |
Clang doesn't support multiple arguments being passed to -Wp, so split them. Fixes this error: HOSTCC tools/objtool/fixdep.o cat: tools/objtool/.fixdep.o.d: No such file or directory v2: rebased onto perf/core branch. Signed-off-by: Peter Foley <pefoley2@pefoley.com> --- tools/build/Build.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/Build.include b/tools/build/Build.include index c4ae12a5d0a5..62dcf0c7aac2 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include @@ -89,12 +89,12 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ # - per target C flags # - per object C flags # - BUILD_STR macro to allow '-D"$(variable)"' constructs -c_flags_1 = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) +c_flags_1 = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) c_flags_2 = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(c_flags_1)) c_flags = $(filter-out $(CFLAGS_REMOVE_$(obj)), $(c_flags_2)) -cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) +cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj)) ### ## HOSTCC C flags -host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) +host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) -- 2.11.0.rc2
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-28 12:40 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIsrT-1ue-15@gated-at.bofh.it> |
| In reply to | #1530999 |
On Sun, Nov 27, 2016 at 09:43:46PM -0500, Peter Foley wrote: > Clang doesn't support multiple arguments being passed to -Wp, so split > them. > > Fixes this error: > HOSTCC tools/objtool/fixdep.o > cat: tools/objtool/.fixdep.o.d: No such file or directory > > v2: > rebased onto perf/core branch. > > Signed-off-by: Peter Foley <pefoley2@pefoley.com> Acked-by: Jiri Olsa <jolsa@kernel.org> thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2016-11-28 16:10 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIvJ7-3HN-5@gated-at.bofh.it> |
| In reply to | #1531231 |
Em Mon, Nov 28, 2016 at 12:39:28PM +0100, Jiri Olsa escreveu:
> On Sun, Nov 27, 2016 at 09:43:46PM -0500, Peter Foley wrote:
> > Clang doesn't support multiple arguments being passed to -Wp, so split
> > them.
> >
> > Fixes this error:
> > HOSTCC tools/objtool/fixdep.o
> > cat: tools/objtool/.fixdep.o.d: No such file or directory
> >
> > v2:
> > rebased onto perf/core branch.
> >
> > Signed-off-by: Peter Foley <pefoley2@pefoley.com>
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
After I applied this I started getting this:
CC /tmp/build/perf/tests/sw-clock.o
/tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
make[1]: *** Waiting for unfinished jobs....
CC /tmp/build/perf/tests/mmap-thread-lookup.o
If I remove the O= build dir and restart, I get it again:
[acme@jouet linux]$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
GEN /tmp/build/perf/common-cmds.h
HOSTCC /tmp/build/perf/fixdep.o
<SNIP>
CC /tmp/build/perf/util/pmu-bison.o
/tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
make[1]: *** Waiting for unfinished jobs....
CC /tmp/build/perf/util/parse-events.o
CC /tmp/build/perf/util/parse-events-flex.o
Trying to nuke my ccache dir:
Doesn't help:
[acme@jouet linux]$ rm -rf ~/.ccache/
[acme@jouet linux]$ m
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
/tmp/build/perf/jvmti/.jvmti_agent.o.cmd:3: *** empty variable name. Stop.
Makefile.perf:566: recipe for target '/tmp/build/perf/jvmti/jvmti-in.o' failed
make[1]: *** [/tmp/build/perf/jvmti/jvmti-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
/tmp/build/perf/pmu-events/.jevents.o.cmd:3: *** empty variable name. Stop.
Makefile.perf:469: recipe for target '/tmp/build/perf/pmu-events/jevents-in.o' failed
make[1]: *** [/tmp/build/perf/pmu-events/jevents-in.o] Error 2
Makefile:108: recipe for target 'install-bin' failed
make: *** [install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'
Performance counter stats for 'make -k O=/tmp/build/perf -C tools/perf install-bin':
5,406,254,581 cycles:u
8,259,935,345 instructions:u # 1.53 insn per cycle
2.150027964 seconds time elapsed
[acme@jouet linux]$
[toc] | [prev] | [next] | [standalone]
| From | Peter Foley <pefoley2@pefoley.com> |
|---|---|
| Date | 2016-11-28 16:30 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIw2t-3Ow-9@gated-at.bofh.it> |
| In reply to | #1531382 |
On Mon, Nov 28, 2016 at 7:00 AM, Arnaldo Carvalho de Melo <acme@redhat.com> wrote: > After I applied this I started getting this: > > CC /tmp/build/perf/tests/sw-clock.o > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > make[1]: *** Waiting for unfinished jobs.... > CC /tmp/build/perf/tests/mmap-thread-lookup.o Odd, I can't reproduce that... Mind sending your gcc version + the output of make V=1 + the contents of the .cmd file causing the error? Thanks, Peter
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-28 18:00 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIxrA-4y6-9@gated-at.bofh.it> |
| In reply to | #1531389 |
On Mon, Nov 28, 2016 at 07:25:53AM -0800, Peter Foley wrote: > On Mon, Nov 28, 2016 at 7:00 AM, Arnaldo Carvalho de Melo > <acme@redhat.com> wrote: > > After I applied this I started getting this: > > > > CC /tmp/build/perf/tests/sw-clock.o > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > > make[1]: *** Waiting for unfinished jobs.... > > CC /tmp/build/perf/tests/mmap-thread-lookup.o > > Odd, I can't reproduce that... > Mind sending your gcc version + the output of make V=1 + the contents > of the .cmd file causing the error? same here, can't reproduce.. might be some race issue we experienced before jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2016-11-28 20:50 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIA66-6pe-23@gated-at.bofh.it> |
| In reply to | #1531441 |
Em Mon, Nov 28, 2016 at 05:58:59PM +0100, Jiri Olsa escreveu: > On Mon, Nov 28, 2016 at 07:25:53AM -0800, Peter Foley wrote: > > On Mon, Nov 28, 2016 at 7:00 AM, Arnaldo Carvalho de Melo > > <acme@redhat.com> wrote: > > > After I applied this I started getting this: > > > > > > CC /tmp/build/perf/tests/sw-clock.o > > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > > > make[1]: *** Waiting for unfinished jobs.... > > > CC /tmp/build/perf/tests/mmap-thread-lookup.o > > > > Odd, I can't reproduce that... > > Mind sending your gcc version + the output of make V=1 + the contents > > of the .cmd file causing the error? > > same here, can't reproduce.. might be some race issue we experienced before Ok, fails in f25 as well, will try again later taking ccache out of the way, etc. [acme@jouet linux]$ ccache -V ccache version 3.3.3 Copyright (C) 2002-2007 Andrew Tridgell Copyright (C) 2009-2016 Joel Rosdahl This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. [acme@jouet linux]$ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) [acme@jouet linux]$ make -v GNU Make 4.1 Built for x86_64-redhat-linux-gnu Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. [acme@jouet linux]$ [acme@jouet linux]$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/home/acme/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] GEN /tmp/build/perf/common-cmds.h HOSTCC /tmp/build/perf/fixdep.o MKDIR /tmp/build/perf/pmu-events/ HOSTCC /tmp/build/perf/pmu-events/json.o HOSTLD /tmp/build/perf/fixdep-in.o LINK /tmp/build/perf/fixdep MKDIR /tmp/build/perf/pmu-events/ HOSTCC /tmp/build/perf/pmu-events/jsmn.o CC /tmp/build/perf/perf-read-vdso32 HOSTCC /tmp/build/perf/pmu-events/jevents.o MKDIR /tmp/build/perf/jvmti/ CC /tmp/build/perf/jvmti/libjvmti.o PERF_VERSION = 4.9.rc6.g47bcdb MKDIR /tmp/build/perf/ui/gtk/ <SNIP> CC /tmp/build/perf/builtin-buildid-list.o LD /tmp/build/perf/pmu-events/pmu-events-in.o CC /tmp/build/perf/arch/x86/util/intel-bts.o CC /tmp/build/perf/builtin-buildid-cache.o CC /tmp/build/perf/builtin-list.o LD /tmp/build/perf/arch/x86/util/libperf-in.o MKDIR /tmp/build/perf/arch/x86/tests/ CC /tmp/build/perf/arch/x86/tests/regs_load.o /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 make[1]: *** Waiting for unfinished jobs.... MKDIR /tmp/build/perf/arch/x86/tests/ CC /tmp/build/perf/arch/x86/tests/arch-tests.o <SNIP> CC /tmp/build/perf/util/pmu.o CC /tmp/build/perf/util/pmu-flex.o LD /tmp/build/perf/util/libperf-in.o LD /tmp/build/perf/libperf-in.o Makefile:108: recipe for target 'install-bin' failed make: *** [install-bin] Error 2 make: Leaving directory '/home/acme/git/linux/tools/perf' [acme@jouet linux]$
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-28 21:10 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIApt-6LC-63@gated-at.bofh.it> |
| In reply to | #1531564 |
On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote: SNIP > > same here, can't reproduce.. might be some race issue we experienced before > > Ok, fails in f25 as well, will try again later taking ccache out of the way, etc. > > [acme@jouet linux]$ ccache -V > ccache version 3.3.3 is there some extra config needed for ccache? > Copyright (C) 2002-2007 Andrew Tridgell > Copyright (C) 2009-2016 Joel Rosdahl > > This program is free software; you can redistribute it and/or modify it under > the terms of the GNU General Public License as published by the Free Software > Foundation; either version 3 of the License, or (at your option) any later > version. > [acme@jouet linux]$ gcc -v I'm on F25 with same gcc version > Using built-in specs. > COLLECT_GCC=/usr/bin/gcc > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/lto-wrapper > Target: x86_64-redhat-linux > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux > Thread model: posix > gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) > [acme@jouet linux]$ make -v > GNU Make 4.1 > Built for x86_64-redhat-linux-gnu > Copyright (C) 1988-2014 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > [acme@jouet linux]$ > > > [acme@jouet linux]$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin > make: Entering directory '/home/acme/git/linux/tools/perf' > BUILD: Doing 'make -j4' parallel build I'm building on 8 CPUs.. so not the race issue I guess SNIP > CC /tmp/build/perf/builtin-buildid-list.o > LD /tmp/build/perf/pmu-events/pmu-events-in.o > CC /tmp/build/perf/arch/x86/util/intel-bts.o > CC /tmp/build/perf/builtin-buildid-cache.o > CC /tmp/build/perf/builtin-list.o > LD /tmp/build/perf/arch/x86/util/libperf-in.o > MKDIR /tmp/build/perf/arch/x86/tests/ > CC /tmp/build/perf/arch/x86/tests/regs_load.o > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed could you please post /tmp/build/perf/.plugin_jbd2.o.cmd file? and 'make ... V=1' output? thanks, jirka > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > make[1]: *** Waiting for unfinished jobs.... > MKDIR /tmp/build/perf/arch/x86/tests/ > CC /tmp/build/perf/arch/x86/tests/arch-tests.o SNIP
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-29 10:40 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIN3j-6FC-15@gated-at.bofh.it> |
| In reply to | #1531564 |
On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote:
SNIP
> LD /tmp/build/perf/pmu-events/pmu-events-in.o
> CC /tmp/build/perf/arch/x86/util/intel-bts.o
> CC /tmp/build/perf/builtin-buildid-cache.o
> CC /tmp/build/perf/builtin-list.o
> LD /tmp/build/perf/arch/x86/util/libperf-in.o
> MKDIR /tmp/build/perf/arch/x86/tests/
> CC /tmp/build/perf/arch/x86/tests/regs_load.o
> /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
> Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
> make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
> Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
> make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
> make[1]: *** Waiting for unfinished jobs....
ok, reproduced..
the commit changes the output of the depfile for some reason,
and our fixdep does not handle it correctly and produce wrong
cmd file that failed to parse.. checking for fix
depfile changes ('+' is after the change):
-plugin_jbd2.o: plugin_jbd2.c /usr/include/stdc-predef.h \
+plugin_jbd2.o plugin_jbd2.o: plugin_jbd2.c /usr/include/stdc-predef.h \
jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-29 11:00 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sINmF-6Mq-15@gated-at.bofh.it> |
| In reply to | #1532047 |
On Tue, Nov 29, 2016 at 10:32:24AM +0100, Jiri Olsa wrote:
> On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
> > LD /tmp/build/perf/pmu-events/pmu-events-in.o
> > CC /tmp/build/perf/arch/x86/util/intel-bts.o
> > CC /tmp/build/perf/builtin-buildid-cache.o
> > CC /tmp/build/perf/builtin-list.o
> > LD /tmp/build/perf/arch/x86/util/libperf-in.o
> > MKDIR /tmp/build/perf/arch/x86/tests/
> > CC /tmp/build/perf/arch/x86/tests/regs_load.o
> > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
> > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
> > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
> > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
> > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
> > make[1]: *** Waiting for unfinished jobs....
>
> ok, reproduced..
>
> the commit changes the output of the depfile for some reason,
> and our fixdep does not handle it correctly and produce wrong
> cmd file that failed to parse.. checking for fix
>
> depfile changes ('+' is after the change):
>
> -plugin_jbd2.o: plugin_jbd2.c /usr/include/stdc-predef.h \
> +plugin_jbd2.o plugin_jbd2.o: plugin_jbd2.c /usr/include/stdc-predef.h \
>
> jirka
so Fedora 25 puts old target name in the generated dependencies
in case you split the -Wp options.. while Fedora 24 the old way
and both F24 and F25 shows me same gcc version 6.2.1
(note that just the first command output with 2 targets is wrong for us)
Fedora 25:
[root@intel-denlow-r-02 ~]# gcc -o ex.o -c -Wp,-MD,krava -Wp,-MT,krava -g ex.c
[root@intel-denlow-r-02 ~]# cat krava
ex.o krava: ex.c /usr/include/stdc-predef.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stddef.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
[root@intel-denlow-r-02 ~]# gcc -o ex.o -c -Wp,-MD,krava,-MT,krava -g ex.c
[root@intel-denlow-r-02 ~]# cat krava
krava: ex.c /usr/include/stdc-predef.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stddef.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
Fedora 24:
[jolsa@krava trash]$ gcc -o ex.o -c -Wp,-MD,krava -Wp,-MT,krava -g ex.c
[jolsa@krava trash]$ cat krava
krava: ex.c /usr/include/stdc-predef.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stddef.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
[jolsa@krava trash]$ gcc -o ex.o -c -Wp,-MD,krava-Wp,-MT,krava -g ex.c
[jolsa@krava trash]$ cat krava
krava: ex.c /usr/include/stdc-predef.h /usr/include/stdio.h \
/usr/include/features.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stddef.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
I'll make fixdep to deal with that and try to have someone from gcc to clarify on this
jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-29 15:30 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIRzY-1bf-31@gated-at.bofh.it> |
| In reply to | #1531564 |
On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote:
SNIP
> CC /tmp/build/perf/builtin-buildid-list.o
> LD /tmp/build/perf/pmu-events/pmu-events-in.o
> CC /tmp/build/perf/arch/x86/util/intel-bts.o
> CC /tmp/build/perf/builtin-buildid-cache.o
> CC /tmp/build/perf/builtin-list.o
> LD /tmp/build/perf/arch/x86/util/libperf-in.o
> MKDIR /tmp/build/perf/arch/x86/tests/
> CC /tmp/build/perf/arch/x86/tests/regs_load.o
> /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
> Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
> make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
> Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
> make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
> make[1]: *** Waiting for unfinished jobs....
> MKDIR /tmp/build/perf/arch/x86/tests/
> CC /tmp/build/perf/arch/x86/tests/arch-tests.o
> <SNIP>
> CC /tmp/build/perf/util/pmu.o
> CC /tmp/build/perf/util/pmu-flex.o
> LD /tmp/build/perf/util/libperf-in.o
> LD /tmp/build/perf/libperf-in.o
> Makefile:108: recipe for target 'install-bin' failed
> make: *** [install-bin] Error 2
> make: Leaving directory '/home/acme/git/linux/tools/perf'
> [acme@jouet linux]$
how about following fix.. it gets rid of the -Wp,MT option completely
so it should address Peter's issue.. it also makes fixdep more robust
and makes it wait for first target before spitting out dependencies
I have some difficulties now with getting Fedora 25.. I'll test
and send this out within this week
jirka
---
diff --git a/tools/build/Build.include b/tools/build/Build.include
index c4ae12a5d0a5..63c898f089f7 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -89,12 +89,12 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
# - per target C flags
# - per object C flags
# - BUILD_STR macro to allow '-D"$(variable)"' constructs
-c_flags_1 = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
+c_flags_1 = -Wp,-MD,$(depfile) $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
c_flags_2 = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(c_flags_1))
c_flags = $(filter-out $(CFLAGS_REMOVE_$(obj)), $(c_flags_2))
-cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj))
+cxx_flags = -Wp,-MD,$(depfile) $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj))
###
## HOSTCC C flags
-host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
+host_c_flags = -Wp,-MD,$(depfile) $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c
index 1521d36cef0d..734d1547cbae 100644
--- a/tools/build/fixdep.c
+++ b/tools/build/fixdep.c
@@ -49,7 +49,7 @@ static void parse_dep_file(void *map, size_t len)
char *end = m + len;
char *p;
char s[PATH_MAX];
- int is_target;
+ int is_target, has_target = 0;
int saw_any_target = 0;
int is_first_dep = 0;
@@ -67,7 +67,8 @@ static void parse_dep_file(void *map, size_t len)
if (is_target) {
/* The /next/ file is the first dependency */
is_first_dep = 1;
- } else {
+ has_target = 1;
+ } else if (has_target) {
/* Save this token/filename */
memcpy(s, m, p-m);
s[p - m] = 0;
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-29 15:40 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIRJD-1es-11@gated-at.bofh.it> |
| In reply to | #1532339 |
On Tue, Nov 29, 2016 at 12:33:15PM -0200, Arnaldo Carvalho de Melo wrote: > Em Tue, Nov 29, 2016 at 03:28:08PM +0100, Jiri Olsa escreveu: > > On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote: > > > > SNIP > > > > > CC /tmp/build/perf/builtin-buildid-list.o > > > LD /tmp/build/perf/pmu-events/pmu-events-in.o > > > CC /tmp/build/perf/arch/x86/util/intel-bts.o > > > CC /tmp/build/perf/builtin-buildid-cache.o > > > CC /tmp/build/perf/builtin-list.o > > > LD /tmp/build/perf/arch/x86/util/libperf-in.o > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > CC /tmp/build/perf/arch/x86/tests/regs_load.o > > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > > > make[1]: *** Waiting for unfinished jobs.... > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > CC /tmp/build/perf/arch/x86/tests/arch-tests.o > > > <SNIP> > > > CC /tmp/build/perf/util/pmu.o > > > CC /tmp/build/perf/util/pmu-flex.o > > > LD /tmp/build/perf/util/libperf-in.o > > > LD /tmp/build/perf/libperf-in.o > > > Makefile:108: recipe for target 'install-bin' failed > > > make: *** [install-bin] Error 2 > > > make: Leaving directory '/home/acme/git/linux/tools/perf' > > > [acme@jouet linux]$ > > > > how about following fix.. it gets rid of the -Wp,MT option completely > > so it should address Peter's issue.. it also makes fixdep more robust > > and makes it wait for first target before spitting out dependencies > > So this should replace Peter's patch? On top? I'm checking that now... it's replacement.. also I'll put it into 2 patches jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2016-11-29 15:50 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sIRTk-1hD-21@gated-at.bofh.it> |
| In reply to | #1532342 |
Em Tue, Nov 29, 2016 at 03:39:35PM +0100, Jiri Olsa escreveu: > On Tue, Nov 29, 2016 at 12:33:15PM -0200, Arnaldo Carvalho de Melo wrote: > > Em Tue, Nov 29, 2016 at 03:28:08PM +0100, Jiri Olsa escreveu: > > > On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote: > > > > > > SNIP > > > > > > > CC /tmp/build/perf/builtin-buildid-list.o > > > > LD /tmp/build/perf/pmu-events/pmu-events-in.o > > > > CC /tmp/build/perf/arch/x86/util/intel-bts.o > > > > CC /tmp/build/perf/builtin-buildid-cache.o > > > > CC /tmp/build/perf/builtin-list.o > > > > LD /tmp/build/perf/arch/x86/util/libperf-in.o > > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > > CC /tmp/build/perf/arch/x86/tests/regs_load.o > > > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > > > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > > > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > > > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > > > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > > > > make[1]: *** Waiting for unfinished jobs.... > > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > > CC /tmp/build/perf/arch/x86/tests/arch-tests.o > > > > <SNIP> > > > > CC /tmp/build/perf/util/pmu.o > > > > CC /tmp/build/perf/util/pmu-flex.o > > > > LD /tmp/build/perf/util/libperf-in.o > > > > LD /tmp/build/perf/libperf-in.o > > > > Makefile:108: recipe for target 'install-bin' failed > > > > make: *** [install-bin] Error 2 > > > > make: Leaving directory '/home/acme/git/linux/tools/perf' > > > > [acme@jouet linux]$ > > > > > > how about following fix.. it gets rid of the -Wp,MT option completely > > > so it should address Peter's issue.. it also makes fixdep more robust > > > and makes it wait for first target before spitting out dependencies > > > > So this should replace Peter's patch? On top? I'm checking that now... > > it's replacement.. also I'll put it into 2 patches Ok, just tested, Peter's patch works if I remove ccache, with your patch replacing it, everything works, with and without ccache, on f25, and it builds on f24 without ccache, in one of the containers I have. - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-11-29 16:30 +0100 |
| Subject | Re: [PATCH v2] Fix objtool with clang |
| Message-ID | <sISw2-1KH-33@gated-at.bofh.it> |
| In reply to | #1532357 |
On Tue, Nov 29, 2016 at 12:49:04PM -0200, Arnaldo Carvalho de Melo wrote: > Em Tue, Nov 29, 2016 at 03:39:35PM +0100, Jiri Olsa escreveu: > > On Tue, Nov 29, 2016 at 12:33:15PM -0200, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Nov 29, 2016 at 03:28:08PM +0100, Jiri Olsa escreveu: > > > > On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote: > > > > > > > > SNIP > > > > > > > > > CC /tmp/build/perf/builtin-buildid-list.o > > > > > LD /tmp/build/perf/pmu-events/pmu-events-in.o > > > > > CC /tmp/build/perf/arch/x86/util/intel-bts.o > > > > > CC /tmp/build/perf/builtin-buildid-cache.o > > > > > CC /tmp/build/perf/builtin-list.o > > > > > LD /tmp/build/perf/arch/x86/util/libperf-in.o > > > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > > > CC /tmp/build/perf/arch/x86/tests/regs_load.o > > > > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop. > > > > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed > > > > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2 > > > > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed > > > > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2 > > > > > make[1]: *** Waiting for unfinished jobs.... > > > > > MKDIR /tmp/build/perf/arch/x86/tests/ > > > > > CC /tmp/build/perf/arch/x86/tests/arch-tests.o > > > > > <SNIP> > > > > > CC /tmp/build/perf/util/pmu.o > > > > > CC /tmp/build/perf/util/pmu-flex.o > > > > > LD /tmp/build/perf/util/libperf-in.o > > > > > LD /tmp/build/perf/libperf-in.o > > > > > Makefile:108: recipe for target 'install-bin' failed > > > > > make: *** [install-bin] Error 2 > > > > > make: Leaving directory '/home/acme/git/linux/tools/perf' > > > > > [acme@jouet linux]$ > > > > > > > > how about following fix.. it gets rid of the -Wp,MT option completely > > > > so it should address Peter's issue.. it also makes fixdep more robust > > > > and makes it wait for first target before spitting out dependencies > > > > > > So this should replace Peter's patch? On top? I'm checking that now... > > > > it's replacement.. also I'll put it into 2 patches > > Ok, just tested, Peter's patch works if I remove ccache, with your patch > replacing it, everything works, with and without ccache, on f25, and it > builds on f24 without ccache, in one of the containers I have. ok, I'll run my tests once I have the server and send it out thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-12-01 14:10 +0100 |
| Subject | [PATCHv3] tools build: Make fixdep parsing wait for last target |
| Message-ID | <sJzhD-4h2-11@gated-at.bofh.it> |
| In reply to | #1532357 |
On Tue, Nov 29, 2016 at 12:49:04PM -0200, Arnaldo Carvalho de Melo wrote:
> Em Tue, Nov 29, 2016 at 03:39:35PM +0100, Jiri Olsa escreveu:
> > On Tue, Nov 29, 2016 at 12:33:15PM -0200, Arnaldo Carvalho de Melo wrote:
> > > Em Tue, Nov 29, 2016 at 03:28:08PM +0100, Jiri Olsa escreveu:
> > > > On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote:
> > > >
> > > > SNIP
> > > >
> > > > > CC /tmp/build/perf/builtin-buildid-list.o
> > > > > LD /tmp/build/perf/pmu-events/pmu-events-in.o
> > > > > CC /tmp/build/perf/arch/x86/util/intel-bts.o
> > > > > CC /tmp/build/perf/builtin-buildid-cache.o
> > > > > CC /tmp/build/perf/builtin-list.o
> > > > > LD /tmp/build/perf/arch/x86/util/libperf-in.o
> > > > > MKDIR /tmp/build/perf/arch/x86/tests/
> > > > > CC /tmp/build/perf/arch/x86/tests/regs_load.o
> > > > > /tmp/build/perf/.plugin_jbd2.o.cmd:3: *** empty variable name. Stop.
> > > > > Makefile:192: recipe for target '/tmp/build/perf/plugin_jbd2-in.o' failed
> > > > > make[2]: *** [/tmp/build/perf/plugin_jbd2-in.o] Error 2
> > > > > Makefile.perf:591: recipe for target '/tmp/build/perf/libtraceevent-dynamic-list' failed
> > > > > make[1]: *** [/tmp/build/perf/libtraceevent-dynamic-list] Error 2
> > > > > make[1]: *** Waiting for unfinished jobs....
> > > > > MKDIR /tmp/build/perf/arch/x86/tests/
> > > > > CC /tmp/build/perf/arch/x86/tests/arch-tests.o
> > > > > <SNIP>
> > > > > CC /tmp/build/perf/util/pmu.o
> > > > > CC /tmp/build/perf/util/pmu-flex.o
> > > > > LD /tmp/build/perf/util/libperf-in.o
> > > > > LD /tmp/build/perf/libperf-in.o
> > > > > Makefile:108: recipe for target 'install-bin' failed
> > > > > make: *** [install-bin] Error 2
> > > > > make: Leaving directory '/home/acme/git/linux/tools/perf'
> > > > > [acme@jouet linux]$
> > > >
> > > > how about following fix.. it gets rid of the -Wp,MT option completely
> > > > so it should address Peter's issue.. it also makes fixdep more robust
> > > > and makes it wait for first target before spitting out dependencies
> > >
> > > So this should replace Peter's patch? On top? I'm checking that now...
> >
> > it's replacement.. also I'll put it into 2 patches
>
> Ok, just tested, Peter's patch works if I remove ccache, with your patch
> replacing it, everything works, with and without ccache, on f25, and it
> builds on f24 without ccache, in one of the containers I have.
>
ok, so v3 actually ;-)
the v2 was tricky for the case when fixdep is not available,
so I decided to go with Peter's fix and fixing 'fixdep' tool
to properly parse out the target in case we hit the ccache
error.. we need to be able to do it anyway
please apply this patch before Peter's so we keep clean bisect
thanks,
jirka
---
The fixdep tool among other things replaces the target of
the object in the gcc generated dependency output file.
The parsing code assumes there's only single target in the
rule but this is not always the case as described in here:
https://gcc.gnu.org/ml/gcc-help/2016-11/msg00099.html
Making the fixdep code smart enough to skip all the possible
targets.
Link: http://lkml.kernel.org/n/tip-anlmi1osaky314m1gu3skdnz@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/build/fixdep.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c
index 1521d36cef0d..734d1547cbae 100644
--- a/tools/build/fixdep.c
+++ b/tools/build/fixdep.c
@@ -49,7 +49,7 @@ static void parse_dep_file(void *map, size_t len)
char *end = m + len;
char *p;
char s[PATH_MAX];
- int is_target;
+ int is_target, has_target = 0;
int saw_any_target = 0;
int is_first_dep = 0;
@@ -67,7 +67,8 @@ static void parse_dep_file(void *map, size_t len)
if (is_target) {
/* The /next/ file is the first dependency */
is_first_dep = 1;
- } else {
+ has_target = 1;
+ } else if (has_target) {
/* Save this token/filename */
memcpy(s, m, p-m);
s[p - m] = 0;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Peter Foley <pefoley2@pefoley.com> |
|---|---|
| Date | 2016-12-01 18:50 +0100 |
| Subject | Re: [PATCHv3] tools build: Make fixdep parsing wait for last target |
| Message-ID | <sJDEC-7vD-29@gated-at.bofh.it> |
| In reply to | #1534078 |
On Thu, Dec 1, 2016 at 5:00 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> ok, so v3 actually ;-)
>
> the v2 was tricky for the case when fixdep is not available,
> so I decided to go with Peter's fix and fixing 'fixdep' tool
> to properly parse out the target in case we hit the ccache
> error.. we need to be able to do it anyway
>
> please apply this patch before Peter's so we keep clean bisect
>
> thanks,
> jirka
>
>
> ---
> The fixdep tool among other things replaces the target of
> the object in the gcc generated dependency output file.
>
> The parsing code assumes there's only single target in the
> rule but this is not always the case as described in here:
> https://gcc.gnu.org/ml/gcc-help/2016-11/msg00099.html
>
> Making the fixdep code smart enough to skip all the possible
> targets.
>
> Link: http://lkml.kernel.org/n/tip-anlmi1osaky314m1gu3skdnz@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/build/fixdep.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c
> index 1521d36cef0d..734d1547cbae 100644
> --- a/tools/build/fixdep.c
> +++ b/tools/build/fixdep.c
> @@ -49,7 +49,7 @@ static void parse_dep_file(void *map, size_t len)
> char *end = m + len;
> char *p;
> char s[PATH_MAX];
> - int is_target;
> + int is_target, has_target = 0;
> int saw_any_target = 0;
> int is_first_dep = 0;
>
> @@ -67,7 +67,8 @@ static void parse_dep_file(void *map, size_t len)
> if (is_target) {
> /* The /next/ file is the first dependency */
> is_first_dep = 1;
> - } else {
> + has_target = 1;
> + } else if (has_target) {
> /* Save this token/filename */
> memcpy(s, m, p-m);
> s[p - m] = 0;
> --
> 2.7.4
>
Acked-by: Peter Foley <pefoley2@pefoley.com>
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2016-12-01 20:00 +0100 |
| Subject | Re: [PATCHv3] tools build: Make fixdep parsing wait for last target |
| Message-ID | <sJEKl-8kb-9@gated-at.bofh.it> |
| In reply to | #1534335 |
Em Thu, Dec 01, 2016 at 09:48:40AM -0800, Peter Foley escreveu:
> On Thu, Dec 1, 2016 at 5:00 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> > ok, so v3 actually ;-)
> >
> > the v2 was tricky for the case when fixdep is not available,
> > so I decided to go with Peter's fix and fixing 'fixdep' tool
> > to properly parse out the target in case we hit the ccache
> > error.. we need to be able to do it anyway
> >
> > please apply this patch before Peter's so we keep clean bisect
> >
> > thanks,
> > jirka
Doesn't work with ccache installed, but then after reinstalling ccache to check
its version, I can't reproduce it anymore, go figure :-\
Can you guys please take a look at tmp.perf/fixdep in my tree and check that
the last two patches are the ones that should go upstream and that you are able
to build it _with_ ccache installed?
Thanks,
- Arnaldo
Checking ccache version _after_ reinstalling it.
[acme@jouet linux]$ rpm -q ccache
ccache-3.3.3-1.fc25.x86_64
Before removing ccache:
[acme@jouet linux]$ git log --oneline -2
53c0b5e56b0e Fix objtool with clang
b73bc98b88db tools build: Make fixdep parsing wait for last target
[acme@jouet linux]$
[acme@jouet linux]$ m
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
CC /tmp/build/perf/jvmti/libjvmti.o
CC /tmp/build/perf/jvmti/jvmti_agent.o
HOSTCC /tmp/build/perf/pmu-events/json.o
HOSTCC /tmp/build/perf/fixdep.o
HOSTCC /tmp/build/perf/pmu-events/jsmn.o
HOSTLD /tmp/build/perf/fixdep-in.o
LINK /tmp/build/perf/fixdep
/bin/sh: /tmp/build/perf//fixdep: Permission denied
/home/acme/git/linux/tools/build/Makefile.build:91: recipe for target '/tmp/build/perf/pmu-events/jsmn.o' failed
make[2]: *** [/tmp/build/perf/pmu-events/jsmn.o] Error 1
Makefile.perf:469: recipe for target '/tmp/build/perf/pmu-events/jevents-in.o' failed
make[1]: *** [/tmp/build/perf/pmu-events/jevents-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
LD /tmp/build/perf/jvmti/jvmti-in.o
Makefile:108: recipe for target 'install-bin' failed
make: *** [install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'
Performance counter stats for 'make -k O=/tmp/build/perf -C tools/perf install-bin':
7,842,062,842 cycles:u
10,358,806,498 instructions:u # 1.32 insn per cycle
2.698261783 seconds time elapsed
[acme@jouet linux]$
Even if I try removing the build directory it fails:
[acme@jouet linux]$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
GEN /tmp/build/perf/common-cmds.h
HOSTCC /tmp/build/perf/fixdep.o
HOSTLD /tmp/build/perf/fixdep-in.o
LINK /tmp/build/perf/fixdep
MKDIR /tmp/build/perf/pmu-events/
HOSTCC /tmp/build/perf/pmu-events/json.o
/bin/sh: /tmp/build/perf//fixdep: Permission denied
/home/acme/git/linux/tools/build/Makefile.build:91: recipe for target '/tmp/build/perf/pmu-events/json.o' failed
make[2]: *** [/tmp/build/perf/pmu-events/json.o] Error 1
Makefile.perf:469: recipe for target '/tmp/build/perf/pmu-events/jevents-in.o' failed
make[1]: *** [/tmp/build/perf/pmu-events/jevents-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
PERF_VERSION = 4.9.rc6.g628b2a
make[1]: *** wait: No child processes. Stop.
Makefile:108: recipe for target 'install-bin' failed
make: *** [install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'
[acme@jouet linux]$
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-12-02 09:50 +0100 |
| Subject | Re: [PATCHv3] tools build: Make fixdep parsing wait for last target |
| Message-ID | <sJRHA-1oa-23@gated-at.bofh.it> |
| In reply to | #1534385 |
On Thu, Dec 01, 2016 at 04:53:23PM -0200, Arnaldo Carvalho de Melo wrote: SNIP > [acme@jouet linux]$ m > make: Entering directory '/home/acme/git/linux/tools/perf' > BUILD: Doing 'make -j4' parallel build > CC /tmp/build/perf/jvmti/libjvmti.o > CC /tmp/build/perf/jvmti/jvmti_agent.o > HOSTCC /tmp/build/perf/pmu-events/json.o > HOSTCC /tmp/build/perf/fixdep.o > HOSTCC /tmp/build/perf/pmu-events/jsmn.o > HOSTLD /tmp/build/perf/fixdep-in.o > LINK /tmp/build/perf/fixdep > /bin/sh: /tmp/build/perf//fixdep: Permission denied > /home/acme/git/linux/tools/build/Makefile.build:91: recipe for target '/tmp/build/perf/pmu-events/jsmn.o' failed I think this is unrelated.. I think we're missing jevents fixdep dependency I'll test patch below and send it separately jirka --- diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 3cb1df43ad3e..5d968af132e2 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -465,7 +465,7 @@ $(PERF_IN): prepare FORCE || echo "Warning: tools/include/uapi/linux/mman.h differs from kernel" >&2 )) || true $(Q)$(MAKE) $(build)=perf -$(JEVENTS_IN): FORCE +$(JEVENTS_IN): fixdep FORCE $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=jevents $(JEVENTS): $(JEVENTS_IN)
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-12-02 10:20 +0100 |
| Subject | Re: [PATCHv3] tools build: Make fixdep parsing wait for last target |
| Message-ID | <sJSaB-1Wx-15@gated-at.bofh.it> |
| In reply to | #1534385 |
On Thu, Dec 01, 2016 at 04:53:23PM -0200, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 01, 2016 at 09:48:40AM -0800, Peter Foley escreveu: > > On Thu, Dec 1, 2016 at 5:00 AM, Jiri Olsa <jolsa@redhat.com> wrote: > > > ok, so v3 actually ;-) > > > > > > the v2 was tricky for the case when fixdep is not available, > > > so I decided to go with Peter's fix and fixing 'fixdep' tool > > > to properly parse out the target in case we hit the ccache > > > error.. we need to be able to do it anyway > > > > > > please apply this patch before Peter's so we keep clean bisect > > > > > > thanks, > > > jirka > > Doesn't work with ccache installed, but then after reinstalling ccache to check > its version, I can't reproduce it anymore, go figure :-\ > > Can you guys please take a look at tmp.perf/fixdep in my tree and check that > the last two patches are the ones that should go upstream and that you are able > to build it _with_ ccache installed? yep, works for me thanks, jirka
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web