Re: perf build failure on Linus's tree

From: Arnaud Lacombe
Date: Fri May 04 2012 - 00:01:54 EST


Hi,

On Thu, May 3, 2012 at 11:16 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx> 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.
>
This will not really help. Fedora and OpenSuse both ship flex 2.5.35,
which happens to both produce different output. It will be a real mess
to track which patch is applied by such or such distro which results
in such behavior.

Now, I agree with you. This does not *need* to work, it *must*.
Removing the dependency on bison/flex for normal users would make it
more manageable, from my point of view.

> So, how do I fix this?
>
you may either want to try the attached patch, or wait for `perf's
folks to look at this issue.

- Arnaud

ps: btw, please do not shoot at the messenger, I had nothing to do
with `util/perf' before you Cc'ed me. I'm just proposing solutions...

Attachment: 0001-perf-pre-generate-events-and-pmu-parsers.patch.gz
Description: GNU Zip compressed data