Skip to content

Commit 7b128f1

Browse files
Tao Chenrostedt
authored andcommitted
rtla: 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/[email protected] Fixes: 01474dc ("tools/rtla: Use tools/build makefiles to build rtla") Signed-off-by: Tao Chen <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 26ebba2 commit 7b128f1

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)