Skip to content

Commit a9ae544

Browse files
Tao Chengregkh
authored andcommitted
rtla: Check pkg-config install
[ Upstream commit 7b128f1 ] 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-2-chen.dylane@linux.dev Fixes: 01474dc ("tools/rtla: Use tools/build makefiles to build rtla") Signed-off-by: Tao Chen <chen.dylane@linux.dev> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c535c69 commit a9ae544

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/tracing/rtla/Makefile.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

3+
include $(srctree)/tools/scripts/utilities.mak
4+
35
STOP_ERROR :=
46

57
LIBTRACEEVENT_MIN_VERSION = 1.5
68
LIBTRACEFS_MIN_VERSION = 1.6
79

10+
ifndef ($(NO_LIBTRACEEVENT),1)
11+
ifeq ($(call get-executable,$(PKG_CONFIG)),)
12+
$(error Error: $(PKG_CONFIG) needed by libtraceevent/libtracefs is missing on this system, please install it)
13+
endif
14+
endif
15+
816
define lib_setup
917
$(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
1018
$(eval LDFLAGS += $(shell sh -c "$(PKG_CONFIG) --libs-only-L lib$(1)"))

0 commit comments

Comments
 (0)