Re: [PATCH 1/1] tools build: Remove leftover libcap tests that prevents fast path feature detection from working

From: Ian Rogers
Date: Thu Aug 29 2024 - 02:32:30 EST


On Wed, Aug 28, 2024 at 3:11 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> I noticed that the fast path feature detection was failing:
>
> $ cat /tmp/build/perf-tools-next/feature/test-all.make.output
> /usr/bin/ld: cannot find -lcap: No such file or directory
> collect2: error: ld returned 1 exit status
> $
>
> The patch removing the dependency (Fixes tag below) didn't remove the
> detection of libcap, and as the fast path feature detection (test-all.c)
> had -lcap in its Makefile link list of libraries to link, it was failing
> when libcap-devel is not available, fix it by removing those leftover
> files.

Isn't the feature test still in use by bpftool:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/bpf/bpftool/Makefile?h=perf-tools-next#n103
I'd deliberately not followed up in removing it because of this.

Thanks,
Ian