Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3

From: Geert Uytterhoeven
Date: Fri Oct 17 2025 - 12:47:42 EST


Hi Leo,

On Fri, 17 Oct 2025 at 14:29, Leo Yan <leo.yan@xxxxxxx> wrote:
> On Thu, Oct 16, 2025 at 02:44:12PM +0200, Geert Uytterhoeven wrote:
> > The build looks for "python" and "python-config", while modern
> > distributions provide only "python3" and "python3-config" by default.
> > Suggest installing "python-is-python3" and "python-dev-is-python3", as
> > available on Debian 11 (bullseye) and Ubuntu 20.04 LTS (focal) and
> > later.
>
> Seems to me, this change is not necessary. The Makefile [1] searches
> python[2|3]/python[2|3]-cofig if un-versioned executables are not found.
>
> I confirmed that I can build successfully without installation
> python-dev-is-python3 package.

$ sudo apt remove python-dev-is-python3 python-is-python3
$ make tools/perf

Indeed, it still works. I am quite sure I had to install both, and
even verified that uninstalling them again broke the build again before
creating my patch.

/me dives deeper.

Aha, I found it. After uninstalling python3-dev, I got into the same
state as yesterday:

$ make tools/perf
[...]
Makefile.config:875: No python interpreter was found: disables
Python support - please install python-devel/python-dev
Makefile.config:918: *** ERROR: No python interpreter needed for
jevents generation. Install python or build with NO_JEVENTS=1.. Stop.

So these error messages sound like python is missing. And "python"
is indeed missing, but "python3" is available.
Hence I installed python-is-python3, but that turned out not to be
sufficient.
Hence I also installed python-dev-is-python3, and that fixed the issue,
as python-dev-is-python3 depends on python3-dev, so the latter was
installed, too.

After removing python-is-python3 and python-dev-is-python3, everything
keeps on working. But if you never installed python3-dev manually,
and run "sudo apt autoremove", python3-dev is uninstalled, reintroducing
the issue.

So just recomming to install python-dev-is-python3 in the error
message should be sufficient?

What do you think?
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds