The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Leo Yan <leo.yan@arm.com>, Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
Date: Sun, 19 Oct 2025 11:49:56 +0900	[thread overview]
Message-ID: <aPRR1APPW8vro4HB@google.com> (raw)
In-Reply-To: <CAMuHMdUUH2AN7tE3C7cPWeNJDW6jL9vQOktaRDW2HChDwvroSg@mail.gmail.com>

Hello,

On Fri, Oct 17, 2025 at 06:39:04PM +0200, Geert Uytterhoeven wrote:
> Hi Leo,
> 
> On Fri, 17 Oct 2025 at 14:29, Leo Yan <leo.yan@arm.com> 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!

Thanks for looking at the issue.

I think the code was to deal with either python2 or python3 in the past
and we removed python2 support recently.  I don't know if any distro
made 'python' to refer python3 and removed 'python3' otherwise we can
just check python3.

Thanks,
Namhyung


  reply	other threads:[~2025-10-19  2:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 12:44 [PATCH 0/2] perf build: Ubuntu LTS fixes Geert Uytterhoeven
2025-10-16 12:44 ` [PATCH 1/2] perf build: Fix confusing "No python interpreter needed" message Geert Uytterhoeven
2025-10-16 12:44 ` [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3 Geert Uytterhoeven
2025-10-17 12:29   ` Leo Yan
2025-10-17 16:39     ` Geert Uytterhoeven
2025-10-19  2:49       ` Namhyung Kim [this message]
2025-10-20  9:31         ` Leo Yan
2025-10-20 10:15           ` Geert Uytterhoeven
2025-10-20 11:05             ` Leo Yan

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=aPRR1APPW8vro4HB@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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