linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Justin M. Forbes" <jforbes@fedoraproject.org>
Subject: Re: [PATCH v2] perf: Avoid implicit function declarations in lexer/parse interface
Date: Fri, 28 Apr 2023 22:37:08 -0300	[thread overview]
Message-ID: <ZEx0xAamEl66qk2w@kernel.org> (raw)
In-Reply-To: <ZEx0IQAtBatrRDCR@kernel.org>

Em Fri, Apr 28, 2023 at 10:34:25PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Apr 25, 2023 at 10:40:14AM -0700, Ian Rogers escreveu:
> > On Tue, Apr 25, 2023 at 10:12 AM Florian Weimer <fweimer@redhat.com> wrote:
> > >
> > > In future compilers, -Wno-implicit-function-declaration may not bring
> > > back support for implicit function declarations, a feature that was
> > > removed from the C language in C99.  Instead of relying on implicit
> > > declarations, include the flex-generated header from the
> > > bison-generated C code.
> > >
> > > he expr-flex.h header needs to be included later than the others
> > 
> > nit: s/he/The/
> > 
> > > because at the early point, the definition of YYSTYPE is not yet
> > > available.
> > >
> > > Signed-off-by: Florian Weimer <fweimer@redhat.com>
> > 
> > Acked-by: Ian Rogers <irogers@google.com>
> > 
> > Thanks for fighting the build wrt parallel dependencies!
> > Ian
> 
> 
> Thanks, applied. BTW b4 coulnd't find this message (nor the original):
> 
> ⬢[acme@toolbox perf-tools-next]$ b4 am -ctsl --cc-trailers 87sfcn7uot.fsf@oldenburg.str.redhat.com
> Grabbing thread from lore.kernel.org/all/87sfcn7uot.fsf%40oldenburg.str.redhat.com/t.mbox.gz
> That message-id is not known.
> ⬢[acme@toolbox perf-tools-next]$ b4 am -ctsl --cc-trailers CAP-5=fXZv+KCdCN05wVUcAwDCZAgXjWunoaviGBQEiUPqNwOmg@mail.gmail.com
> Grabbing thread from lore.kernel.org/all/CAP-5%3DfXZv%2BKCdCN05wVUcAwDCZAgXjWunoaviGBQEiUPqNwOmg%40mail.gmail.com/t.mbox.gz
> Analyzing 1 messages in the thread
> No patches found.
> ⬢[acme@toolbox perf-tools-next]$
> 
> I applied it in the old fashion.

Not so fast, removed it for now:

  CC      /tmp/build/perf-tools-next/util/parse-events-bison.o
In file included from util/pmu.y:14:
/tmp/build/perf-tools-next/util/pmu-flex.h:496:1: error: unknown type name ‘YYSTYPE’
  496 |
      | ^
/tmp/build/perf-tools-next/util/pmu-flex.h:498:19: error: unknown type name ‘YYSTYPE’
  498 |
      |                   ^
/tmp/build/perf-tools-next/util/pmu-flex.h:546:17: error: unknown type name ‘YYSTYPE’
  546 | extern int yylex \
      |                 ^~
util/pmu-bison.c: In function ‘perf_pmu_parse’:
/tmp/build/perf-tools-next/util/pmu-bison.c:69:25: error: implicit declaration of function ‘perf_pmu_lex’; did you mean ‘perf_pmu_free’? [-Werror=implicit-function-declaration]
   69 | #define yylex           perf_pmu_lex
      |                         ^~~~~~~~~~~~
util/pmu-bison.c:1007:16: note: in expansion of macro ‘yylex’
At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[4]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:97: /tmp/build/perf-tools-next/util/pmu-bison.o] Error 1
make[4]: *** Waiting for unfinished jobs....
util/bpf-filter-bison.c: In function ‘perf_bpf_filter_parse’:
/tmp/build/perf-tools-next/util/bpf-filter-bison.c:69:25: error: implicit declaration of function ‘perf_bpf_filter_lex’; did you mean ‘perf_bpf_filter_parse’? [-Werror=implicit-function-declaration]
   69 | #define yylex           perf_bpf_filter_lex
      |                         ^~~~~~~~~~~~~~~~~~~
util/bpf-filter-bison.c:1283:16: note: in expansion of macro ‘yylex’
At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[4]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:97: /tmp/build/perf-tools-next/util/bpf-filter-bison.o] Error 1
make[3]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:140: util] Error 2
make[2]: *** [Makefile.perf:676: /tmp/build/perf-tools-next/perf-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf-tools-next/pmu-events/pmu-events.o
  LD      /tmp/build/perf-tools-next/pmu-events/pmu-events-in.o
make[1]: *** [Makefile.perf:236: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/var/home/acme/git/perf-tools-next/tools/perf'

 Performance counter stats for 'make -k CORESIGHT=1 O=/tmp/build/perf-tools-next -C tools/perf install-bin':

       40330976311      cycles:u
       73953066660      instructions:u                   #    1.83  insn per cycle

       9.268030835 seconds time elapsed

       9.546339000 seconds user
       7.391844000 seconds sys


⬢[acme@toolbox perf-tools-next]$ cat /etc/redhat-release
Fedora release 37 (Thirty Seven)
⬢[acme@toolbox perf-tools-next]$ rpm -q bison flex
bison-3.8.2-3.fc37.x86_64
flex-2.6.4-11.fc37.x86_64
⬢[acme@toolbox perf-tools-next]$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

⬢[acme@toolbox perf-tools-next]$



I tried rm -rf the O= build dir, etc.

- Arnaldo

  reply	other threads:[~2023-04-29  1:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87sfcn7uot.fsf@oldenburg.str.redhat.com>
2023-04-25 17:40 ` [PATCH v2] perf: Avoid implicit function declarations in lexer/parse interface Ian Rogers
2023-04-29  1:34   ` Arnaldo Carvalho de Melo
2023-04-29  1:37     ` Arnaldo Carvalho de Melo [this message]
2023-05-03  9:36       ` Florian Weimer
2023-05-03  9:40         ` Florian Weimer
2023-05-03 15:04           ` Arnaldo Carvalho de Melo
2023-05-03 15:28             ` Ian Rogers
2023-05-03 16:45               ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEx0xAamEl66qk2w@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=fweimer@redhat.com \
    --cc=irogers@google.com \
    --cc=jforbes@fedoraproject.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).