[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fVHtt41ifoWxr7ifd6FSosfhaxRFEJ_ez4KHT3wUQd5Kw@mail.gmail.com>
Date: Tue, 14 Jun 2022 20:13:36 -0700
From: Ian Rogers <irogers@...gle.com>
To: John Garry <john.garry@...wei.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Felix Fietkau <nbd@....name>, Qi Liu <liuqi115@...wei.com>,
Like Xu <likexu@...cent.com>, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org,
Nick Forrington <nick.forrington@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
James Clark <james.clark@....com>,
Andrew Kilroy <andrew.kilroy@....com>,
"Paul A . Clarke" <pc@...ibm.com>, Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
ananth.narayan@....com, ravi.bangoria@....com,
santosh.shukla@....com, sandipan.das@....com,
Caleb Biggers <caleb.biggers@...el.com>,
Perry Taylor <perry.taylor@...el.com>,
Kshipra Bopardikar <kshipra.bopardikar@...el.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 0/3] Rewrite jevents program in python
On Tue, Jun 14, 2022 at 9:10 AM John Garry <john.garry@...wei.com> wrote:
>
> On 14/06/2022 17:03, Ian Rogers wrote:
> >> diff -u tools/perf/trace/beauty/include/linux/socket.h
> >> include/linux/socket.h
> >> Makefile.config:259: *** which python-config not found. Stop.
> >> Makefile.perf:239: recipe for target 'sub-make' failed
> >> make[1]: *** [sub-make] Error 2
> >> Makefile:69: recipe for target 'all' failed
> >> make: *** [all] Error 2
> >> john@...ian:~/linux/tools/perf$
> >>
> >> JFYI, this is my alternatives:
> >>
> >> sudo update-alternatives --config python
> >> There are 3 choices for the alternative python (providing
> >> /usr/bin/python).
> >>
> >> Selection Path Priority Status
> >> ------------------------------------------------------------
> >> 0 /usr/local/bin/python3.6 50 auto mode
> >> 1 /usr/bin/python2.7 1 manual mode
> >> 2 /usr/bin/python3.5 2 manual mode
> >> * 3 /usr/local/bin/python3.6 50 manual mode
> >>
> >> Press <enter> to keep the current choice[*], or type selection number:
> > Thanks Gary,
> >
> > Perhaps it relates to dev packages. Perhaps, apt-get install
> > python-dev-is-python3 which should resolve the symlinks. I wonder that
> > you have python dev for python2 but python3 installed without the dev.
> > We should be able to make a Makefile test for this.
>
> So I was trying another system here as a sanity test (as my main dev box
> is not working either). And this other system is debian and only
> supports python up to 3.5, so that is why I have
> /usr/local/bin/python3.6 as an alt, i.e. I downloaded and built myself.
>
> Anyway, I do have python3-dev:
>
> john@...ian:~/linux/tools/perf$ sudo apt-get install python3-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> python3-dev is already the newest version (3.5.3-1).
>
It turned out to be something simple. The build is set up to prefer
python2 over python3, so if you have both you get python2. I've fixed
this now in v4 (PTAL):
https://lore.kernel.org/lkml/20220615030438.51477-1-irogers@google.com/
I think we should remove python2 build support as it is confusing and
python2 doesn't support setuptools meaning this patch fails:
https://lore.kernel.org/lkml/20220615014206.26651-1-irogers@google.com/
and without that patch python3 generates deprecated module warnings.
Thanks,
Ian
Powered by blists - more mailing lists