lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Mar 2020 18:33:18 +0800
From:   He Zhe <zhe.he@...driver.com>
To:     Arnaldo Melo <arnaldo.melo@...il.com>,
        Sam Lunt <samueljlunt@...il.com>
Cc:     Jiri Olsa <jolsa@...hat.com>, peterz@...radead.org,
        mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when
 fetching ldflags



On 3/26/20 9:06 AM, Arnaldo Melo wrote:
>
> On March 25, 2020 5:31:15 PM GMT-03:00, Sam Lunt <samueljlunt@...il.com> wrote:
>> On Wed, Mar 25, 2020 at 2:26 PM Arnaldo Carvalho de Melo
>> <arnaldo.melo@...il.com> 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
>>>> <arnaldo.melo@...il.com> 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@...driver.com wrote:
>>>>>>>> From: He Zhe <zhe.he@...driver.com>
>>>>>>>>
>>>>>>>> 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@...e perf]$ rm -rf /tmp/build/perf ; mkdir -p
>> /tmp/build/perf
>>>>> [acme@...e 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@...e perf]$
>>>>>
>>>>> [acme@...e 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@...e perf]$
>>>>>
>>>>> [acme@...e perf]$ cat
>> /tmp/build/perf/feature/test-libpython.make.output
>>>>> /bin/sh: --configdir: command not found
>>>>> [acme@...e perf]$ cat /tmp/build/perf/feature/test-libpython
>>>>> test-libpython.make.output         
>> test-libpython-version.make.output
>>>>> [acme@...e perf]$ cat
>> /tmp/build/perf/feature/test-libpython-version.make.output
>>>>> /bin/sh: --configdir: command not found
>>>>> [acme@...e perf]$
>>>>>
>>>>>
>>>>> Without your patch:
>>>>>
>>>>> [acme@...e perf]$ rm -rf /tmp/build/perf ; mkdir -p
>> /tmp/build/perf
>>>>> [acme@...e 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@...e perf]$
>>>>>
>>>>> [acme@...e perf]$ ldd /tmp/build/perf/perf |& grep python
>>>>>         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0
>> (0x00007f11dd1ee000)
>>>>> [acme@...e perf]$ perf -vv |& grep -i python
>>>>>              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
>>>>> [acme@...e 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
>>> Humm, but shouldn't this continue to work with python3.7?
>> Oh, my mistake, I didn't read the output carefully. It should
>> obviously still work with old versions, yes. I actually submitted a
>> similar patch, and it seemed to work when I used python 3.7. I wonder
>> if the issue is the "||" operator in the subshell.
>>
>> https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
>
> I'm aware of your path, even for confused by your comment here, will it try it tomorrow

Sorry for inconvenience.

Yes, it is due to that the command before "||" prints some usage on failure and
thus messes up the whole string.

And I've tested Sam's patch. It works.

BTW, my [2/2] may still make sense.


Thanks,
Zhe

>
>>
>>> - Arnaldo
>>>
>>>>> [acme@...e perf]$ cat /etc/redhat-release
>>>>> Fedora release 31 (Thirty One)
>>>>> [acme@...e perf]$
>>>>>
>>>>> - Arnaldo
>>> --
>>>
>>> - Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ