On Thu, Oct 15, 2026 at 12:26 PM Sasha Levin <[email protected]> wrote:
>
> On Tue, Oct 13, 2026 at 05:21:25PM -0300, Arnaldo Carvalho de Melo wrote:
> >Why is that difficult to run:
> >
> >make -C tools/perf install-build-deps
> >
> >To do a recommended perf build deps install?
> >
> >That would be useful as it is what we expect users to do.
>
> That's what users do, but it wants to install packages.
>
> We need a path for unprivileged builds on bots and CI machines that can't
> install packages, and many of those builds are cross builds, where perf needs
> the target's libelf and libtraceevent rather than the host's.
>
> >If that is too difficult, for some reason, there is a minimal build in
> >tools/perf/tests/make, that is tested since forever:
> >
> ># all the NO_* variable combined
> >make_minimal        := NO_PYTHON_MODULE=1
> >make_minimal        += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
> >make_minimal        += NO_LIBNUMA=1 NO_LIBBIONIC=1 NO_LIBDW=1
> >make_minimal        += NO_LIBBPF=1
> >make_minimal        += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
> >make_minimal        += NO_CAPSTONE=1
>
> I tried make_minimal on perf-tools-next. It still requires libtraceevent, so 
> an
> arm64 cross build without the arm64 libtraceevent installed stops at that
> check. With NO_LIBTRACEEVENT=1 added, it then fails building the Rust test
> workload. Natively it still enables aio, libLLVM, libslang, libtraceevent,
> lzma, zlib and Rust when they are installed, so the result depends on the
> machine.
>
> I'd like to go with Ian's suggestion then: a MINIMAL=1 knob in perf that turns
> off every optional feature, which tests/make can use for make_minimal as well.

I can put a patch together for that. Just for discussion, I did do
some work to break perf dependencies with libraries using dlopen/dlsym
like:
https://lore.kernel.org/linux-perf-users/[email protected]/
An area of controbversy with this approach is that it is still nice to
use the header files for the library as library authors are bad and
will do things like change function APIs over time. If the build uses
the header files, why use dlopen when you can just link against the
library? I could imagine using dlopen/dlsym for libtraceevent, but it
would end up repeating this header file and library argument.

Thanks,
Ian

> --
> Thanks,
> Sasha

Reply via email to