[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
>    21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
>       |     ^~~~~~~~~~~~~~~~~~~
> In file included from ../lib/bitmap.c:6:
> tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
>    15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
>       |     ^~~~~~~~~~~~~~~~~~~
> ../lib/bitmap.c: In function '__bitmap_weight_cmp':
> ../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
>    26 |                 if (w + bits - k * BITS_PER_LONG < num)
>       |                                                  ^
> ../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
>    31 |                 if (w > num)
>       |                       ^
> cc1: all warnings being treated as errors
> tools/perf/../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
>    21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
>       |     ^~~~~~~~~~~~~~~~~~~
> In file included from tools/perf/../lib/bitmap.c:6:
> tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
>    15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
>       |     ^~~~~~~~~~~~~~~~~~~
> tools/perf/../lib/bitmap.c: In function '__bitmap_weight_cmp':
> tools/perf/../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
>    26 |                 if (w + bits - k * BITS_PER_LONG < num)
>       |                                                  ^
> tools/perf/../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
>    31 |                 if (w > num)
>       |                       ^
> cc1: all warnings being treated as errors

I fixed tools build error and updated the bitmap-for-next branch. The
problem is that tools/perf
enables -Werror=sign-compare, and main kernel not. So direct copying
of functions from kernel
to tools doesn't work. This might be an issue by itself because I
think it would be better to keep
kernel and tools code consistent whenever possible.

Another problem is that the tools lacks testing from (obviously) me,
0-day and TCWG. I added
tools/perf to my testing build suite, and found that the build fails
for arm and s390 on v5.18-rc2.
See tools/perf build log attached.

Thanks,
Yury

s390:
  PERF_VERSION = 5.18.rc2.gce522ba9ef7e
In file included from /usr/s390x-linux-gnu/include/stdio.h:866,
                 from
/home/yury/work/linux/tools/lib/perf/include/perf/cpumap.h:7,
                 from util/session.c:13:
In function â??printfâ??,
    inlined from â??dump_eventâ?? at util/session.c:1292:2,
    inlined from â??machines__deliver_eventâ?? at util/session.c:1502:2,
    inlined from â??perf_session__deliver_synth_eventâ?? at util/session.c:1703:9:
/usr/s390x-linux-gnu/include/bits/stdio2.h:112:10: error: â??%sâ??
directive argument is null [-Werror=format-overflow=]
  112 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util/session.c: In function â??perf_session__deliver_synth_eventâ??:
util/session.c:1292:25: note: format string is defined here
 1292 |  printf("\n%#" PRIx64 "@%s [%#x]: event: %d\n",
      |                         ^~
cc1: all warnings being treated as errors

arm:
  PERF_VERSION = 5.18.rc2.gce522ba9ef7e
/tmp/ccHIlKZJ.s: Assembler messages:
/tmp/ccHIlKZJ.s:541: Error: selected processor does not support `ldrd
r0,r1,[r2]' in ARM mode
/tmp/ccHIlKZJ.s:630: Error: selected processor does not support `strd
r4,r5,[r3]' in ARM mode
make[9]: *** [/home/yury/work/linux/tools/build/Makefile.build:96:
/home/yury/work/linux/build/arm/tools/perf/arch/arm/util/auxtrace.o]
Error 1




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux