From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/1] tools build: Fix rust feature detection
Date: Tue, 10 Feb 2026 17:54:24 -0300 [thread overview]
Message-ID: <aYubAAZ10CfYsmZx@x1> (raw)
In-Reply-To: <hox364wgs57bv7hvscvvtbkl5yerur55iz7un3gsu3ozpbnba5@haqvngx6jy4n>
On Tue, Feb 10, 2026 at 09:16:18PM +0100, Dmitry Dolgov wrote:
> > On Tue, Feb 10, 2026 at 09:26:22AM -0300, Arnaldo Carvalho de Melo wrote:
> > I tried here building it with rust installed, it detected, ok, then I
> > removed and tried to rebuild, it still thinks rust is there:
> > [...]
> > I.e. it doesn't rebuild perf and thus doesn't notice that it doesn't
> > have what is needed, if I touch some other file and thus it triggers a
> > rebuild, it still manages to build it...
> Yeah, looks like the problem is due to rust not adding any actual depedencies
> into the dep-info file, when compiling the feature test file:
> /perf/feature/test-rust.d: test-rust.rs
> /perf/feature/test-rust.bin: test-rust.rs
> test-rust.rs:
> To fix that I've tried to add an extra dependency on the rust binary on top of
> that after the compilation is finished. While hacky, it worked just fine, and
> perf catched it when rust was removed. Haven't faced any issues after few
> rounds of installing/removing rust either. If this approach sound fine, I can
> post the patch tomorrow.
Looks hacky, can't we just try to run:
⬢ [acme@toolbx linux]$ HAVE_RUST=$(rustc --version > /dev/null ; echo $?)
⬢ [acme@toolbx linux]$ echo $HAVE_RUST
0
⬢ [acme@toolbx linux]$ HAVE_RUST=$(arustc --version > /dev/null ; echo $?)
bash: arustc: command not found
⬢ [acme@toolbx linux]$ echo $HAVE_RUST
127
⬢ [acme@toolbx linux]$
How would your dep on the rust binary work? where would you expect it to
be? It may be installed on some different path, etc.
Perhaps there is precedent with some other component...
- Arnaldo
next prev parent reply other threads:[~2026-02-10 20:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 17:27 [PATCH 1/1] tools build: Fix rust feature detection Arnaldo Carvalho de Melo
2026-02-10 10:02 ` Dmitry Dolgov
2026-02-10 11:55 ` Arnaldo Carvalho de Melo
2026-02-10 12:26 ` Arnaldo Carvalho de Melo
2026-02-10 20:16 ` Dmitry Dolgov
2026-02-10 20:54 ` Arnaldo Carvalho de Melo [this message]
2026-02-10 21:07 ` Dmitry Dolgov
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=aYubAAZ10CfYsmZx@x1 \
--to=acme@kernel.org \
--cc=9erthalion6@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox