The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
pmu-bison.c, gcc complained about it for parse-events-bison.c:
CC util/parse-events-bison.o
In file included from util/parse-events.y:16:
util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
<command-line>: error: this is the location of the previous definition
make[3]: *** [util/parse-events-bison.o] Error 1
Signed-off-by: Namhyung Kim <[email protected]>
---
tools/perf/util/Build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index b6c3f39f081a..28af8e2825b3 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -118,7 +118,7 @@ $(OUTPUT)util/pmu-bison.c: util/pmu.y
CFLAGS_parse-events-flex.o += -w
CFLAGS_pmu-flex.o += -w
-CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
+CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
--
2.3.5
On Thu, Apr 30, 2015 at 12:54:31AM +0900, Namhyung Kim wrote:
> The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> pmu-bison.c, gcc complained about it for parse-events-bison.c:
any clue why is that? cant see why Fedora is not complaining
over the same sources and RHEL6 fails..
jirka
>
> CC util/parse-events-bison.o
> In file included from util/parse-events.y:16:
> util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> <command-line>: error: this is the location of the previous definition
> make[3]: *** [util/parse-events-bison.o] Error 1
>
> Signed-off-by: Namhyung Kim <[email protected]>
> ---
> tools/perf/util/Build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index b6c3f39f081a..28af8e2825b3 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -118,7 +118,7 @@ $(OUTPUT)util/pmu-bison.c: util/pmu.y
>
> CFLAGS_parse-events-flex.o += -w
> CFLAGS_pmu-flex.o += -w
> -CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
> +CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
> CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
>
> $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
> --
> 2.3.5
>
On Thu, Apr 30, 2015 at 1:02 AM, Jiri Olsa <[email protected]> wrote:
> On Thu, Apr 30, 2015 at 12:54:31AM +0900, Namhyung Kim wrote:
>> The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
>> pmu-bison.c, gcc complained about it for parse-events-bison.c:
>
> any clue why is that? cant see why Fedora is not complaining
> over the same sources and RHEL6 fails..
I have no idea. I just found it during build test using containers,
and had no chance to look into the bison code..
Thanks,
Namhyung
>>
>> CC util/parse-events-bison.o
>> In file included from util/parse-events.y:16:
>> util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
>> <command-line>: error: this is the location of the previous definition
>> make[3]: *** [util/parse-events-bison.o] Error 1
>>
>> Signed-off-by: Namhyung Kim <[email protected]>
>> ---
>> tools/perf/util/Build | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
>> index b6c3f39f081a..28af8e2825b3 100644
>> --- a/tools/perf/util/Build
>> +++ b/tools/perf/util/Build
>> @@ -118,7 +118,7 @@ $(OUTPUT)util/pmu-bison.c: util/pmu.y
>>
>> CFLAGS_parse-events-flex.o += -w
>> CFLAGS_pmu-flex.o += -w
>> -CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
>> +CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
>> CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
>>
>> $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
>> --
>> 2.3.5
>>
--
Thanks,
Namhyung
> The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> pmu-bison.c, gcc complained about it for parse-events-bison.c:
>
> CC util/parse-events-bison.o
> In file included from util/parse-events.y:16:
> util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> <command-line>: error: this is the location of the previous definition
> make[3]: *** [util/parse-events-bison.o] Error 1
>
> Signed-off-by: Namhyung Kim <[email protected]>
Ok, so this helps, it builds now on RHEL6.6, which was something I and
Jiri were chasing, but why has it complained for one and not the other?
Ideas?
- Arnaldo
> ---
> tools/perf/util/Build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index b6c3f39f081a..28af8e2825b3 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -118,7 +118,7 @@ $(OUTPUT)util/pmu-bison.c: util/pmu.y
>
> CFLAGS_parse-events-flex.o += -w
> CFLAGS_pmu-flex.o += -w
> -CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
> +CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
> CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
>
> $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c
> $(OUTPUT)util/parse-events-bison.c
> --
> 2.3.5
On Wed, Apr 29, 2015 at 1:11 PM, Namhyung Kim <[email protected]> wrote:
> On Thu, Apr 30, 2015 at 1:02 AM, Jiri Olsa <[email protected]> wrote:
>> On Thu, Apr 30, 2015 at 12:54:31AM +0900, Namhyung Kim wrote:
>>> The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
>>> pmu-bison.c, gcc complained about it for parse-events-bison.c:
>>
>> any clue why is that? cant see why Fedora is not complaining
>> over the same sources and RHEL6 fails..
>
> I have no idea. I just found it during build test using containers,
> and had no chance to look into the bison code..
Well, applied tested it on both rhel7, fedora21 and rhel6.6, seems to work,
have it in my perf/core branch at git.kernel.org, that branch now builds on
rhel6.6, after fixing issues with several patches that were making it shadow
some functions (util.h's error(), etc).
If we can get a better message for that, figuring out what that
_IS_TRIVIAL thingy does....
- Arnaldo
On Wed, Apr 29, 2015 at 01:27:40PM -0300, Arnaldo Carvalho de Melo wrote:
> > The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> > pmu-bison.c, gcc complained about it for parse-events-bison.c:
> >
> > CC util/parse-events-bison.o
> > In file included from util/parse-events.y:16:
> > util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> > <command-line>: error: this is the location of the previous definition
> > make[3]: *** [util/parse-events-bison.o] Error 1
> >
> > Signed-off-by: Namhyung Kim <[email protected]>
>
> Ok, so this helps, it builds now on RHEL6.6, which was something I and
> Jiri were chasing, but why has it complained for one and not the other?
> Ideas?
looks like the RHEL6 gcc/cpp treats this as an error which
is not maskable by '-w' option
anyway I checked the git log history and I'm not sure
why we event have this define, it was added by Ingo
and carried by ever since:
65f3e56e0c81 perf tools: Remove auto-generated bison/flex files
probably because of the fail I see if I remove it from pmu-bison.o build:
util/pmu-bison.c:613:6: error: "YYLTYPE_IS_TRIVIAL" is not defined
jirka
On Wed, Apr 29, 2015 at 07:57:05PM +0200, Jiri Olsa wrote:
> On Wed, Apr 29, 2015 at 01:27:40PM -0300, Arnaldo Carvalho de Melo wrote:
> > > The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> > > pmu-bison.c, gcc complained about it for parse-events-bison.c:
> > >
> > > CC util/parse-events-bison.o
> > > In file included from util/parse-events.y:16:
> > > util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> > > <command-line>: error: this is the location of the previous definition
> > > make[3]: *** [util/parse-events-bison.o] Error 1
> > >
> > > Signed-off-by: Namhyung Kim <[email protected]>
> >
> > Ok, so this helps, it builds now on RHEL6.6, which was something I and
> > Jiri were chasing, but why has it complained for one and not the other?
> > Ideas?
>
> looks like the RHEL6 gcc/cpp treats this as an error which
> is not maskable by '-w' option
>
> anyway I checked the git log history and I'm not sure
> why we event have this define, it was added by Ingo
> and carried by ever since:
>
> 65f3e56e0c81 perf tools: Remove auto-generated bison/flex files
>
> probably because of the fail I see if I remove it from pmu-bison.o build:
>
> util/pmu-bison.c:613:6: error: "YYLTYPE_IS_TRIVIAL" is not defined
ok, seem's the patch is right and the reason is the
parse error handling that was added just recently
it adds YYLTYPE type (which is not present in pmu-bison.h),
so YYLTYPE_IS_TRIVIAL gets redefined, which is ok in F20
that handle the error via '-w' option, but it's not ok for RHEL6
where the '-w' does not work for this kind of error
jirka
Em Wed, Apr 29, 2015 at 08:14:14PM +0200, Jiri Olsa escreveu:
> On Wed, Apr 29, 2015 at 07:57:05PM +0200, Jiri Olsa wrote:
> > On Wed, Apr 29, 2015 at 01:27:40PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> > > > pmu-bison.c, gcc complained about it for parse-events-bison.c:
> > > >
> > > > CC util/parse-events-bison.o
> > > > In file included from util/parse-events.y:16:
> > > > util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> > > > <command-line>: error: this is the location of the previous definition
> > > > make[3]: *** [util/parse-events-bison.o] Error 1
> > > >
> > > > Signed-off-by: Namhyung Kim <[email protected]>
> > >
> > > Ok, so this helps, it builds now on RHEL6.6, which was something I and
> > > Jiri were chasing, but why has it complained for one and not the other?
> > > Ideas?
> >
> > looks like the RHEL6 gcc/cpp treats this as an error which
> > is not maskable by '-w' option
> >
> > anyway I checked the git log history and I'm not sure
> > why we event have this define, it was added by Ingo
> > and carried by ever since:
> >
> > 65f3e56e0c81 perf tools: Remove auto-generated bison/flex files
> >
> > probably because of the fail I see if I remove it from pmu-bison.o build:
> >
> > util/pmu-bison.c:613:6: error: "YYLTYPE_IS_TRIVIAL" is not defined
>
> ok, seem's the patch is right and the reason is the
> parse error handling that was added just recently
>
> it adds YYLTYPE type (which is not present in pmu-bison.h),
> so YYLTYPE_IS_TRIVIAL gets redefined, which is ok in F20
> that handle the error via '-w' option, but it's not ok for RHEL6
> where the '-w' does not work for this kind of error
Ok, adding this comment to the changelog, together with your Acked-by,
ok?
- Arnaldo
On Wed, Apr 29, 2015 at 03:47:54PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Apr 29, 2015 at 08:14:14PM +0200, Jiri Olsa escreveu:
> > On Wed, Apr 29, 2015 at 07:57:05PM +0200, Jiri Olsa wrote:
> > > On Wed, Apr 29, 2015 at 01:27:40PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
> > > > > pmu-bison.c, gcc complained about it for parse-events-bison.c:
> > > > >
> > > > > CC util/parse-events-bison.o
> > > > > In file included from util/parse-events.y:16:
> > > > > util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
> > > > > <command-line>: error: this is the location of the previous definition
> > > > > make[3]: *** [util/parse-events-bison.o] Error 1
> > > > >
> > > > > Signed-off-by: Namhyung Kim <[email protected]>
> > > >
> > > > Ok, so this helps, it builds now on RHEL6.6, which was something I and
> > > > Jiri were chasing, but why has it complained for one and not the other?
> > > > Ideas?
> > >
> > > looks like the RHEL6 gcc/cpp treats this as an error which
> > > is not maskable by '-w' option
> > >
> > > anyway I checked the git log history and I'm not sure
> > > why we event have this define, it was added by Ingo
> > > and carried by ever since:
> > >
> > > 65f3e56e0c81 perf tools: Remove auto-generated bison/flex files
> > >
> > > probably because of the fail I see if I remove it from pmu-bison.o build:
> > >
> > > util/pmu-bison.c:613:6: error: "YYLTYPE_IS_TRIVIAL" is not defined
> >
> > ok, seem's the patch is right and the reason is the
> > parse error handling that was added just recently
> >
> > it adds YYLTYPE type (which is not present in pmu-bison.h),
> > so YYLTYPE_IS_TRIVIAL gets redefined, which is ok in F20
> > that handle the error via '-w' option, but it's not ok for RHEL6
> > where the '-w' does not work for this kind of error
>
> Ok, adding this comment to the changelog, together with your Acked-by,
> ok?
ook
jirka
>
> - Arnaldo
Commit-ID: 539f3aa2ebb42a409bc9028e38af091a86087165
Gitweb: http://git.kernel.org/tip/539f3aa2ebb42a409bc9028e38af091a86087165
Author: Namhyung Kim <[email protected]>
AuthorDate: Wed, 29 Apr 2015 12:55:00 -0300
Committer: Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 4 May 2015 12:43:52 -0300
perf tools: Fix bison-related build failure on CentOS 6
The YYLTYPE_IS_TRIVIAL is defined in the Build file, but unlike
pmu-bison.c, gcc complained about it for parse-events-bison.c:
CC util/parse-events-bison.o
In file included from util/parse-events.y:16:
util/parse-events-bison.h:101:1: error: "YYLTYPE_IS_TRIVIAL" redefined
<command-line>: error: this is the location of the previous definition
make[3]: *** [util/parse-events-bison.o] Error 1
Comments from Jiri Olsa:
"Reason is the parse error handling that was added just recently: it
adds YYLTYPE type (which is not present in pmu-bison.h), so
YYLTYPE_IS_TRIVIAL gets redefined, which is ok in F20 that handle the
error via '-w' option, but it's not ok for RHEL6 where the '-w' does not
work for this kind of error."
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/util/Build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index b6c3f39..28af8e2 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -118,7 +118,7 @@ $(OUTPUT)util/pmu-bison.c: util/pmu.y
CFLAGS_parse-events-flex.o += -w
CFLAGS_pmu-flex.o += -w
-CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
+CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c