All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@arm.com>
Cc: "Jaroslav Škarvada" <jskarvad@redhat.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Ian Rogers" <irogers@google.com>, "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: [FYI][PATCH 1/1] tools build: Remove needless libpython-version feature check that breaks test-all fast path
Date: Tue, 30 Nov 2021 11:33:01 -0300	[thread overview]
Message-ID: <YaY2HSVLmY9XZofB@kernel.org> (raw)
In-Reply-To: <4df4b76a-fbb5-89d8-fbef-fa844d8c1d3b@arm.com>

Em Tue, Nov 30, 2021 at 02:18:54PM +0000, James Clark escreveu:
> 
> 
> On 30/11/2021 13:26, Arnaldo Carvalho de Melo wrote:
> > Since 66dfdff03d196e51 ("perf tools: Add Python 3 support") we don't use
> > the tools/build/feature/test-libpython-version.c version in any Makefile
> > feature check:
> > 
> >   $ find tools/ -type f | xargs grep feature-libpython-version
> >   $
> > 
> > The only place where this was used was removed in 66dfdff03d196e51:
> > 
> >   -        ifneq ($(feature-libpython-version), 1)
> >   -          $(warning Python 3 is not yet supported; please set)
> >   -          $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
> >   -          $(warning If you also have Python 2 installed, then)
> >   -          $(warning try something like:)
> >   -          $(warning $(and ,))
> >   -          $(warning $(and ,)  make PYTHON=python2)
> >   -          $(warning $(and ,))
> >   -          $(warning Otherwise, disable Python support entirely:)
> >   -          $(warning $(and ,))
> >   -          $(warning $(and ,)  make NO_LIBPYTHON=1)
> >   -          $(warning $(and ,))
> >   -          $(error   $(and ,))
> >   -        else
> >   -          LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
> >   -          EXTLIBS += $(PYTHON_EMBED_LIBADD)
> >   -          LANG_BINDINGS += $(obj-perf)python/perf.so
> >   -          $(call detected,CONFIG_LIBPYTHON)
> >   -        endif
> > 
> > And nowadays we either build with PYTHON=python3 or just install the
> > python3 devel packages and perf will build against it.
> 
> I just tried this and found a combo that doesn't work and fails with this
> error (unrelated to this change): 
> 
>   Makefile.config:812: No 'python-config' tool was found: disables Python support - please install python-devel/python-dev
> 
> The combo is when the python2 runtime is installed, but the python3 devtools
> are installed. I didn't realise this when I added the python 3 autodetection,
> I only fixed the issue for a system that was solely python3.
> 
> Do you think I should fix this? Currently the workaround is PYTHON=python3,
> maybe it's enough of an edge case that it's ok?

We have a workaround, so perhaps you can just send a patch improving the
warning about python-config, suggesting to maybe using PYTHON=python3 on
the make command line?

But I won't complain if you want to provide something better :-)

> Reviewed-by: James Clark <james.clark@arm.com>

Thanks, adding it to the patch,

Regards,

- Arnaldo

      reply	other threads:[~2021-11-30 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 13:26 [FYI][PATCH 1/1] tools build: Remove needless libpython-version feature check that breaks test-all fast path Arnaldo Carvalho de Melo
2021-11-30 14:18 ` James Clark
2021-11-30 14:33   ` Arnaldo Carvalho de Melo [this message]

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=YaY2HSVLmY9XZofB@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=jskarvad@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.