Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/latency-collector: Check pkg-config install

The tool pkg-config used to check libtraceevent and libtracefs, if not
installed, it will report the libs not found, even though they have
already been installed.

Before:
libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel
libtracefs is missing. Please install libtracefs-dev/libtracefs-devel

After:
Makefile.config:10: *** Error: pkg-config needed by libtraceevent/libtracefs is missing
on this system, please install it.

Link: https://lore.kernel.org/20250808040527.2036023-1-chen.dylane@linux.dev
Fixes: 9d56c88e5225 ("tools/tracing: Use tools/build makefiles on latency-collector")
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Tao Chen and committed by
Steven Rostedt (Google)
26ebba25 c17b750b

+8
+8
tools/tracing/latency/Makefile.config
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 + include $(srctree)/tools/scripts/utilities.mak 4 + 3 5 STOP_ERROR := 6 + 7 + ifndef ($(NO_LIBTRACEEVENT),1) 8 + ifeq ($(call get-executable,$(PKG_CONFIG)),) 9 + $(error Error: $(PKG_CONFIG) needed by libtraceevent/libtracefs is missing on this system, please install it) 10 + endif 11 + endif 4 12 5 13 define lib_setup 6 14 $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))