Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
Hi all, On Wed, 3 Oct 2012 12:29:28 +0200, Jiri Olsa wrote: > On Tue, Oct 02, 2012 at 06:45:36PM -0300, Arnaldo Carvalho de Melo wrote: >> Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: >> > On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: >> > > Actually - I hadn't noticed these warnings before. >> >> > > After installing libdw-dev - the perf build completed successfully. >> > > Perhaps this should be fatal, rather than a warning? >> >> > attached patch fixies the issue for me. Adding Arnaldo to the loop. >> >> [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind >> O=/home/acme/git/build/perf install >> cc1: warnings being treated as errors >> arch/x86/util/dwarf-regs.c:72: error: no previous prototype for >> ‘get_arch_regstr’ >> make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 >> make: *** Waiting for unfinished jobs >> make: Leaving directory `/home/git/linux/tools/perf' >> [acme@sandy linux]$ >> >> - Arnaldo > > ugh.. forgot the way you build perf ;) > (also smells like 'automated make test' adept) > > Anyway, there's Makefile dependency on PERF_HAVE_DWARF_REGS which > is defined in arch/x86/Makefile. > > So, there's only one right place for '-include arch/$(ARCH)/Makefile'. > We should think of some other solution, since this seems fragile. > > I checked your make and simple make with attached patch > (only x86_64 arch, and with and without libdw installed). I posted similar patch few days ago and it slipped into acme/perf/core: https://lkml.org/lkml/2012/9/28/194 Can you reproduce it with above change? Anyway, my apologies, sorry for the inconvenience. Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
On Tue, Oct 02, 2012 at 06:45:36PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: > > On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: > > > Actually - I hadn't noticed these warnings before. > > > > After installing libdw-dev - the perf build completed successfully. > > > Perhaps this should be fatal, rather than a warning? > > > attached patch fixies the issue for me. Adding Arnaldo to the loop. > > [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind > O=/home/acme/git/build/perf install > cc1: warnings being treated as errors > arch/x86/util/dwarf-regs.c:72: error: no previous prototype for > ‘get_arch_regstr’ > make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 > make: *** Waiting for unfinished jobs > make: Leaving directory `/home/git/linux/tools/perf' > [acme@sandy linux]$ > > - Arnaldo ugh.. forgot the way you build perf ;) (also smells like 'automated make test' adept) Anyway, there's Makefile dependency on PERF_HAVE_DWARF_REGS which is defined in arch/x86/Makefile. So, there's only one right place for '-include arch/$(ARCH)/Makefile'. We should think of some other solution, since this seems fragile. I checked your make and simple make with attached patch (only x86_64 arch, and with and without libdw installed). jirka --- We need to include arch Makefile after we decide the NO_DWARF, otherwise we get might get build failure. The reason is the arch Makefile could include objects based on the NO_DWARF value, as it is for x86 case. Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 6958ba4..c287c1d 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -505,8 +505,6 @@ ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) endif # Libunwind support endif # NO_LIBUNWIND --include arch/$(ARCH)/Makefile - ifneq ($(OUTPUT),) BASIC_CFLAGS += -I$(OUTPUT) endif @@ -539,6 +537,8 @@ ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) NO_DWARF := 1 endif # Dwarf support +-include arch/$(ARCH)/Makefile + ifndef NO_DWARF ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); -- 1.7.11.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
On Tue, Oct 02, 2012 at 06:45:36PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: Actually - I hadn't noticed these warnings before. After installing libdw-dev - the perf build completed successfully. Perhaps this should be fatal, rather than a warning? attached patch fixies the issue for me. Adding Arnaldo to the loop. [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind O=/home/acme/git/build/perf install cc1: warnings being treated as errors arch/x86/util/dwarf-regs.c:72: error: no previous prototype for ‘get_arch_regstr’ make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 make: *** Waiting for unfinished jobs make: Leaving directory `/home/git/linux/tools/perf' [acme@sandy linux]$ - Arnaldo ugh.. forgot the way you build perf ;) (also smells like 'automated make test' adept) Anyway, there's Makefile dependency on PERF_HAVE_DWARF_REGS which is defined in arch/x86/Makefile. So, there's only one right place for '-include arch/$(ARCH)/Makefile'. We should think of some other solution, since this seems fragile. I checked your make and simple make with attached patch (only x86_64 arch, and with and without libdw installed). jirka --- We need to include arch Makefile after we decide the NO_DWARF, otherwise we get might get build failure. The reason is the arch Makefile could include objects based on the NO_DWARF value, as it is for x86 case. Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@elte.hu Cc: Paul Mackerras pau...@samba.org Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Arnaldo Carvalho de Melo a...@redhat.com Signed-off-by: Jiri Olsa jo...@redhat.com --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 6958ba4..c287c1d 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -505,8 +505,6 @@ ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) endif # Libunwind support endif # NO_LIBUNWIND --include arch/$(ARCH)/Makefile - ifneq ($(OUTPUT),) BASIC_CFLAGS += -I$(OUTPUT) endif @@ -539,6 +537,8 @@ ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) NO_DWARF := 1 endif # Dwarf support +-include arch/$(ARCH)/Makefile + ifndef NO_DWARF ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
Hi all, On Wed, 3 Oct 2012 12:29:28 +0200, Jiri Olsa wrote: On Tue, Oct 02, 2012 at 06:45:36PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: Actually - I hadn't noticed these warnings before. After installing libdw-dev - the perf build completed successfully. Perhaps this should be fatal, rather than a warning? attached patch fixies the issue for me. Adding Arnaldo to the loop. [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind O=/home/acme/git/build/perf install cc1: warnings being treated as errors arch/x86/util/dwarf-regs.c:72: error: no previous prototype for ‘get_arch_regstr’ make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 make: *** Waiting for unfinished jobs make: Leaving directory `/home/git/linux/tools/perf' [acme@sandy linux]$ - Arnaldo ugh.. forgot the way you build perf ;) (also smells like 'automated make test' adept) Anyway, there's Makefile dependency on PERF_HAVE_DWARF_REGS which is defined in arch/x86/Makefile. So, there's only one right place for '-include arch/$(ARCH)/Makefile'. We should think of some other solution, since this seems fragile. I checked your make and simple make with attached patch (only x86_64 arch, and with and without libdw installed). I posted similar patch few days ago and it slipped into acme/perf/core: https://lkml.org/lkml/2012/9/28/194 Can you reproduce it with above change? Anyway, my apologies, sorry for the inconvenience. Thanks, Namhyung -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: > On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: > > Actually - I hadn't noticed these warnings before. > > After installing libdw-dev - the perf build completed successfully. > > Perhaps this should be fatal, rather than a warning? > attached patch fixies the issue for me. Adding Arnaldo to the loop. [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind O=/home/acme/git/build/perf install cc1: warnings being treated as errors arch/x86/util/dwarf-regs.c:72: error: no previous prototype for ‘get_arch_regstr’ make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 make: *** Waiting for unfinished jobs make: Leaving directory `/home/git/linux/tools/perf' [acme@sandy linux]$ - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] perf tool: Fix build for NO_DWARF=1 case
On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: > Hi Ian, > > Once again - apologies for multiple copies of this email. Please reply > to this (plain text) version so it will get through LKML filters. > > On Tue, Oct 2, 2012 at 12:24 AM, Ian Munsie wrote: > > > > > > > CC arch/x86/util/dwarf-regs.o > > > > Is this correct? i.e. Are you building perf for x86? > > Yes, x86_64, specifically. > > > > > What commandline are you using to build? > > cd /data/home/bguthro/dev/orc-newdev.git/linux/build/tools/tools/perf > && make EXTRAVERSION=-orc > > > > > Any exported environment variables that may be relevant? > > none that I can think of. > > > > > What dev libraries does perf warn is missing (Is libdw-dev among them)? > > make[3]: Entering directory > `/data/home/bguthro/dev/orc-newdev.git/linux/build/tools/tools/perf' > Makefile:502: No libunwind found, disabling post unwind support. > Please install libunwind-dev[el] >= 0.99 > Makefile:537: No libdw.h found or old libdw.h found or elfutils is > older than 0.138, disables dwarf support. Please install new > elfutils-devel/libdw-dev > Makefile:567: No libaudit.h found, disables 'trace' tool, please > install audit-libs-devel or libaudit-dev > Makefile:580: newt not found, disables TUI support. Please install > newt-devel or libnewt-dev > Makefile:752: No bfd.h/libbfd found, install > binutils-dev[el]/zlib-static to gain symbol demangling > > Actually - I hadn't noticed these warnings before. > > After installing libdw-dev - the perf build completed successfully. > Perhaps this should be fatal, rather than a warning? > > Thanks for your help > > Ben hi, attached patch fixies the issue for me. Adding Arnaldo to the loop. jirka --- We need to include arch Makefile after we decide the NO_DWARF value, otherwise we get might get build failure. The reason is the arch Makefile could include objects based on the NO_DWARF value, as it is for x86 case. Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 6958ba4..0ca8f45 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -505,8 +505,6 @@ ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) endif # Libunwind support endif # NO_LIBUNWIND --include arch/$(ARCH)/Makefile - ifneq ($(OUTPUT),) BASIC_CFLAGS += -I$(OUTPUT) endif @@ -635,6 +633,8 @@ else endif endif +-include arch/$(ARCH)/Makefile + disable-python = $(eval $(disable-python_code)) define disable-python_code BASIC_CFLAGS += -DNO_LIBPYTHON -- 1.7.11.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] perf tool: Fix build for NO_DWARF=1 case
On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: Hi Ian, Once again - apologies for multiple copies of this email. Please reply to this (plain text) version so it will get through LKML filters. On Tue, Oct 2, 2012 at 12:24 AM, Ian Munsie imun...@au1.ibm.com wrote: CC arch/x86/util/dwarf-regs.o Is this correct? i.e. Are you building perf for x86? Yes, x86_64, specifically. What commandline are you using to build? cd /data/home/bguthro/dev/orc-newdev.git/linux/build/tools/tools/perf make EXTRAVERSION=-orc Any exported environment variables that may be relevant? none that I can think of. What dev libraries does perf warn is missing (Is libdw-dev among them)? make[3]: Entering directory `/data/home/bguthro/dev/orc-newdev.git/linux/build/tools/tools/perf' Makefile:502: No libunwind found, disabling post unwind support. Please install libunwind-dev[el] = 0.99 Makefile:537: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev Makefile:567: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev Makefile:580: newt not found, disables TUI support. Please install newt-devel or libnewt-dev Makefile:752: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling Actually - I hadn't noticed these warnings before. After installing libdw-dev - the perf build completed successfully. Perhaps this should be fatal, rather than a warning? Thanks for your help Ben hi, attached patch fixies the issue for me. Adding Arnaldo to the loop. jirka --- We need to include arch Makefile after we decide the NO_DWARF value, otherwise we get might get build failure. The reason is the arch Makefile could include objects based on the NO_DWARF value, as it is for x86 case. Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@elte.hu Cc: Paul Mackerras pau...@samba.org Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Arnaldo Carvalho de Melo a...@redhat.com Signed-off-by: Jiri Olsa jo...@redhat.com --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 6958ba4..0ca8f45 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -505,8 +505,6 @@ ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) endif # Libunwind support endif # NO_LIBUNWIND --include arch/$(ARCH)/Makefile - ifneq ($(OUTPUT),) BASIC_CFLAGS += -I$(OUTPUT) endif @@ -635,6 +633,8 @@ else endif endif +-include arch/$(ARCH)/Makefile + disable-python = $(eval $(disable-python_code)) define disable-python_code BASIC_CFLAGS += -DNO_LIBPYTHON -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf tool: Fix build for NO_DWARF=1 case
Em Tue, Oct 02, 2012 at 03:10:49PM +0200, Jiri Olsa escreveu: On Tue, Oct 02, 2012 at 07:39:23AM -0400, Ben Guthro wrote: Actually - I hadn't noticed these warnings before. After installing libdw-dev - the perf build completed successfully. Perhaps this should be fatal, rather than a warning? attached patch fixies the issue for me. Adding Arnaldo to the loop. [acme@sandy linux]$ make -j8 -C tools/perf/ LIBUNWIND_DIR=/opt/libunwind O=/home/acme/git/build/perf install cc1: warnings being treated as errors arch/x86/util/dwarf-regs.c:72: error: no previous prototype for ‘get_arch_regstr’ make: *** [/home/acme/git/build/perf/arch/x86/util/dwarf-regs.o] Error 1 make: *** Waiting for unfinished jobs make: Leaving directory `/home/git/linux/tools/perf' [acme@sandy linux]$ - Arnaldo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/