Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Arnaldo Melo <arnaldo.melo@gmail.com>
To: Sasha Levin <sashal@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org,
	Namhyung Kim <namhyung@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nsc@kernel.org>,
	linux-kbuild@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/6] tools: build perf in tools_build
Date: Thu, 15 Oct 2026 19:35:50 -0300	[thread overview]
Message-ID: <C62E88C6-52AF-4F68-95FC-310A84DDF8FC@gmail.com> (raw)
In-Reply-To: <atEo6aIQbgww4G0y@laps>



On October 15, 2026 4:26:33 PM GMT-03:00, Sasha Levin <sashal@kernel.org> 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.

I see. It's unfortunate as the end result will not be that useful, as it will not be testing what people use.

Maybe use make MINIMAL=1 when doing cross builds? 

I think we can make this easier for you somehow, like disabling libtraceevent when not available instead of asking for it to be explicitly  opted out?

>> 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.

I'll fix that, make_minimal wasn't updated when libtraceevent was made optimal, IIRC when it was removed from the kernel sources 

> 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.

Sure, for your use case it makes sense.

- Arnaldo

  parent reply	other threads:[~2026-10-15 22:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 23:36 [RFC PATCH 0/6] kbuild: build the userspace tools in tools/ with the kernel Sasha Levin
2026-10-11 23:36 ` [RFC PATCH 1/6] kbuild: factor the userspace ABI flags out into KBUILD_USERABI Sasha Levin
2026-10-13 20:31   ` Thomas Weißschuh
2026-10-11 23:36 ` [RFC PATCH 2/6] kbuild: add "make tools_build" to build userspace tools from tools/ Sasha Levin
2026-10-13 20:38   ` Thomas Weißschuh
2026-10-15 18:52     ` Sasha Levin
2026-10-11 23:36 ` [RFC PATCH 3/6] tools: build perf in tools_build Sasha Levin
2026-10-12 22:07   ` Ian Rogers
2026-10-13 17:08     ` Sasha Levin
2026-10-13 20:21       ` Arnaldo Carvalho de Melo
2026-10-15 19:26         ` Sasha Levin
2026-10-15 21:26           ` Ian Rogers
2026-10-15 22:35           ` Arnaldo Melo [this message]
2026-10-11 23:36 ` [RFC PATCH 4/6] tools: build kernel selftests " Sasha Levin
2026-10-13 19:29   ` Shuah Khan
2026-10-13 20:41   ` Thomas Weißschuh
2026-10-11 23:36 ` [RFC PATCH 5/6] kbuild: build the tools selected in tools/Kconfig as part of "make all" Sasha Levin
2026-10-11 23:36 ` [RFC PATCH 6/6] Documentation: describe building tools with the kernel Sasha Levin

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=C62E88C6-52AF-4F68-95FC-310A84DDF8FC@gmail.com \
    --to=arnaldo.melo@gmail.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=sashal@kernel.org \
    --cc=shuah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox