Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Charlie Jenkins <thecharlesjenkins@gmail.com>
To: Bastien Curutchet <bastien.curutchet@bootlin.com>
Cc: buildroot@buildroot.org, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH] packages/linux-tools: perf: explicitily disable rust if not selected
Date: Wed, 7 Oct 2026 04:07:17 -0700	[thread overview]
Message-ID: <asYn5Z6J9aX3h1tS@blinky> (raw)
In-Reply-To: <20260727-perf-fix-v1-1-6bffb9146263@bootlin.com>

On Mon, Jul 27, 2026 at 03:03:46PM +0200, Bastien Curutchet via buildroot wrote:
> Since kernel v7.0, perf uses `rustc --version` to know whether or not
> rust is available. If rust is installed on the host, this `rustc
> --version` works fine but then the perf build fails with following error
> (on aarch64) if the host-rust isn't selected:
> 
> rustc  /home/bastien/embedded-linux-imx93-frdm-labs/integration/buildroot/output/build/linux-7.1.3/tools/perf/tests/workloads/code_with_type.a
> error[E0463]: can't find crate for `std`
>   |
>   = note: the `aarch64-unknown-linux-gnu` target may not be installed
>   = help: consider downloading the target with `rustup target add aarch64-unknown-linux-gnu`
> 
> error: aborting due to 1 previous error
> 
> Add a dependency to host-rustc if already enabled, explicitily disable
> perf's rust part otherwise
> 
> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
> ---
>  package/linux-tools/linux-tool-perf.mk.in | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
> index 3238948d76..9718d83121 100644
> --- a/package/linux-tools/linux-tool-perf.mk.in
> +++ b/package/linux-tools/linux-tool-perf.mk.in
> @@ -134,6 +134,12 @@ else
>  PERF_MAKE_FLAGS += NO_LIBTRACEEVENT=1
>  endif
>  
> +ifeq ($(BR2_PACKAGE_HOST_RUSTC),y)
> +PERF_DEPENDENCIES += host-rustc

Even with this dependency I am still getting the std error. I am
building for riscv64. Does this resolve for you?

There is the Kconfig BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3,
maybe instead of depending on RUSTC when enabled should this introduce
an option similar to the python option?

Rust is also only being used by a linux perf test case so it's not
really even needed for regular perf usage.

- Charlie

> +else
> +PERF_MAKE_FLAGS += NO_RUST=1
> +endif
> +
>  # We really do not want to build the perf documentation, because it
>  # has stringent requirement on the documentation generation tools,
>  # like xmlto and asciidoc), which may be lagging behind on some
> 
> ---
> base-commit: cdeeb9b9c688b5bcdcc80bf89f2c046b0bd55bb8
> change-id: 20260724-perf-fix-f14d1c7fb681
> 
> Best regards,
> -- 
> Bastien Curutchet <bastien.curutchet@bootlin.com>
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-10-07 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 13:03 [Buildroot] [PATCH] packages/linux-tools: perf: explicitily disable rust if not selected Bastien Curutchet via buildroot
2026-10-07 11:07 ` Charlie Jenkins [this message]
2026-10-07 13:36   ` Bastien Curutchet via buildroot
2026-10-08  6:22     ` Fengwei Tan

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=asYn5Z6J9aX3h1tS@blinky \
    --to=thecharlesjenkins@gmail.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.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