Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp685055ybb; Wed, 25 Mar 2020 07:42:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/WfCvMytaQAfQ+r0cGdHdskmGZhKa8s3Z5/DWkPIZnzkENflnTqNMFAxgMsvfrbgQsFUG X-Received: by 2002:a9d:65c2:: with SMTP id z2mr2741858oth.40.1585147370830; Wed, 25 Mar 2020 07:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585147370; cv=none; d=google.com; s=arc-20160816; b=MstpxXxt4E1nvtxzDyjoRy/Ud9QT0QpwUJri0STLDBiTxIftc1lNlhuZb83NHP1o4B V+QN/DtD/lIgZwPwZnQibpqU3GBUQFopG7y6nfiq1Fya4/37foKcJPebaWzrffJD7nt7 Q04nQeXEG8dGHwQiIxchCsUDLKH21tME37qwFiBAF5OOvW7H37fyG3rYHrxJJ9NR6rCI pmK2uYIWzJ8GGOz3ZiAoeESDzNFzjqRkCkXP3ixJy0t9zorPOAiTU5ZTg4ldExMLmeKc BdWgEjIJwZfYdyovZLtX+nmypN+4J7sQqTRaMmYvSYIOF72fc0sIcTuzKFGxtWz/uTzM BwZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=h+jKt9bsyXdUzaMhUnmlr3KTPbgwiELllBZem+05Lcg=; b=AYXLXE3gPgzmfpXJ5q1c6ZD21gKUAFDEAC3R6qEkTrKKGJoGqllLG8w5QkVTDGcfVQ PnNfFowvtonEkLszKGS6vyM+P6gu7nnMP5M4pplSWTDk67nLd5idmf8OxsE+zH2m2QJE gUkDY78iAhV6HhNhUkGo7i5ffIp40eQ19T7GFS1sT+G6khxUHbiw3vG1lKTj2obo+uR6 ZFmzPmFkRpjWJsWPyn6PHgrBcrroaZAulaunMPrJfsEIwIKuAWmcUfj/56YfYFL2+gdt yKLlyYXe0ncaQ9pLTruNFRR9o89p4MqPjujEjBMbuznLX1CPeqbMHlM4UQwDkLACi6CT 3zPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qE5Fv4Ps; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w83si10289913oie.244.2020.03.25.07.42.37; Wed, 25 Mar 2020 07:42:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qE5Fv4Ps; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727682AbgCYOks (ORCPT + 99 others); Wed, 25 Mar 2020 10:40:48 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:33753 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727585AbgCYOks (ORCPT ); Wed, 25 Mar 2020 10:40:48 -0400 Received: by mail-io1-f68.google.com with SMTP id o127so2483033iof.0 for ; Wed, 25 Mar 2020 07:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h+jKt9bsyXdUzaMhUnmlr3KTPbgwiELllBZem+05Lcg=; b=qE5Fv4PsuReML5rCkHpkMV03/oHuox48bMzvj8H7upRrKpooGWaFB/moRyV0qbqESR bLsREZaKxPJgaeB7ZJHlu6ZPlQruZ3a0tPwFG0ybn0rod7LFvqXhNCdQSO5/uvgeW78i jKGltVScyifWBmaWO/8vCSAhrnSqwt6XupU6zM6Iznx5+4661kTN2D9JZ03h5G2QJmXN vsH3JYhbKqgOCqInaAr//FNRb59I2PTqxNsBdydqO58U+I0V6Lbz+oS4VjkusPqUMrTb 6uZfyZ+9j/6fD7EGPq2FPH2EL1lvUycHX6CJnPYbxsWOcNpMbhHr+vlmCA7NmS5xatwu Ui5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h+jKt9bsyXdUzaMhUnmlr3KTPbgwiELllBZem+05Lcg=; b=RUjvNIofUK54W4WbOg8DAsAJallbw8HQKKx8CxKDEAVqBz2ZoHT+yPYPy710j/YrZc mYYN20nDttc+yCPz9twyCtKBl8VKETOYwgf5SVHgvYgl2FuhwN8wIJoWiNhfWPAAms3j M3CwVGp16TQy4i1B6ncBkTvPfVhN2NqHdi9ydEH8nL7706yyBbW4P4Bd42yQ+a6GwWQg 5SejDTQiX6nvWA0TRloNGAYZ1l5CMQATc07ufCV1dYrEep40lMPXEpMt4qiTIu9DC1Oc jDXCvlPlryEZn7zFYlh//dYA4KH/zUw/SAG179iuddKisAXH65DSEcwsTTaVn9mdxT72 e17g== X-Gm-Message-State: ANhLgQ0SyPFKuBQSmP7HJWg5x/meB412RHFM5J+UdaEIbrE501SiXDn6 TaMHCw11u0c/hvfXuFHw1sfgWbZKt0dF7mJq1JA= X-Received: by 2002:a05:6638:c:: with SMTP id z12mr3167464jao.117.1585147245883; Wed, 25 Mar 2020 07:40:45 -0700 (PDT) MIME-Version: 1.0 References: <1581618066-187262-1-git-send-email-zhe.he@windriver.com> <20200216222148.GA161771@krava> <8cc46abf-208d-4aa4-8d0d-4922106bee6e@windriver.com> <20200325133012.GC14102@kernel.org> In-Reply-To: <20200325133012.GC14102@kernel.org> From: Sam Lunt Date: Wed, 25 Mar 2020 09:40:34 -0500 Message-ID: Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags To: Arnaldo Carvalho de Melo Cc: He Zhe , Jiri Olsa , peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo wrote: > > Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu: > > > > > > On 2/17/20 6:22 AM, Jiri Olsa wrote: > > > On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote: > > >> From: He Zhe > > >> > > >> Since Python v3.8.0, with the following commit > > >> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"), > > > we got similar change recently.. might have not been picked up yet > > > > > > https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/ > > > > Thanks for pointing out. > > So, just with your patch: > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python > ... libpython: [ OFF ] > Makefile.config:750: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev > CC /tmp/build/perf/tests/python-use.o > [acme@five perf]$ > > [acme@five perf]$ rpm -q python2-devel python3-devel python-devel > package python2-devel is not installed > python3-devel-3.7.6-2.fc31.x86_64 > package python-devel is not installed > [acme@five perf]$ > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython.make.output > /bin/sh: --configdir: command not found > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython > test-libpython.make.output test-libpython-version.make.output > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython-version.make.output > /bin/sh: --configdir: command not found > [acme@five perf]$ > > > Without your patch: > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python > ... libpython: [ on ] > GEN /tmp/build/perf/python/perf.so > MKDIR /tmp/build/perf/scripts/python/Perf-Trace-Util/ > CC /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o > LD /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o > CC /tmp/build/perf/tests/python-use.o > CC /tmp/build/perf/util/scripting-engines/trace-event-python.o > INSTALL python-scripts > [acme@five perf]$ > > [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python > libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007f11dd1ee000) > [acme@five perf]$ perf -vv |& grep -i python > libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT > [acme@five perf]$ > > What am I missing? It looks like you are using python3.7, but the change in behavior for python-config happened in version 3.8 > [acme@five perf]$ cat /etc/redhat-release > Fedora release 31 (Thirty One) > [acme@five perf]$ > > - Arnaldo