From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Guilherme Amadio <amadio@gentoo.org>
Cc: Thorsten Leemhuis <linux@leemhuis.info>,
Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, Ian Rogers <irogers@google.com>
Subject: Re: [PATCH 1/2] perf build: Use pkg-config for feature check for libtrace{event,fs}
Date: Fri, 28 Jun 2024 09:56:48 -0300 [thread overview]
Message-ID: <Zn6zEBgRu1KLVQ1m@x1> (raw)
In-Reply-To: <Zn6P_zAaN7frkjPd@gentoo.org>
On Fri, Jun 28, 2024 at 12:27:11PM +0200, Guilherme Amadio wrote:
> On Fri, Jun 28, 2024 at 09:13:43AM +0200, Thorsten Leemhuis wrote:
> > On 06.06.24 17:33, amadio@gentoo.org wrote:
> > > From: Guilherme Amadio <amadio@gentoo.org>
> > >
> > > Needed to add required include directories for the feature detection
> > > to succeed. The header tracefs.h is installed either into the include
> > > directory /usr/include/tracefs/tracefs.h when using the Makefile, or
> > > into /usr/include/libtracefs/tracefs.h when using meson to build
> > > libtracefs. The header tracefs.h uses #include <event-parse.h> from
> > > libtraceevent, so pkg-config needs to pick the correct include directory
> > > for libtracefs and add the one for libtraceevent to succeed.
> > >
> > > Note that in baa2ca59ec1e31ccbe3f24ff0368152b36f68720 the variable
> > > LIBTRACEEVENT_DIR was introduced, and now the method to compile against
> > > non-standard locations requires PKG_CONFIG_PATH to be set instead, which
> > > works for both libtraceevent and libtracefs.
> > >
> > > Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
> > > Cc: Ian Rogers <irogers@google.com>
> >
> > Since this patch landed in Linux next as 0f0e1f44569061 ("perf build:
> > Use pkg-config for feature check for libtrace{event,fs}") my vanilla
> > -next build using the RPM spec file from Fedora fails. I'm not sure if
> > it causes my problems, but it looks likely.
>
> Thank you for reporting. I think we need to use similar checks in the
> tools/verification/rv/Makefile.config, as it seems the problem comes
> from there:
>
> + pushd tools/verification/rv/
> kernel.spec:3000: build rv
> ... (compile command lines removed)
>
> Auto-detecting system features:
> ... libtraceevent: [ on ]
> ... libtracefs: [ OFF ]
>
> libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
> Makefile.config:46: *** Please, check the errors above.. Stop.
> error: Bad exit status from /var/tmp/rpm-tmp.yNun6A (%build)
>
> I will submit a patch to fix it.
I noticed something related, but in my case the build proceeded, giving
these warings:
Package libtracefs was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtracefs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libtracefs', required by 'virtual:world', not found
Package libtracefs was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtracefs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libtracefs', required by 'virtual:world', not found
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... libbfd: [ on ]
... libbfd-buildid: [ on ]
... libcap: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... libcapstone: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
⬢[acme@toolbox perf-tools-next]$ rpm -qa | grep tracefs
⬢[acme@toolbox perf-tools-next]$ rpm -qa | grep traceevent
libtraceevent-1.7.2-3.fc39.x86_64
libtraceevent-devel-1.7.2-3.fc39.x86_64
⬢[acme@toolbox perf-tools-next]$
- Arnaldo
> Best regards,
> -Guilherme
>
> >
> > A log of a failed build can be found here:
> > https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-x86_64/07670271-next-next-all/builder-live.log.gz
> >
> > The gist:
> > """
> >
> > Auto-detecting system features:
> > ... libtraceevent: [ on ]
> > ... libtracefs: [ OFF ]
> >
> > libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
> > Makefile.config:46: *** Please, check the errors above.. Stop.
> > error: Bad exit status from /var/tmp/rpm-tmp.yNun6A (%build)
> > """
> >
> > But libtracefs-devel is installed and pkgconfig works (output from
> > another machine):
> >
> > $ pkgconf --cflags libtracefs
> > -I/usr/include/tracefs -I/usr/include/traceevent
> >
> > From a *quick* looks it seems those flags are not picked up when
> > building tools/verification/rv/feature/test-libtracefs.bin
> >
> > """
> > + pkg-config --cflags libtraceevent
> > gcc -MD -Wall -Werror -o /home/thl/usr/tmp/linux-next/tools/verification/rv/feature/test-libtracefs.bin test-libtracefs.c -ggdb > /home/thl/usr/tmp/linux-next/tools/verification/rv/feature/test-libtracefs.make.output 2>&1 -I/usr/include/traceevent -ltracefs
> > + gcc -MD -Wall -Werror -o /home/thl/usr/tmp/linux-next/tools/verification/rv/feature/test-libtracefs.bin test-libtracefs.c -ggdb -I/usr/include/traceevent -ltracefs
> > make: *** [Makefile:216: /home/thl/usr/tmp/linux-next/tools/verification/rv/feature/test-libtracefs.bin] Error 1
> > make: Leaving directory '/home/thl/usr/tmp/linux-next/tools/build/feature'
> > """
> >
> > And
> >
> > """
> > $ cat /home/thl/usr/tmp/linux-next/tools/verification/rv/feature/test-libtracefs.make.output
> > test-libtracefs.c:2:10: fatal error: tracefs.h: No such file or directory
> > 2 | #include <tracefs.h>
> > | ^~~~~~~~~~~
> > compilation terminated.
> > """
> >
> > Then I ran out of time looking where it might missing and decided to write
> > this mail instead.
> >
> > Ciao, Thorsten
> >
> >
> > > ---
> > > tools/build/feature/test-libtracefs.c | 2 +-
> > > tools/perf/Makefile.config | 27 +++++++++++++--------------
> > > 2 files changed, 14 insertions(+), 15 deletions(-)
> > >
> > > diff --git a/tools/build/feature/test-libtracefs.c b/tools/build/feature/test-libtracefs.c
> > > index 8eff16c0c10b..29a757a7d848 100644
> > > --- a/tools/build/feature/test-libtracefs.c
> > > +++ b/tools/build/feature/test-libtracefs.c
> > > @@ -1,5 +1,5 @@
> > > // SPDX-License-Identifier: GPL-2.0
> > > -#include <tracefs/tracefs.h>
> > > +#include <tracefs.h>
> > >
> > > [...]
next prev parent reply other threads:[~2024-06-28 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 15:33 amadio
2024-06-06 15:33 ` [PATCH 1/2] perf build: Use pkg-config for feature check for libtrace{event,fs} amadio
2024-06-06 16:28 ` Leo Yan
2024-06-07 12:04 ` Guilherme Amadio
2024-06-08 20:53 ` Leo Yan
2024-06-24 17:50 ` Namhyung Kim
[not found] ` <ZnscQ_nrxWTLHh8k@gentoo.org>
[not found] ` <ZnxpvZE3dX-IwTLy@x1>
2024-06-26 19:19 ` Arnaldo Carvalho de Melo
2024-06-27 15:22 ` Guilherme Amadio
2024-06-28 7:13 ` Thorsten Leemhuis
2024-06-28 10:27 ` Guilherme Amadio
2024-06-28 12:56 ` Arnaldo Carvalho de Melo [this message]
2024-06-06 15:33 ` [PATCH 2/2] perf build: Ensure libtraceevent and libtracefs versions have 3 components amadio
2024-06-06 16:37 ` Leo Yan
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=Zn6zEBgRu1KLVQ1m@x1 \
--to=acme@kernel.org \
--cc=amadio@gentoo.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=namhyung@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.