Re: [PATCH 06/13] perf tools: Add compression id into struct kmod_path

From: Arnaldo Carvalho de Melo
Date: Fri Aug 17 2018 - 14:28:55 EST


Em Fri, Aug 17, 2018 at 03:23:15PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Aug 17, 2018 at 11:48:06AM +0200, Jiri Olsa escreveu:
> > static const struct {
> > const char *fmt;
> > int (*decompress)(const char *input, int output);
> > } compressions[] = {
> > + [COMP_ID__NONE] = { 0 },
>
>
> This broke the build in many places, problems of this kind:
>
> CC /tmp/build/perf/util/dso.o
> LD /tmp/build/perf/scripts/python/Perf-Trace-Util/libperf-in.o
> LD /tmp/build/perf/scripts/libperf-in.o
> CC /tmp/build/perf/trace/beauty/clone.o
> CC /tmp/build/perf/util/symbol.o
> util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
> [COMP_ID__NONE] = { 0 },
> ^
> 1 error generated.
> CC /tmp/build/perf/trace/beauty/fcntl.o
> mv: cannot stat '/tmp/build/perf/util/.dso.o.tmp': No such file or directory
> /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/util/dso.o' failed
>
> If we look just at those that failed, its several gcc versions:
>
> 11 9.91 centos:5 : FAIL gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
> 12 14.34 centos:6 : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
> 16 47.50 debian:9 : FAIL gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> 28 53.92 fedora:25 : FAIL gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
> 29 60.75 fedora:26 : FAIL gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
> 30 90.76 fedora:27 : FAIL gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6)
> 41 12.78 oraclelinux:6 : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)
> 43 12.85 ubuntu:12.04.5 : FAIL gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
> 46 45.56 ubuntu:16.04 : FAIL gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
> 54 49.60 ubuntu:17.10 : FAIL gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0

Sorry, gcc eats this with gusto, its just clang that is not taking it,
for instance, this is the one in fedora:27:

clang version 5.0.2 (tags/RELEASE_502/final)

- Arnaldo