Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[patch] perf: Fix build failure on OpenSuse userspace

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


mingo at kernel

May 4, 2012, 12:09 AM

Post #1 of 12 (148 views)
Permalink
[patch] perf: Fix build failure on OpenSuse userspace

* Greg KH <gregkh [at] linuxfoundation> wrote:

> On Thu, May 03, 2012 at 11:01:54PM -0400, Arnaud Lacombe wrote:
> > Hi,
> >
> > On Thu, May 3, 2012 at 10:47 PM, Greg KH <gregkh [at] linuxfoundation> wrote:
> > > On Thu, May 03, 2012 at 10:35:02PM -0400, Arnaud Lacombe wrote:
> > >> Hi,
> > >>
> > >> On Thu, May 3, 2012 at 10:29 PM, Arnaud Lacombe <lacombar [at] gmail> wrote:
> > >> > [...]
> > >> > [0]: http://pkgs.fedoraproject.org/gitweb/?p=flex.git;a=blob;f=flex-2.5.35-hardening.patch;h=7d608ea2371fa3295bdb8eb97c15eeb03029c02b;hb=HEAD
> > >> >
> > >> as a side note, this patch sounds more being about "silencing" than
> > >> "hardening"...
> > >
> > > That's nice, but I can build the perf version in 3.3 just fine, so
> > > something broke here (hint, build regression.) Do I have to bisect it
> > > down to find the problem?
> > >
> > there is most likely nothing to bisect, `perf' seems to have never
> > required any parser before 3.4. The way the rest of the tools
> > (especially `kconfig', `genksyms' and `dtc') manage parsers is via
> > pre-generated .[ch]_shipped version of the lexer/tokenizer. It's been
> > working well for a long time as such. `perf' will certainly have to
> > follow the same path.
>
> Well, it can allow bison to run, but just don't break the build if the
> generated code it creates happens to contain warnings.
>
> I'm using bison 2.5 and flex 2.5.35, and my phone number is...
>
> Like this really matters? This needs to work for everyone, if not, you
> better put the specific version numbers you need to require in the
> Documentation/Changes file.
>
> So, how do I fix this?

Does the (untested) patch below help?

If not then please paste me the build failure output (it will
most likely change due to the patch), and until we fix this
build regression on OpenSuse userspace you can work it around
via:

make WERROR=0

Thanks,

Ingo

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7055a00..3174e9b 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
# over the general rule for .o

$(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<

$(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<

$(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


lacombar at gmail

May 4, 2012, 7:44 AM

Post #2 of 12 (138 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

Hi,

On Fri, May 4, 2012 at 3:09 AM, Ingo Molnar <mingo [at] kernel> wrote:
>
> * Greg KH <gregkh [at] linuxfoundation> wrote:
>
>> On Thu, May 03, 2012 at 11:01:54PM -0400, Arnaud Lacombe wrote:
>> > Hi,
>> >
>> > On Thu, May 3, 2012 at 10:47 PM, Greg KH <gregkh [at] linuxfoundation> wrote:
>> > > On Thu, May 03, 2012 at 10:35:02PM -0400, Arnaud Lacombe wrote:
>> > >> Hi,
>> > >>
>> > >> On Thu, May 3, 2012 at 10:29 PM, Arnaud Lacombe <lacombar [at] gmail> wrote:
>> > >> > [...]
>> > >> > [0]: http://pkgs.fedoraproject.org/gitweb/?p=flex.git;a=blob;f=flex-2.5.35-hardening.patch;h=7d608ea2371fa3295bdb8eb97c15eeb03029c02b;hb=HEAD
>> > >> >
>> > >> as a side note, this patch sounds more being about "silencing" than
>> > >> "hardening"...
>> > >
>> > > That's nice, but I can build the perf version in 3.3 just fine, so
>> > > something broke here (hint, build regression.) Do I have to bisect it
>> > > down to find the problem?
>> > >
>> > there is most likely nothing to bisect, `perf' seems to have never
>> > required any parser before 3.4. The way the rest of the tools
>> > (especially `kconfig', `genksyms' and `dtc') manage parsers is via
>> > pre-generated .[ch]_shipped version of the lexer/tokenizer. It's been
>> > working well for a long time as such. `perf' will certainly have to
>> > follow the same path.
>>
>> Well, it can allow bison to run, but just don't break the build if the
>> generated code it creates happens to contain warnings.
>>
>> I'm using bison 2.5 and flex 2.5.35, and my phone number is...
>>
>> Like this really matters? This needs to work for everyone, if not, you
>> better put the specific version numbers you need to require in the
>> Documentation/Changes file.
>>
>> So, how do I fix this?
>
> Does the (untested) patch below help?
>
> If not then please paste me the build failure output (it will
> most likely change due to the patch), and until we fix this
> build regression on OpenSuse userspace you can work it around
> via:
>
> make WERROR=0
>
> Thanks,
>
> Ingo
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 7055a00..3174e9b 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> # over the general rule for .o
>
> $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<
>
> $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<
>
> $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
>
You can find the build failure log in
<20120503215748.GA18995 [at] kroah>, pasted here for reference:

CC util/parse-events-flex.o
<stdout>: In function ‘yy_get_next_buffer’:
<stdout>:1510:3: error: comparison between signed and unsigned integer
expressions [-Werror=sign-compare]
util/parse-events.l: In function ‘parse_events_lex’:
util/parse-events.l:122:1: error: ignoring return value of
‘fwrite’, declared with attribute warn_unused_result
[-Werror=unused-result]
cc1: all warnings being treated as errors

So I doubt -Wno-unused-parameter will do any good here.

How about my solution, pre-generating the lexer/tokenizer ? It has
been used without trouble in other place of the tree for years. I
don't really see the point of micro-managing flex/bison issue here.

- Arnaud
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


gregkh at linuxfoundation

May 4, 2012, 7:52 AM

Post #3 of 12 (140 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Fri, May 04, 2012 at 09:09:28AM +0200, Ingo Molnar wrote:
> Does the (untested) patch below help?

No :(

> If not then please paste me the build failure output (it will
> most likely change due to the patch), and until we fix this
> build regression on OpenSuse userspace you can work it around
> via:

Here's the error, it looks identical to what I previously had:

CC perf.o
CC util/parse-events-flex.o
<stdout>: In function ‘yy_get_next_buffer’:
<stdout>:1510:3: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
util/parse-events.l: In function ‘parse_events_lex’:
util/parse-events.l:122:1: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors

> make WERROR=0

Thanks, that works for me for now, but obviously, not a real solution :)

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


namhyung at gmail

May 4, 2012, 7:55 AM

Post #4 of 12 (142 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

Hi,

On Fri, 4 May 2012 10:44:28 -0400, Arnaud Lacombe wrote:
> How about my solution, pre-generating the lexer/tokenizer ? It has
> been used without trouble in other place of the tree for years. I
> don't really see the point of micro-managing flex/bison issue here.
>

There was a discussion:

https://lkml.org/lkml/2012/3/27/263


Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jolsa at redhat

May 4, 2012, 8:02 AM

Post #5 of 12 (142 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Fri, May 04, 2012 at 10:44:28AM -0400, Arnaud Lacombe wrote:
> Hi,
>
> On Fri, May 4, 2012 at 3:09 AM, Ingo Molnar <mingo [at] kernel> wrote:
> >
> > * Greg KH <gregkh [at] linuxfoundation> wrote:
> >

SNIP

> > diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> > index 7055a00..3174e9b 100644
> > --- a/tools/perf/Makefile
> > +++ b/tools/perf/Makefile
> > @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> >  # over the general rule for .o
> >
> >  $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> > -       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> > +       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<
> >
> >  $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
> > -       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> > +       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<
> >
> >  $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
> >        $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
> >
> You can find the build failure log in
> <20120503215748.GA18995 [at] kroah>, pasted here for reference:
>
> CC util/parse-events-flex.o
> <stdout>: In function ‘yy_get_next_buffer’:
> <stdout>:1510:3: error: comparison between signed and unsigned integer
> expressions [-Werror=sign-compare]
> util/parse-events.l: In function ‘parse_events_lex’:
> util/parse-events.l:122:1: error: ignoring return value of
> ‘fwrite’, declared with attribute warn_unused_result
> [-Werror=unused-result]
> cc1: all warnings being treated as errors
>
> So I doubt -Wno-unused-parameter will do any good here.
I think we need also -Wno-sign-compare, please check the attached patch

jirka


---
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7055a00..8f7b6cf 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
# over the general rule for .o

$(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter -Wno-sign-compare $<

$(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter -Wno-sign-compare $<

$(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


acme at ghostprotocols

May 4, 2012, 8:03 AM

Post #6 of 12 (139 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

Em Fri, May 04, 2012 at 10:44:28AM -0400, Arnaud Lacombe escreveu:
> CC util/parse-events-flex.o
> <stdout>: In function ‘yy_get_next_buffer’:
> <stdout>:1510:3: error: comparison between signed and unsigned integer
> expressions [-Werror=sign-compare]
> util/parse-events.l: In function ‘parse_events_lex’:
> util/parse-events.l:122:1: error: ignoring return value of
> ‘fwrite’, declared with attribute warn_unused_result
> [-Werror=unused-result]
> cc1: all warnings being treated as errors
>
> So I doubt -Wno-unused-parameter will do any good here.
>
> How about my solution, pre-generating the lexer/tokenizer ? It has
> been used without trouble in other place of the tree for years. I
> don't really see the point of micro-managing flex/bison issue here.

This was what we did in the first place:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=89812fc81f8d62d70433a8ff63d26819f372e8ec

Then we asked Linus about it and he said:

https://lkml.org/lkml/2012/3/28/417

So we:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=65f3e56e0c81d1f581c4bdef7646ae5a8d51f494

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


gregkh at linuxfoundation

May 4, 2012, 8:09 AM

Post #7 of 12 (140 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Fri, May 04, 2012 at 11:55:44PM +0900, Namhyung Kim wrote:
> Hi,
>
> On Fri, 4 May 2012 10:44:28 -0400, Arnaud Lacombe wrote:
> > How about my solution, pre-generating the lexer/tokenizer ? It has
> > been used without trouble in other place of the tree for years. I
> > don't really see the point of micro-managing flex/bison issue here.
> >
>
> There was a discussion:
>
> https://lkml.org/lkml/2012/3/27/263

Yes, and I agree with Ingo on this, you can require flex and bison to
build this code, I have no problem with that.

It's the "you must build with this specific version that is not possible
for your distro otherwise the build will break" side affect of this that
I do have a problem with :)

Why can't we turn off "build error on warning" for just these generated
files?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


lucas.de.marchi at gmail

May 4, 2012, 8:10 AM

Post #8 of 12 (142 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Fri, May 4, 2012 at 4:09 AM, Ingo Molnar <mingo [at] kernel> wrote:
>
> * Greg KH <gregkh [at] linuxfoundation> wrote:
>
>> On Thu, May 03, 2012 at 11:01:54PM -0400, Arnaud Lacombe wrote:
>> > Hi,
>> >
>> > On Thu, May 3, 2012 at 10:47 PM, Greg KH <gregkh [at] linuxfoundation> wrote:
>> > > On Thu, May 03, 2012 at 10:35:02PM -0400, Arnaud Lacombe wrote:
>> > >> Hi,
>> > >>
>> > >> On Thu, May 3, 2012 at 10:29 PM, Arnaud Lacombe <lacombar [at] gmail> wrote:
>> > >> > [...]
>> > >> > [0]: http://pkgs.fedoraproject.org/gitweb/?p=flex.git;a=blob;f=flex-2.5.35-hardening.patch;h=7d608ea2371fa3295bdb8eb97c15eeb03029c02b;hb=HEAD
>> > >> >
>> > >> as a side note, this patch sounds more being about "silencing" than
>> > >> "hardening"...
>> > >
>> > > That's nice, but I can build the perf version in 3.3 just fine, so
>> > > something broke here (hint, build regression.)  Do I have to bisect it
>> > > down to find the problem?
>> > >
>> > there is most likely nothing to bisect, `perf' seems to have never
>> > required any parser before 3.4. The way the rest of the tools
>> > (especially `kconfig', `genksyms' and `dtc') manage parsers is via
>> > pre-generated .[ch]_shipped version of the lexer/tokenizer. It's been
>> > working well for a long time as such. `perf' will certainly have to
>> > follow the same path.
>>
>> Well, it can allow bison to run, but just don't break the build if the
>> generated code it creates happens to contain warnings.
>>
>> I'm using bison 2.5 and flex 2.5.35, and my phone number is...
>>
>> Like this really matters?  This needs to work for everyone, if not, you
>> better put the specific version numbers you need to require in the
>> Documentation/Changes file.
>>
>> So, how do I fix this?
>
> Does the (untested) patch below help?
>
> If not then please paste me the build failure output (it will
> most likely change due to the patch), and until we fix this
> build regression on OpenSuse userspace you can work it around
> via:
>
>  make WERROR=0
>
> Thanks,
>
>        Ingo
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 7055a00..3174e9b 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
>  # over the general rule for .o
>
>  $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> -       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> +       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<

Nah. What you need is -Wno-sign-compare.

But you are better off overriding the CFLAGS for these generated
files. Just put -Wno-error as the last one (untested, but should work)



Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jolsa at redhat

May 4, 2012, 8:26 AM

Post #9 of 12 (140 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Fri, May 04, 2012 at 12:10:55PM -0300, Lucas De Marchi wrote:
> On Fri, May 4, 2012 at 4:09 AM, Ingo Molnar <mingo [at] kernel> wrote:
> >
> > * Greg KH <gregkh [at] linuxfoundation> wrote:
> >
> >> On Thu, May 03, 2012 at 11:01:54PM -0400, Arnaud Lacombe wrote:
> >> > Hi,
> >> >
> >> > On Thu, May 3, 2012 at 10:47 PM, Greg KH <gregkh [at] linuxfoundation> wrote:
> >> > > On Thu, May 03, 2012 at 10:35:02PM -0400, Arnaud Lacombe wrote:
> >> > >> Hi,
> >> > >>
> >> > >> On Thu, May 3, 2012 at 10:29 PM, Arnaud Lacombe <lacombar [at] gmail> wrote:
> >> > >> > [...]
> >> > >> > [0]: http://pkgs.fedoraproject.org/gitweb/?p=flex.git;a=blob;f=flex-2.5.35-hardening.patch;h=7d608ea2371fa3295bdb8eb97c15eeb03029c02b;hb=HEAD
> >> > >> >
> >> > >> as a side note, this patch sounds more being about "silencing" than
> >> > >> "hardening"...
> >> > >
> >> > > That's nice, but I can build the perf version in 3.3 just fine, so
> >> > > something broke here (hint, build regression.) Do I have to bisect it
> >> > > down to find the problem?
> >> > >
> >> > there is most likely nothing to bisect, `perf' seems to have never
> >> > required any parser before 3.4. The way the rest of the tools
> >> > (especially `kconfig', `genksyms' and `dtc') manage parsers is via
> >> > pre-generated .[ch]_shipped version of the lexer/tokenizer. It's been
> >> > working well for a long time as such. `perf' will certainly have to
> >> > follow the same path.
> >>
> >> Well, it can allow bison to run, but just don't break the build if the
> >> generated code it creates happens to contain warnings.
> >>
> >> I'm using bison 2.5 and flex 2.5.35, and my phone number is...
> >>
> >> Like this really matters? This needs to work for everyone, if not, you
> >> better put the specific version numbers you need to require in the
> >> Documentation/Changes file.
> >>
> >> So, how do I fix this?
> >
> > Does the (untested) patch below help?
> >
> > If not then please paste me the build failure output (it will
> > most likely change due to the patch), and until we fix this
> > build regression on OpenSuse userspace you can work it around
> > via:
> >
> > make WERROR=0
> >
> > Thanks,
> >
> > Ingo
> >
> > diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> > index 7055a00..3174e9b 100644
> > --- a/tools/perf/Makefile
> > +++ b/tools/perf/Makefile
> > @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> > # over the general rule for .o
> >
> > $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> > - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> > + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter $<
>
> Nah. What you need is -Wno-sign-compare.
>
> But you are better off overriding the CFLAGS for these generated
> files. Just put -Wno-error as the last one (untested, but should work)

yep, I think it's good idea.. and plus '-w' to suppres warnings not to
polute the build log

jirka


---
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7055a00..9c734a2 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
# over the general rule for .o

$(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-error -w $<

$(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
+ $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-error -w $<

$(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


namhyung at gmail

May 4, 2012, 8:26 AM

Post #10 of 12 (138 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

Hi,

On Fri, 4 May 2012 17:02:11 +0200, Jiri Olsa wrote:
>> So I doubt -Wno-unused-parameter will do any good here.
> I think we need also -Wno-sign-compare, please check the attached patch
>
>
> ---
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 7055a00..8f7b6cf 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> # over the general rule for .o
>
> $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter -Wno-sign-compare $<
>

s/unused-parameter/unused-result/ ?

Thanks,
Namhyung


> $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-unused-parameter -Wno-sign-compare $<
>
> $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


namhyung at gmail

May 4, 2012, 8:38 AM

Post #11 of 12 (139 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

Hi,

On Fri, 4 May 2012 17:26:13 +0200, Jiri Olsa wrote:
> On Fri, May 04, 2012 at 12:10:55PM -0300, Lucas De Marchi wrote:
>> Nah. What you need is -Wno-sign-compare.
>>
>> But you are better off overriding the CFLAGS for these generated
>> files. Just put -Wno-error as the last one (untested, but should work)
>
> yep, I think it's good idea.. and plus '-w' to suppres warnings not to
> polute the build log
>
> jirka

Works well for me. But I guess -Wno-error turns into a nop if we use
'-w', right?


Thank,
Namhyung


>
>
> ---
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 7055a00..9c734a2 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> # over the general rule for .o
>
> $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-error -w $<
>
> $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
> - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-error -w $<
>
> $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jolsa at redhat

May 4, 2012, 9:41 AM

Post #12 of 12 (138 views)
Permalink
Re: [patch] perf: Fix build failure on OpenSuse userspace [In reply to]

On Sat, May 05, 2012 at 12:38:48AM +0900, Namhyung Kim wrote:
> Hi,
>
> On Fri, 4 May 2012 17:26:13 +0200, Jiri Olsa wrote:
> > On Fri, May 04, 2012 at 12:10:55PM -0300, Lucas De Marchi wrote:
> >> Nah. What you need is -Wno-sign-compare.
> >>
> >> But you are better off overriding the CFLAGS for these generated
> >> files. Just put -Wno-error as the last one (untested, but should work)
> >
> > yep, I think it's good idea.. and plus '-w' to suppres warnings not to
> > polute the build log
> >
> > jirka
>
> Works well for me. But I guess -Wno-error turns into a nop if we use
> '-w', right?

argghh.. right ;) misread the man page.. I tested -w is enough

thanks,
jirka

>
>
> Thank,
> Namhyung
>
>
> >
> >
> > ---
> > diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> > index 7055a00..9c734a2 100644
> > --- a/tools/perf/Makefile
> > +++ b/tools/perf/Makefile
> > @@ -729,10 +729,10 @@ $(OUTPUT)perf.o perf.spec \
> > # over the general rule for .o
> >
> > $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
> > - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> > + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-error -w $<
> >
> > $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
> > - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
> > + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-error -w $<
> >
> > $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
> > $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.