From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967337AbcHBOGY (ORCPT ); Tue, 2 Aug 2016 10:06:24 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34344 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967210AbcHBOEV (ORCPT ); Tue, 2 Aug 2016 10:04:21 -0400 Date: Tue, 2 Aug 2016 23:03:02 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML Subject: Re: [PATCH] perf tools: Fix build failture on perl script context Message-ID: <20160802140302.GA6968@danjae.aot.lge.com> References: <20160802024317.31725-1-namhyung@kernel.org> <20160802132922.GF26514@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160802132922.GF26514@kernel.org> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On Tue, Aug 02, 2016 at 10:29:22AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Aug 02, 2016 at 11:43:17AM +0900, Namhyung Kim escreveu: > > On my Archlinux machine, perf faild to build like below: > > > > CC scripts/perl/Perf-Trace-Util/Context.o > > In file included from /usr/lib/perl5/core/perl/CORE/perl.h:3905:0, > > from Context.xs:23: > > /usr/lib/perl5/core/perl/CORE/inline.h: In function : > > /usr/lib/perl5/core/perl/CORE/cop.h:612:13: warning: declaration of 'av' > > shadows a previous local [-Werror-shadow] > > AV *av =3D GvAV(PL_defgv); > > ^ > > /usr/lib/perl5/core/perl/CORE/inline.h:526:5: note: in expansion of > > macro 'CX_POP_SAVEARRAY' > > CX_POP_SAVEARRAY(cx); > > ^~~~~~~~~~~~~~~~ > > In file included from /usr/lib/perl5/core/perl/CORE/perl.h:5853:0, > > from Context.xs:23: > > /usr/lib/perl5/core/perl/CORE/inline.h:518:9: note: > > shadowed declaration is here > > AV *av; > > ^~ > > But you forgot to describe _what_ you did to "fix" the problem besides > breaking down a long line, i.e. adding -Wno-shadow, is that what we > want? To ignore such warnings? > > Some explanation in the changelog as to why that is the wise solution > would help a lot :-\ Oops, sorry. What I did to fix is adding '-Wno-shadow' as the error message said it's the cause of the failure. Since it's from the perl (not perf) code base, we don't have the control so I just wanted to ignore the warning when compiling perl scripting code. Is it ok for you? Thanks, Namhyung > > > > Signed-off-by: Namhyung Kim > > --- > > tools/perf/scripts/perl/Perf-Trace-Util/Build | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Build b/tools/perf/scripts/perl/Perf-Trace-Util/Build > > index 928e110179cb..34faecf774ae 100644 > > --- a/tools/perf/scripts/perl/Perf-Trace-Util/Build > > +++ b/tools/perf/scripts/perl/Perf-Trace-Util/Build > > @@ -1,3 +1,5 @@ > > libperf-y += Context.o > > > > -CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default > > +CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes > > +CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef > > +CFLAGS_Context.o += -Wno-switch-default -Wno-shadow > > -- > > 2.9.2