Re: [PATCH] perf data: Fix babeltrace detection
From: Jiri Olsa
Date: Tue Oct 08 2019 - 07:52:45 EST
On Mon, Oct 07, 2019 at 10:41:20AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> The symbol the feature file checks for is now actually in -lbabeltrace,
> not -lbabeltrace-ctf, at least as of libbabeltrace-1.5.6-2.fc30.x86_64
>
> Always add both libraries to fix the feature detection.
well, we link with libbabeltrace-ctf.so which links with libbabeltrace.so
I guess we can link it as well, but where do you see it fail?
jirka
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> ---
> tools/perf/Makefile.config | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index bf8caa7d17f6..71638917e18a 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -155,7 +155,7 @@ ifdef LIBBABELTRACE_DIR
> LIBBABELTRACE_LDFLAGS := -L$(LIBBABELTRACE_DIR)/lib
> endif
> FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS)
> -FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf
> +FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf -lbabeltrace
>
> ifdef LIBZSTD_DIR
> LIBZSTD_CFLAGS := -I$(LIBZSTD_DIR)/lib
> @@ -895,7 +895,7 @@ ifndef NO_LIBBABELTRACE
> ifeq ($(feature-libbabeltrace), 1)
> CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS)
> LDFLAGS += $(LIBBABELTRACE_LDFLAGS)
> - EXTLIBS += -lbabeltrace-ctf
> + EXTLIBS += -lbabeltrace-ctf -lbabeltrace
> $(call detected,CONFIG_LIBBABELTRACE)
> else
> msg := $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev);
> --
> 2.21.0
>