Created attachment 601832 [details] dev-util:perf-5.4.6:20191230-105538.log I have a few warnings enabled in CFLAGS: $ portageq envvar CFLAGS -march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector Relevant build error: x86_64-pc-linux-gnu-gcc -Wp,-MD,./.core.o.d -Wp,-MT,core.o -march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wstrict-aliasing=3 -Wshadow -Werror -Wall -fPIC -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/perf/lib/include -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/lib/ -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/include -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/arch/x86/include/ -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/arch/x86/include/uapi -I/tmp/portage-tmpdir/portage/dev-util/perf-5.4.6/work/linux-5.4/tools/include/uapi -fvisibility=hidden -D"BUILD_STR(s)=#s" -c -o core.o core.c core.c: In function '__base_pr': core.c:12:47: error: unused parameter 'level' [-Werror=unused-parameter] 12 | static int __base_pr(enum libperf_print_level level, const char *format, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ cc1: all warnings being treated as errors perf-5.3.7 was built fine.
Upstream commit 55542113c690 (perf tools: Propagate CFLAGS to libperf) seems to have the fix for it. I will check and add the part of the commit. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/tools/perf/lib/core.c?id=55542113c690a567e728e40d4181d7d037fc21b0
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6f66627b9238efbddc623de273ab1d5bf4874cd commit c6f66627b9238efbddc623de273ab1d5bf4874cd Author: Naohiro Aota <naota@gentoo.org> AuthorDate: 2020-01-04 21:17:53 +0000 Commit: Naohiro Aota <naota@gentoo.org> CommitDate: 2020-01-04 21:40:14 +0000 dev-util/perf: fix build with -Werror Apply an upstream patch to fix the issue. Closes: https://bugs.gentoo.org/704254 Signed-off-by: Naohiro Aota <naota@gentoo.org> dev-util/perf/Manifest | 2 +- dev-util/perf/{perf-5.4.6.ebuild => perf-5.4.7.ebuild} | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
Looks like you forgot to add & commit the actual patch..
patch added
Oops, thanks for adding the patch.