Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1199133ybb; Wed, 25 Mar 2020 18:08:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvTIFnpaAnYckalXh4sxodLSqC1fYsWTY7Vcs7kZ2ZfI1E/UP2Eq3qWc/AXpk85UnK7cmOx X-Received: by 2002:aca:d985:: with SMTP id q127mr229393oig.132.1585184910727; Wed, 25 Mar 2020 18:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585184910; cv=none; d=google.com; s=arc-20160816; b=gfEliz8BdbD4cDE05+IrnlYFq3JRmdHfnsyc1spY6Np5nWuNXzEFmYrAzngMW6Azrr yB/ueCLfhMQ3pW41VmaTnLjeTiJqnd+NYTMvgnQZ/PuDWMWHNaRdSR57USQxbfmM6JEH JiNuko/1ShiiSne1swKLGXe8j9YQRjDK6K0ur2EjD7OOVG0d1lJ7Vj1ssIymQyrB6qmv 41QXeYJg67CJLscmxr5QCg5MMEWAb11/StRxXiVnD7kD8Z8TpjK5iuuwdcUl0jqZxNmo GAGrJhl3qamgrhIjTO60//YGitz7Ygf1PtA6MwnKDP6xgFRdlzGNMLesHiuCG3JXlPGZ cm1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=Z3DRv1LbJKsu5QnAvVeRAna8E9OdvLwBSsN4EhmOw9c=; b=Zhe94BDTDZHWejrxZYyNxa2AJJg2TzeYnwPpXE7n2iwgPI2UA0tc8k0Sfew7m66fZ0 pi/S//IR3vaPCT6CuH32Dp1oaI8j0USlX2Hit5tCWaTCUJLA3X9uNqpT57t5OZynFcxd XC42uxrXuIP7vsyS1SypxJlVyximfxRX6I+oB4ZS99JiedeaDZep4OXOdKOABZM4GTPr mnHLj7BIfpIZjJTcr21hvVrViUXx/Xd+3dM8lXNXBqzc880OADQluYKVT+CAlaU0IjgA /QLqnFh3utgMeeOYl6niO1LLqKgCPui2XZ6wXWakOzSsibci0rW7tIEpihRiEIkwOoJf LMDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CozEn1aI; 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=fail (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 m7si267423oim.179.2020.03.25.18.08.02; Wed, 25 Mar 2020 18:08:30 -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=fail header.i=@gmail.com header.s=20161025 header.b=CozEn1aI; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbgCZBHS (ORCPT + 99 others); Wed, 25 Mar 2020 21:07:18 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35751 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727539AbgCZBHR (ORCPT ); Wed, 25 Mar 2020 21:07:17 -0400 Received: by mail-qk1-f193.google.com with SMTP id k13so4871003qki.2 for ; Wed, 25 Mar 2020 18:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=Z3DRv1LbJKsu5QnAvVeRAna8E9OdvLwBSsN4EhmOw9c=; b=CozEn1aIAvFY4NdMaDQtx0dKvQqOZMqlyEcIBkvkjGNgv8cN3N0ZNGXAr96an7nobk Q7Mv1rsgGEtwJ8D35fF54BbT205t2B80K9zXD3HfNgjWx+THMTCK7YIMjlUtDcRgILFZ 0W7f7s3hRQw+Hp9N9tVe6L0LK/axle+dzmjVD0VFvHoOSEc/WsuVeBXUTUDnr1snCy54 A1dw/JYZKzR7fagPcKl7U4mJd1lXCNPlZAeMXfyX7TCklEf6k6SwQAicYsjATWHqIYre MZPF57Ow5CPOb6xvmKvn0G7ELISViBzRhxfNELJz7XdZUJMTROhFMLonbdWB5/DwveXL BmjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=Z3DRv1LbJKsu5QnAvVeRAna8E9OdvLwBSsN4EhmOw9c=; b=MWTo0Zn6AcaM1B6XJcMZ8P2PSLP6ssJ6Vs0XSlSE6Dr81H952SrXntMbOyd1GwNE5c vUI6he1i1IdQZ95ryMzY0mCrejg438xSpJDkEyO4PNwS935hDKlowi0KLFJbzXiHz/ve dJ/YFGbNbd3z3mu9iV+V9qTXNp7OwwTGB7oMt7mx0opqIzpSclvZnONQ/65g0qz6BCXI iT8PjppZyjoeTahmc9CuTqlwCb6cPasqUZk6/G60mFy/LK31UCutTogPFgyNeHuu8btg VgExdTvbg6SoiE7bQgqAomSlZnKhETZ5hnzKeqOkG6YEgyO3uQtYu6Y8SXDWKUZ7Fx28 kzzw== X-Gm-Message-State: ANhLgQ0imZgBLKFtxXGpAJhPpVNMsFXW/V8Nkzrl6cfrU9lgME75eYIr DukQyTVHW155vXM8Kia+z1U= X-Received: by 2002:a37:bd6:: with SMTP id 205mr5518136qkl.159.1585184834502; Wed, 25 Mar 2020 18:07:14 -0700 (PDT) Received: from [192.168.86.185] ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id y17sm531560qth.59.2020.03.25.18.07.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2020 18:07:13 -0700 (PDT) Date: Wed, 25 Mar 2020 22:06:02 -0300 User-Agent: K-9 Mail for Android In-Reply-To: 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> <20200325192640.GI14102@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags To: Sam Lunt 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 From: Arnaldo Melo Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On March 25, 2020 5:31:15 PM GMT-03:00, Sam Lunt = wrote: >On Wed, Mar 25, 2020 at 2:26 PM Arnaldo Carvalho de Melo > wrote: >> >> Em Wed, Mar 25, 2020 at 09:40:34AM -0500, Sam Lunt escreveu: >> > 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=2Ehe@windriver=2Ecom wrote: >> > > > >> From: He Zhe >> > > > >> >> > > > >> Since Python v3=2E8=2E0, with the following commit >> > > > >> 0a8e57248b91 ("bpo-36721: Add --embed option to >python-config (GH-13500)"), >> > > > > we got similar change recently=2E=2E might have not been picked >up yet >> > > > > >> > > > > =20 >https://lore=2Ekernel=2Eorg/lkml/20200131181123=2Etmamivhq4b7uqasr@gmail= =2Ecom/ >> > > > >> > > > Thanks for pointing out=2E >> > > >> > > So, just with your patch: >> > > >> > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p >/tmp/build/perf >> > > [acme@five perf]$ make PYTHON=3Dpython3 -C tools/perf >O=3D/tmp/build/perf install-bin |& grep python >> > > =2E=2E=2E libpython: [ OFF ] >> > > Makefile=2Econfig:750: No 'Python=2Eh' (for Python 2=2Ex support) w= as >found: disables Python support - please install python-devel/python-dev >> > > CC /tmp/build/perf/tests/python-use=2Eo >> > > [acme@five perf]$ >> > > >> > > [acme@five perf]$ rpm -q python2-devel python3-devel python-devel >> > > package python2-devel is not installed >> > > python3-devel-3=2E7=2E6-2=2Efc31=2Ex86_64 >> > > package python-devel is not installed >> > > [acme@five perf]$ >> > > >> > > [acme@five perf]$ cat >/tmp/build/perf/feature/test-libpython=2Emake=2Eoutput >> > > /bin/sh: --configdir: command not found >> > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython >> > > test-libpython=2Emake=2Eoutput =20 >test-libpython-version=2Emake=2Eoutput >> > > [acme@five perf]$ cat >/tmp/build/perf/feature/test-libpython-version=2Emake=2Eoutput >> > > /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=3Dpython3 -C tools/perf >O=3D/tmp/build/perf install-bin |& grep python >> > > =2E=2E=2E libpython: [ on ] >> > > GEN /tmp/build/perf/python/perf=2Eso >> > > MKDIR /tmp/build/perf/scripts/python/Perf-Trace-Util/ >> > > CC =20 >/tmp/build/perf/scripts/python/Perf-Trace-Util/Context=2Eo >> > > LD =20 >/tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in=2Eo >> > > CC /tmp/build/perf/tests/python-use=2Eo >> > > CC =20 >/tmp/build/perf/util/scripting-engines/trace-event-python=2Eo >> > > INSTALL python-scripts >> > > [acme@five perf]$ >> > > >> > > [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python >> > > libpython3=2E7m=2Eso=2E1=2E0 =3D> /lib64/libpython3=2E7m=2E= so=2E1=2E0 >(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=2E7, but the change in behavior >for >> > python-config happened in version 3=2E8 >> >> Humm, but shouldn't this continue to work with python3=2E7? > >Oh, my mistake, I didn't read the output carefully=2E It should >obviously still work with old versions, yes=2E I actually submitted a >similar patch, and it seemed to work when I used python 3=2E7=2E I wonder >if the issue is the "||" operator in the subshell=2E > >https://lore=2Ekernel=2Eorg/lkml/20200131181123=2Etmamivhq4b7uqasr@gmail= =2Ecom/ I'm aware of your path, even for confused by your comment here, will it tr= y it tomorrow > > >> - Arnaldo >> >> > > [acme@five perf]$ cat /etc/redhat-release >> > > Fedora release 31 (Thirty One) >> > > [acme@five perf]$ >> > > >> > > - Arnaldo >> >> -- >> >> - Arnaldo --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E