* [PATCH 0/2] perf build: Ubuntu LTS fixes
@ 2025-10-16 12:44 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
0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2025-10-16 12:44 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter
Cc: linux-perf-users, linux-kernel, Geert Uytterhoeven
Hi all,
This patch series is the result of getting "make tools/perf" working on
Ubuntu 24.04.3 LTS.
There was one remaining issue, which I could fix manually, but I don't
know a good way to auto-suggest this to the user when needed.
Initially, I was greeted with:
Makefile.config:1161: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-latest-openjdk-devel
However, installing openjdk-8-jdk (or the latest version) did not help.
Apparently tools/perf/Makefile.config sets JDIR to the first Java
environment found. Hence if a Java environment was already installed,
but it is not a full environment (e.g. just openjdk-21-jre) and lacks
the <jvmti.h> header file, the build always fails. Only installing the
matching full jdk version (i.e. openjdk-21-jdk in my case) can fix that.
Thanks for your comments!
Geert Uytterhoeven (2):
perf build: Fix confusing "No python interpreter needed" message
perf build: Add Debian/Ubuntu python-is-python3
tools/perf/Makefile.config | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] perf build: Fix confusing "No python interpreter needed" message
2025-10-16 12:44 [PATCH 0/2] perf build: Ubuntu LTS fixes Geert Uytterhoeven
@ 2025-10-16 12:44 ` Geert Uytterhoeven
2025-10-16 12:44 ` [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3 Geert Uytterhoeven
1 sibling, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2025-10-16 12:44 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter
Cc: linux-perf-users, linux-kernel, Geert Uytterhoeven
When python is not installed, the error message sounds like python is
not a dependency, while it is. Reword to make this clear.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
tools/perf/Makefile.config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 5700516aa84aec2c..a6448a804ee53a36 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -915,7 +915,7 @@ endif
ifneq ($(NO_JEVENTS),1)
NO_JEVENTS := 0
ifndef PYTHON
- $(error ERROR: No python interpreter needed for jevents generation. Install python or build with NO_JEVENTS=1.)
+ $(error ERROR: No python interpreter found for jevents generation. Install python or build with NO_JEVENTS=1.)
else
# jevents.py uses f-strings present in Python 3.6 released in Dec. 2016.
JEVENTS_PYTHON_GOOD := $(shell $(PYTHON) -c 'import sys;print("1" if(sys.version_info.major >= 3 and sys.version_info.minor >= 6) else "0")' 2> /dev/null)
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
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 ` Geert Uytterhoeven
2025-10-17 12:29 ` Leo Yan
1 sibling, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2025-10-16 12:44 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter
Cc: linux-perf-users, linux-kernel, Geert Uytterhoeven
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.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
tools/perf/Makefile.config | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index a6448a804ee53a36..b37149afdb1d27ba 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -872,7 +872,7 @@ ifdef NO_LIBPYTHON
else
ifndef PYTHON
- $(call disable-python,No python interpreter was found: disables Python support - please install python-devel/python-dev)
+ $(call disable-python,No python interpreter was found: disables Python support - please install python-devel/python-dev/python-dev-is-python3)
else
PYTHON_WORD := $(call shell-wordify,$(PYTHON))
@@ -915,7 +915,7 @@ endif
ifneq ($(NO_JEVENTS),1)
NO_JEVENTS := 0
ifndef PYTHON
- $(error ERROR: No python interpreter found for jevents generation. Install python or build with NO_JEVENTS=1.)
+ $(error ERROR: No python interpreter found for jevents generation. Install python/python-is-python3 or build with NO_JEVENTS=1.)
else
# jevents.py uses f-strings present in Python 3.6 released in Dec. 2016.
JEVENTS_PYTHON_GOOD := $(shell $(PYTHON) -c 'import sys;print("1" if(sys.version_info.major >= 3 and sys.version_info.minor >= 6) else "0")' 2> /dev/null)
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
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
0 siblings, 1 reply; 9+ messages in thread
From: Leo Yan @ 2025-10-17 12:29 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel
Hi Geert,
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.
Thanks,
Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Makefile.config?//h=v6.18-rc1#n302
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
2025-10-17 12:29 ` Leo Yan
@ 2025-10-17 16:39 ` Geert Uytterhoeven
2025-10-19 2:49 ` Namhyung Kim
0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2025-10-17 16:39 UTC (permalink / raw)
To: Leo Yan
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel
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!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
2025-10-17 16:39 ` Geert Uytterhoeven
@ 2025-10-19 2:49 ` Namhyung Kim
2025-10-20 9:31 ` Leo Yan
0 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2025-10-19 2:49 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, linux-perf-users, linux-kernel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
2025-10-19 2:49 ` Namhyung Kim
@ 2025-10-20 9:31 ` Leo Yan
2025-10-20 10:15 ` Geert Uytterhoeven
0 siblings, 1 reply; 9+ messages in thread
From: Leo Yan @ 2025-10-20 9:31 UTC (permalink / raw)
To: Namhyung Kim
Cc: Geert Uytterhoeven, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Ian Rogers, Adrian Hunter, linux-perf-users,
linux-kernel
On Sun, Oct 19, 2025 at 11:49:56AM +0900, Namhyung Kim wrote:
[...]
> > 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?
Can we explicitly suggest that developers install python3-devel or
python3-dev instead? Two reasons:
- python-dev-is-python3 is specific to Ubuntu/Debian; some distros do
not provide this package and even advocate against using unversioned
"/usr/bin/python" shebangs [1].
- As Namhyung mentioned, perf has removed Python 2 support (at least
this is claimed), it is straightforward to install only the Python3
packages.
[...]
> 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.
I agreed with only checking python3 - neat and compatible for distros.
Just note, some legacy python shebangs are left, we can update to
"#!/usr/bin/env python3" but this can be done separately.
$ git grep "#\!.*/usr/bin.*python"
python/tracepoint.py:#! /usr/bin/env python
python/twatch.py:#! /usr/bin/env python
scripts/python/export-to-postgresql.py:# #!/usr/bin/python2
scripts/python/exported-sql-viewer.py:#!/usr/bin/env python
scripts/python/libxed.py:#!/usr/bin/env python
tests/shell/lib/perf_json_output_lint.py:#!/usr/bin/python
Thanks,
Leo
[1] https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package#Motivation
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
2025-10-20 9:31 ` Leo Yan
@ 2025-10-20 10:15 ` Geert Uytterhoeven
2025-10-20 11:05 ` Leo Yan
0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2025-10-20 10:15 UTC (permalink / raw)
To: Leo Yan
Cc: Namhyung Kim, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Ian Rogers, Adrian Hunter, linux-perf-users,
linux-kernel
Hi Leo,
On Mon, 20 Oct 2025 at 11:31, Leo Yan <leo.yan@arm.com> wrote:
> On Sun, Oct 19, 2025 at 11:49:56AM +0900, Namhyung Kim wrote:
> > > 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?
>
> Can we explicitly suggest that developers install python3-devel or
> python3-dev instead? Two reasons:
>
> - python-dev-is-python3 is specific to Ubuntu/Debian; some distros do
> not provide this package and even advocate against using unversioned
> "/usr/bin/python" shebangs [1].
>
> - As Namhyung mentioned, perf has removed Python 2 support (at least
> this is claimed), it is straightforward to install only the Python3
> packages.
Suggesting python3-dev sounds good to me.
None of the two checks:
ifndef PYTHON
$(call disable-python,No python interpreter was found: disables
Python support - please install python-devel/python-dev)
ifndef PYTHON
$(error ERROR: No python interpreter found for jevents
generation. Install python or build with NO_JEVENTS=1.)
seem to be about the python interpreter anyway, but about the python
development environment.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
2025-10-20 10:15 ` Geert Uytterhoeven
@ 2025-10-20 11:05 ` Leo Yan
0 siblings, 0 replies; 9+ messages in thread
From: Leo Yan @ 2025-10-20 11:05 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Namhyung Kim, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Ian Rogers, Adrian Hunter, linux-perf-users,
linux-kernel
Hi Geert,
On Mon, Oct 20, 2025 at 12:15:22PM +0200, Geert Uytterhoeven wrote:
[...]
> > Can we explicitly suggest that developers install python3-devel or
> > python3-dev instead? Two reasons:
> >
> > - python-dev-is-python3 is specific to Ubuntu/Debian; some distros do
> > not provide this package and even advocate against using unversioned
> > "/usr/bin/python" shebangs [1].
> >
> > - As Namhyung mentioned, perf has removed Python 2 support (at least
> > this is claimed), it is straightforward to install only the Python3
> > packages.
>
> Suggesting python3-dev sounds good to me.
It is good to mention both python3-devel / python3-dev (one is for Fedora
and another is for Debian/Ubuntu). Sorry for confusion.
> None of the two checks:
>
> ifndef PYTHON
> $(call disable-python,No python interpreter was found: disables
> Python support - please install python-devel/python-dev)
>
> ifndef PYTHON
> $(error ERROR: No python interpreter found for jevents
> generation. Install python or build with NO_JEVENTS=1.)
>
> seem to be about the python interpreter anyway, but about the python
> development environment.
Either is fine for me.
Thanks,
Leo
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-10-20 11:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-10-20 9:31 ` Leo Yan
2025-10-20 10:15 ` Geert Uytterhoeven
2025-10-20 11:05 ` Leo Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).