Re: [PATCH 2/2] perf build: warn if libtracefs is not found

From: Ian Rogers
Date: Thu Jun 27 2024 - 13:26:56 EST


On Thu, Jun 27, 2024 at 8:07 AM Guilherme Amadio <amadio@xxxxxxxxxx> wrote:
>
> Signed-off-by: Guilherme Amadio <amadio@xxxxxxxxxx>
> ---
> tools/perf/Makefile.config | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 987b48f242d3..e99afc7eb4b5 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -1204,6 +1204,8 @@ ifneq ($(NO_LIBTRACEEVENT),1)
> LIBTRACEFS_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEFS_VERSION)))
> LIBTRACEFS_VERSION_CPP := $(shell expr $(LIBTRACEFS_VERSION_1) \* 255 \* 255 + $(LIBTRACEFS_VERSION_2) \* 255 + $(LIBTRACEFS_VERSION_3))
> CFLAGS += -DLIBTRACEFS_VERSION=$(LIBTRACEFS_VERSION_CPP)
> + else
> + $(warning libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)

This all makes sense and looks good to me. I believe perf isn't
directly depending on libtracefs and gets the dependency from
libtraceevent. Older libtraceevents didn't have libtracefs so just
warning in this case makes sense to me. I just wanted to speak my
thoughts out loud in case I was missing something.

Thanks,
Ian

> endif
> endif
>
> --
> 2.45.2
>