perf tools: Add reject option for parse-events.l
PATCH 1/1 perf tools: Add reject option for parse-events.l
Reply-To:
In-Reply-To: <20171109081319.GB236@x4>
Quoted 25 lines · Markus Trippelsdorf
Quoted 8 lines · Ingo Molnar
Linus,
Please pull the latest perf-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitperf-urgent-for-linusJiri Olsa (1):
perf tools: Unwind properly location after REJECTThe patch above breaks the build for me:
util/parse-events.l: In function ‘parse_events_lex’:
util/parse-events-flex.c:4722:16: error: ‘reject_used_but_not_detected’ undeclared (first use in this function)
*/^util/parse-events.l:159:2: note: in expansion of macro ‘REJECT’
REJECT
^~~~~~
util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
{bpf_source} { if (!isbpf(yyscanner))USER_REJECT; returnstr(yyscanner, PE_BPF_SOURCE); }^~~~~~~~~~~ util/parse-events-flex.c:4722:16: note: each undeclared identifier is reported only once for each function it appears in */ ^
Quoted 7 lines
util/parse-events.l:159:2: note: in expansion of macro ‘REJECT’
REJECT
^~~~~~
util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
{bpf_source} { if (!isbpf(yyscanner))USER_REJECT; returnstr(yyscanner, PE_BPF_SOURCE); }^~~~~~~~~~~mv: cannot stat 'util/.parse-events-flex.o.tmp': No such file or directory
sry, we have a fix in queue already
jitka
---
Arnaldo reported broken build under some distros due to flex no spotting the REJECT macro:
CC /tmp/build/perf/util/parse-events-flex.o
util/parse-events.l: In function 'parse_events_lex':
/tmp/build/perf/util/parse-events-flex.c:4734:16: error: \
'reject_used_but_not_detected' undeclared (first use in this function)
It's happening because we put the REJECT under another USER_REJECT macro in following commit:
9445464bb831 perf tools: Unwind properly location after REJECT
Fortunately flex provides option for force it to use REJECT, adding it to parse-events.l.
--- tools/perf/util/parse-events.l | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/parse-events.l +1 -0
@@ -5,6 +5,7 @@ %option stack %option bison-locations %option yylineno +%option reject %{ #include <errno.h>
Signature · 1 line
2.13.6
Arnaldo Carvalho de Melo
maintainerEm Thu, Nov 09, 2017 at 09:17:49AM +0100, Jiri Olsa escreveu:
Quoted 11 lines
Reply-To:
In-Reply-To: <20171109081319.GB236@x4>Quoted 5 lines · Markus Trippelsdorf
On 2017.11.05 at 15:40 +0100, Ingo Molnar wrote:
util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
{bpf_source} { if (!isbpf(yyscanner))USER_REJECT; returnstr(yyscanner, PE_BPF_SOURCE); }^~~~~~~~~~~mv: cannot stat 'util/.parse-events-flex.o.tmp': No such file or directory
sry, we have a fix in queue already
yeah, I noticed it while building for Alpine Linux 3.6 and Edge, that have flex 2.6.4, which is newer than what is in the other distros, ubuntu, debian, fedora, even their experimental ones (rawhide, etc), out of curiosity, what distro do you use and what flex version does it use?
- Arnaldo
Quoted 11 lines · Arnaldo Carvalho de Melo
Em Thu, Nov 09, 2017 at 09:17:49AM +0100, Jiri Olsa escreveu:
Quoted 10 lines
Reply-To:
In-Reply-To: <20171109081319.GB236@x4>Quoted 5 lines · Markus Trippelsdorf
On 2017.11.05 at 15:40 +0100, Ingo Molnar wrote:
util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
{bpf_source} { if (!isbpf(yyscanner))USER_REJECT; returnstr(yyscanner, PE_BPF_SOURCE); }^~~~~~~~~~~mv: cannot stat 'util/.parse-events-flex.o.tmp': No such file or directory
Quoted 7 lines
Quoted 1 line
sry, we have a fix in queue already
yeah, I noticed it while building for Alpine Linux 3.6 and Edge, that have flex 2.6.4, which is newer than what is in the other distros, ubuntu, debian, fedora, even their experimental ones (rawhide, etc), out of curiosity, what distro do you use and what flex version does it use?
In my case: Gentoo and flex-2.6.4.
Signature · 1 line
Markus
Arnaldo Carvalho de Melo
maintainerEm Thu, Nov 09, 2017 at 02:27:19PM +0100, Markus Trippelsdorf escreveu:
Quoted 14 lines · Arnaldo Carvalho de Melo
Quoted 13 lines
Em Thu, Nov 09, 2017 at 09:17:49AM +0100, Jiri Olsa escreveu:
Quoted 11 lines
Reply-To:
In-Reply-To: <20171109081319.GB236@x4>Quoted 5 lines · Markus Trippelsdorf
On 2017.11.05 at 15:40 +0100, Ingo Molnar wrote:
util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
{bpf_source} { if (!isbpf(yyscanner))USER_REJECT; returnstr(yyscanner, PE_BPF_SOURCE); }^~~~~~~~~~~mv: cannot stat 'util/.parse-events-flex.o.tmp': No such file or directory
sry, we have a fix in queue already
Quoted 7 lines
Quoted 5 lines
yeah, I noticed it while building for Alpine Linux 3.6 and Edge, that have flex 2.6.4, which is newer than what is in the other distros, ubuntu, debian, fedora, even their experimental ones (rawhide, etc), out of curiosity, what distro do you use and what flex version does it use?
In my case: Gentoo and flex-2.6.4.
Cool, and a coincidence, as I'm trying to setup a container for gentoo, using as a start docker.io/gentoo/stage3-amd64, now trying to figure out how to config repositories, portage and all that stuff...
And with http://wiki.osdev.org/GCC_Cross-Compiler help I'll try to have a few more using crossdev to cover some more targets besides the ones I cover using cross build environments using fedora, ubuntu and debian as host environments :-)
- Arnaldo