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

Configure Feed

Select the types of activity you want to include in your feed.

perf build: Add missing cflags when building with custom libtraceevent

When building with custom libtraceevent, below errors occur:

$ make -C tools/perf NO_LIBPYTHON=1 PKG_CONFIG_PATH=<custom libtraceevent>
In file included from util/session.h:5,
from builtin-buildid-list.c:17:
util/trace-event.h:153:10: fatal error: traceevent/event-parse.h: No such file or directory
153 | #include <traceevent/event-parse.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
<snip similar errors of missing headers>

This is because the include path is missed in the cflags. Add it.

Fixes: 0f0e1f445690 ("perf build: Use pkg-config for feature check for libtrace{event,fs}")
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Guilherme Amadio <amadio@gentoo.org>
Cc: linuxarm@huawei.com
Link: https://lore.kernel.org/r/20241024133236.31016-1-yangyicong@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Yicong Yang and committed by
Namhyung Kim
d5a0a4ab c741c7b5

+1 -1
+1 -1
tools/perf/Makefile.config
··· 1183 1183 ifneq ($(NO_LIBTRACEEVENT),1) 1184 1184 $(call feature_check,libtraceevent) 1185 1185 ifeq ($(feature-libtraceevent), 1) 1186 - CFLAGS += -DHAVE_LIBTRACEEVENT 1186 + CFLAGS += -DHAVE_LIBTRACEEVENT $(shell $(PKG_CONFIG) --cflags libtraceevent) 1187 1187 LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libtraceevent) 1188 1188 EXTLIBS += $(shell $(PKG_CONFIG) --libs-only-l libtraceevent) 1189 1189 LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent).0.0