From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
jolsa@kernel.org, rostedt@goodmis.org, svens@linux.ibm.com,
gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com
Subject: Re: [PATCH v2] perf/build: fix broken dependency check for libtracefs
Date: Tue, 11 Jul 2023 13:15:29 -0300 [thread overview]
Message-ID: <ZK2AISIWZX5GlOZv@kernel.org> (raw)
In-Reply-To: <20230711135338.397473-1-tmricht@linux.ibm.com>
Em Tue, Jul 11, 2023 at 03:53:38PM +0200, Thomas Richter escreveu:
> Perf build auto-detects features and packages already installed
> for its build. This is done in directory tools/build/feature. This
> directory contains small sample programs. When they successfully
> compile the necessary prereqs in form of libraries and header
> files are present.
>
> Such a check is also done for libtracefs. And this check fails:
>
> Output before:
> # rm -f test-libtracefs.bin; make test-libtracefs.bin
> gcc -MD -Wall -Werror -o test-libtracefs.bin test-libtracefs.c \
> > test-libtracefs.make.output 2>&1 -ltracefs
> make: *** [Makefile:211: test-libtracefs.bin] Error 1
> # cat test-libtracefs.make.output
> In file included from test-libtracefs.c:2:
> /usr/include/tracefs/tracefs.h:11:10: fatal error: \
> event-parse.h: No such file or directory
> 11 | #include <event-parse.h>
> | ^~~~~~~~~~~~~~~
> compilation terminated.
> #
>
> The root cause of this compile error is
> commit 880885d9c22e ("libtracefs: Remove "traceevent/" from referencing libtraceevent headers")
> in the libtracefs project hosted here:
> https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
>
> That mentioned patch removes the traceevent/ directory name from
> the include statement, causing the file not to be included even
> when the libtraceevent-devel package is installed. This package contains
> the file referred to in tracefs/tracefs.h:
> # rpm -ql libtraceevent-devel
> /usr/include/traceevent
> /usr/include/traceevent/event-parse.h <----- here
> /usr/include/traceevent/event-utils.h
> /usr/include/traceevent/kbuffer.h
> /usr/include/traceevent/trace-seq.h
> /usr/lib64/libtraceevent.so
> /usr/lib64/pkgconfig/libtraceevent.pc
> #
>
> With this patch the compile succeeds.
>
> Output after:
> # rm -f test-libtracefs.bin; make test-libtracefs.bin
> gcc -MD -Wall -Werror -o test-libtracefs.bin test-libtracefs.c \
> > test-libtracefs.make.output 2>&1 -I/usr/include/traceevent -ltracefs
> #
Thanks! I test it like this:
Committer testing:
$ make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf-tools -C tools/perf install-bin
Before:
$ cat /tmp/build/perf-tools/feature/test-libtracefs.make.output
In file included from test-libtracefs.c:2:
/usr/include/tracefs/tracefs.h:11:10: fatal error: event-parse.h: No such file or directory
11 | #include <event-parse.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
$
$ grep -i tracefs /tmp/build/perf-tools/FEATURE-DUMP
feature-libtracefs=0
$
After:
$ cat /tmp/build/perf-tools/feature/test-libtracefs.make.output
$
$ grep -i tracefs /tmp/build/perf-tools/FEATURE-DUMP
feature-libtracefs=1
$
Applied to perf-tools, for v6.5.
- Arnaldo
next prev parent reply other threads:[~2023-07-11 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 13:53 [PATCH v2] perf/build: fix broken dependency check for libtracefs Thomas Richter
2023-07-11 16:15 ` Arnaldo Carvalho de Melo [this message]
2023-07-11 16:18 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZK2AISIWZX5GlOZv@kernel.org \
--to=acme@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sumanthk@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).