Skip to contentSkip to conversation

packages/linux-tools: perf: explicitily disable rust

PATCH Superseded Bastien Curutchet via buildroot 2 participants 3 messages Oct 12 – Oct 15

lore
Share & tools
lore
#1 lore raw
In reply to Bastien Curutchet via buildroot

Hi Bastien,

Quoted 13 lines · Bastien Curutchet

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

Quoted 7 lines

In perf, rust is only used by one file of the test suite (tools/perf/tests/workloads/code_with_type.rs) so we can safely disable it.

Always use the NO_RUST flag to build perf.

I couldn't find this patch on either lore.kernel.org or patchwork.buildroot.org, though.

Perhaps you could try resending it?

Best regards,
Fengwei Tan

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#0 lore raw

PATCH v2 1/1 packages/linux-tools: perf: explicitily disable rust

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

In perf, rust is only used by one file of the test suite (tools/perf/tests/workloads/code_with_type.rs) so we can safely disable it.

Always use the NO_RUST flag to build perf.

---
Changes in v2:
- Always call NO_RUST=1
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 package/linux-tools/linux-tool-perf.mk.in | 1 +
 1 file changed, 1 insertion(+)
package/linux-tools/linux-tool-perf.mk.in +1 -0
index 3238948d76..8c91c2cc6b 100644
@@ -29,6 +29,7 @@ PERF_MAKE_FLAGS = \
 	NO_LIBPERL=1 \
 	NO_LIBPYTHON=1 \
 	NO_LIBBIONIC=1 \
+	NO_RUST=1 \
 	NO_SHELLCHECK=1
 
 # We need to pass an argument to ld for setting the emulation when

---
base-commit: e17cfc9b3b728059d97f9f8c4d890b4444125d1e
change-id: 20260724-perf-fix-f14d1c7fb681

Best regards,

Signature · 6 lines
Bastien Curutchet <[email protected]>

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Fengwei Tan

Hi Fengwei

Quoted 20 lines · Fengwei Tan

Hi Bastien,

Quoted 17 lines · Bastien Curutchet

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

In perf, rust is only used by one file of the test suite (tools/perf/tests/workloads/code_with_type.rs) so we can safely disable it.

Quoted 9 lines
Quoted 3 lines

Always use the NO_RUST flag to build perf.

I couldn't find this patch on either lore.kernel.org or patchwork.buildroot.org, though.

Perhaps you could try resending it?

Thanks for telling me, my mail supplier had an issue on tuesday. I just resent it.

Best regards,
Bastien
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot