All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Guilherme Amadio <amadio@gentoo.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-perf-users@x1
Subject: Re: [PATCH 1/2] perf build: Use pkg-config for feature check for libtrace{event,fs}
Date: Wed, 26 Jun 2024 16:19:57 -0300	[thread overview]
Message-ID: <Znxp3bpc-5tvaa3m@x1> (raw)
In-Reply-To: <ZnxpvZE3dX-IwTLy@x1>

Sorry, forgot to CC the mailing lists.

On Wed, Jun 26, 2024 at 04:19:29PM -0300, Arnaldo Carvalho de Melo wrote:
> On Tue, Jun 25, 2024 at 09:36:35PM +0200, Guilherme Amadio wrote:
> > On Mon, Jun 24, 2024 at 10:50:56AM -0700, Namhyung Kim wrote:
> > > On Thu, 06 Jun 2024 17:33:01 +0200, amadio@gentoo.org wrote:
> > > 
> > > > 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.
> > > > 
> > > > [...]
> > > 
> > > Applied both to perf-tools-next, thanks!
> > 
> > Thank you very much!
> 
> So now when we don't libtracefs installed we get (with current
> perf-tools-next):
> 
> ⬢[acme@toolbox perf-tools-next]$ m
> make: Entering directory '/home/acme/git/perf-tools-next/tools/perf'
>   BUILD:   Doing 'make -j28' parallel build
>   HOSTCC  /tmp/build/perf-tools-next/fixdep.o
>   HOSTLD  /tmp/build/perf-tools-next/fixdep-in.o
>   LINK    /tmp/build/perf-tools-next/fixdep
> Warning: Kernel ABI header differences:
>   diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
>   diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
>   diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h
>   diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
>   diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
>   diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
>   diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
>   diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
>   diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
>   diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
>   diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
>   diff -u tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h arch/x86/include/asm/irq_vectors.h
>   diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
>   diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h
>   diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi/linux/prctl.h
>   diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/linux/stat.h
> 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  ]
> 
>   GEN     /tmp/build/perf-tools-next/common-cmds.h
>   GEN     /tmp/build/perf-tools-next/arch/arm64/include/generated/asm/sysreg-defs.h
> 
> Which is a new behaviour, we never had those kinds of warnings from
> pkg-config, and when something wasn´t available we would reflect that
> somehow in the "Auto-detecting system features", additionally telling
> the users which set of features would not be available due to some
> system component not being available.
> 
> Further more we would suggest the name of the package to install.
> 
> Now I have this "virtual:world" thing that I never heard about (what is
> that)?
> 
> Ditto for PKG_CONFIG_PATH, I probably guess what this is about, but then
> it is a novelty for people with just enough muscle memory to build the
> kernel, build perf and use it.
> 
> If I try:
> 
> $ sudo dnf install libtracefs
> 
> Cool:
> 
> Installed:
>   libtracefs-1.6.4-3.fc39.x86_64                                                                                                                                                               
> 
> Complete!
> $
> 
> but then when I try to build perf again I get those warnings again, but
> a full build neverthless:
> 
> 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
> 
> Its only when I try:
> 
> $ sudo dnf install libtracefs-devel
> 
> That I get a build without warnings.
> 
> So, what is the feature detection that is failing when libtracefs-devel
> isn't installed? What are the features that we lose in such a situation?
> 
> - Arnaldo

  parent reply	other threads:[~2024-06-26 19:20 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 [this message]
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
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=Znxp3bpc-5tvaa3m@x1 \
    --to=acme@kernel.org \
    --cc=amadio@gentoo.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@x1 \
    --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.