perf tools: Fix bison-related build failure on CentOS 6
Namhyung Kim
maintainerPATCH 1/1 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
--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -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
Signature · 1 line
2.3.5
Quoted 2 lines · Namhyung Kim
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-events-bison.c:
any clue why is that? cant see why Fedora is not complaining over the same sources and RHEL6 fails..
jirka
Quoted 28 lines
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 1Signed-off-by Namhyung Kim <[email protected]>--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-1@@ -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.cSignature · 1 line
2.3.5
Namhyung Kim
maintainerQuoted 6 lines · Jiri Olsa
Quoted 2 lines · Namhyung Kim
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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
Quoted 28 lines
Quoted 28 lines
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 1Signed-off-by Namhyung Kim <[email protected]>--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-2@@ -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
Signature · 2 lines
Thanks, Namhyung
Quoted 10 lines · Namhyung Kim
Quoted 6 lines · Jiri Olsa
Quoted 2 lines · Namhyung Kim
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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
Quoted 10 lines
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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 1Signed-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
Quoted 20 lines
--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-1@@ -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
Quoted 9 lines · Arnaldo Carvalho de Melo
Quoted 9 lines
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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
Quoted 5 lines
Quoted 1 line
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
Quoted 23 lines · Jiri Olsa
Quoted 9 lines · Arnaldo Carvalho de Melo
Quoted 9 lines
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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 1Quoted 5 lines
Quoted 1 line
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:
Quoted 5 lines
65f3e56e0c81perf tools: Remove auto-generated bison/flex filesprobably 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:
Quoted 30 lines · Jiri Olsa
Quoted 23 lines · Arnaldo Carvalho de Melo
Quoted 9 lines
Quoted 9 lines
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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 1Quoted 5 lines
Quoted 1 line
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:
Quoted 5 lines
65f3e56e0c81perf tools: Remove auto-generated bison/flex filesprobably 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
Quoted 7 lines
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), soYYLTYPE_IS_TRIVIALgets 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
Quoted 34 lines · Arnaldo Carvalho de Melo
Em Wed, Apr 29, 2015 at 08:14:14PM +0200, Jiri Olsa escreveu:
Quoted 33 lines · Jiri Olsa
Quoted 23 lines · Arnaldo Carvalho de Melo
Quoted 9 lines
Quoted 9 lines
The
YYLTYPE_IS_TRIVIALis defined in the Build file, but unlikepmu-bison.c, gcc complained about it forparse-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 1Quoted 5 lines
Quoted 1 line
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:
Quoted 5 lines
65f3e56e0c81perf tools: Remove auto-generated bison/flex filesprobably 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 definedok, seem's the patch is right and the reason is the parse error handling that was added just recently
Quoted 7 lines
Quoted 4 lines
it adds YYLTYPE type (which is not present in
pmu-bison.h), soYYLTYPE_IS_TRIVIALgets 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 errorOk, adding this comment to the changelog, together with your Acked-by, ok?
ook
jirka
Quoted 2 lines
- Arnaldo
tip-bot for Namhyung Kim
merge botperf tools: Fix bison-related build failure on CentOS 6
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."
--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -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