[BUG] perf build: fail with BUILD_NONDISTRO=1 FEATURES_DUMP=...

From: Namhyung Kim
Date: Tue Jun 27 2023 - 02:30:56 EST


Hello,

I'm having a failure during `make build-test` in the perf tree.
It calls make BUILD_NONDISTRO=1 with FEATURES_DUMP defined.
Building with BUILD_NONDISTRO=1 alone was fine but it fails when I
define the FEATURES_DUMP too.

$ make build-test
make_nondistro_O: cd . && make BUILD_NONDISTRO=1 \
FEATURES_DUMP=./BUILD_TEST_FEATURE_DUMP -j64 \
O=/tmp/tmp.6JwPK1xbWG DESTDIR=/tmp/tmp.sWSewBwO13
...
CC util/annotate.o
In file included from util/annotate.c:1814:
tools/include/tools/dis-asm-compat.h:10:6: error: redeclaration of ‘enum disassembler_style’
10 | enum disassembler_style {DISASSEMBLER_STYLE_NOT_EMPTY};
| ^~~~~~~~~~~~~~~~~~
In file included from util/annotate.c:1809:
/usr/include/dis-asm.h:53:6: note: originally defined here
53 | enum disassembler_style
| ^~~~~~~~~~~~~~~~~~
tools/include/tools/dis-asm-compat.h: In function ‘init_disassemble_info_compat’:
tools/include/tools/dis-asm-compat.h:50:9: error: too few arguments to function ‘init_disassemble_info’
50 | init_disassemble_info(info, stream,
| ^~~~~~~~~~~~~~~~~~~~~
/usr/include/dis-asm.h:480:13: note: declared here
480 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
| ^~~~~~~~~~~~~~~~~~~~~
util/annotate.c: In function ‘symbol__disassemble_bpf’:
util/annotate.c:1896:36: error: incompatible type for argument 1 of ‘disassembler’
1896 | disassemble = disassembler(bfdf);
| ^~~~
| |
| bfd *
/usr/include/dis-asm.h:409:63: note: expected ‘enum bfd_architecture’ but argument is of type ‘bfd *’
409 | extern disassembler_ftype disassembler (enum bfd_architecture arc,
| ~~~~~~~~~~~~~~~~~~~~~~^~~
util/annotate.c:1896:23: error: too few arguments to function ‘disassembler’
1896 | disassemble = disassembler(bfdf);
| ^~~~~~~~~~~~
/usr/include/dis-asm.h:409:27: note: declared here
409 | extern disassembler_ftype disassembler (enum bfd_architecture arc,
| ^~~~~~~~~~~~


Thanks,
Namhyung


Cc: Andres Freund <andres@xxxxxxxxxxx>
Cc: Sedat Dilek <sedat.dilek@xxxxxxxxx>
Cc: Roberto Sassu <roberto.sassu@xxxxxxxxxx>