Re: [PATCH] perf build: Check whether pkg-config is installed when libtraceevent is linked

From: Namhyung Kim
Date: Mon Jan 22 2024 - 15:36:59 EST


On Fri, 12 Jan 2024 03:40:19 +0000, Yang Jihong wrote:
> If pkg-config is not installed when libtraceevent is linked, the build fails.
>
> The error information is as follows:
>
> $ make
> <SNIP>
> In file included from /home/yjh/projects_linux/perf-tool-next/linux/tools/perf/util/evsel.c:43:
> /home/yjh/projects_linux/perf-tool-next/linux/tools/perf/util/trace-event.h:149:62: error: operator '&&' has no right operand
> 149 | #if defined(LIBTRACEEVENT_VERSION) && LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)
> | ^~
> error: command '/usr/bin/gcc' failed with exit code 1
> cp: cannot stat 'python_ext_build/lib/perf*.so': No such file or directory
> make[2]: *** [Makefile.perf:668: python/perf.cpython-310-x86_64-linux-gnu.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
>
> [...]

Applied to perf-tools-next, thanks!

Thanks,
Namhyung