<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">> The 7.0 branch is not compatible with Python 3 .. The first release that is, would be 9.0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Should some/all of the recent Python/CMake changes be ported to the 9.0 release branch? ‘git log --grep ython’ turns up r367956, r367153, r367127, r367125, r367115, r366447, and r366383, all of which happened after the fork, I’m wondering
if any of them (or others) are important as part of supporting Python 3.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ll paste the commit messages below for convenience.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">-Joseph<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Mon Aug 5 23:54:13 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Remove check for the readline target.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> This was introduced when we were building a custom readline Python<o:p></o:p></p>
<p class="MsoNormal"> module on Linux [1]. Now that the readline target doesn't exist<o:p></o:p></p>
<p class="MsoNormal"> anymore, it's safe to remove this dependency.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> This fixes https://llvm.org/PR25136<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> [1] https://reviews.llvm.org/D13268<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 367956<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Fri Jul 26 20:58:10 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Print the correct variables<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> This didn't get updated after we decided to set PYTHON_MAJOR_VERSION and<o:p></o:p></p>
<p class="MsoNormal"> PYTHON_MINOR_VERSION in find_python_libs_windows, instead of parsing the<o:p></o:p></p>
<p class="MsoNormal"> variables ourselves.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 367153<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Fri Jul 26 16:32:49 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Fix find_python_libs_windows<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Exporting PYTHON_INCLUDE_DIR to the Python scope somehow got lost in my<o:p></o:p></p>
<p class="MsoNormal"> last change. Add it back again. This should fix the Windows bot!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 367127<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Fri Jul 26 16:15:19 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Print Python version on Windows<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Trying to figure out what's causing the Windows bot to fail.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 367125<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Fri Jul 26 14:26:33 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Loosen Python version check and ignore patch version<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Some versions of macOS report a different patch version for the system<o:p></o:p></p>
<p class="MsoNormal"> provided interpreter and libraries.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Differential revision: https://reviews.llvm.org/D65230<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 367115<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Jonas Devlieghere <jonas@devlieghere.com><o:p></o:p></p>
<p class="MsoNormal">Date: Thu Jul 18 15:17:42 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [CMake] Don't set Python_ADDITIONAL_VERSIONS<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's<o:p></o:p></p>
<p class="MsoNormal"> Python support to 2.7. Now that both LLVM and LLDB both support Python<o:p></o:p></p>
<p class="MsoNormal"> 3, there's no longer a need to put an arbitrary limit on this.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> However, instead of removing the variable, r365692 expanded the list,<o:p></o:p></p>
<p class="MsoNormal"> which has the (presumably unintentional) side-effect of expression<o:p></o:p></p>
<p class="MsoNormal"> preference for Python 3.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Instead, as Michal proposed in the original code review, we should just<o:p></o:p></p>
<p class="MsoNormal"> not set the list at all, and let CMake pick whatever Python interpreter<o:p></o:p></p>
<p class="MsoNormal"> you have in your path.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,<o:p></o:p></p>
<p class="MsoNormal"> clang and lld. I've also updated the docs with the default behavior and<o:p></o:p></p>
<p class="MsoNormal"> how to force a different Python version to be used.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Differential revision: https://reviews.llvm.org/D64894<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 366447<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Author: Adrian McCarthy <amccarth@google.com><o:p></o:p></p>
<p class="MsoNormal">Date: Wed Jul 17 22:36:26 2019 +0000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> [NFC] Clarify a Cmake status message regarding Python on LLDBConfig<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> llvm-svn: 366383<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><b>From:</b> lldb-dev <lldb-dev-bounces@lists.llvm.org> <b>On Behalf Of
</b>Jonas Devlieghere via lldb-dev<br>
<b>Sent:</b> Tuesday, July 23, 2019 10:52 AM<br>
<b>To:</b> Romaric Jodin <rjodin@upmem.com><br>
<b>Cc:</b> LLDB <lldb-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [lldb-dev] test suite issue with Python2.7/3.5<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">The 7.0 branch is not compatible with Python 3, at least not if you're not on Windows. The first release that is, would be 9.0, which is currently being qualified. This includes a bunch of compatibility fixes, and a newer version of the
vendored pexpect (4.6). As you've noticed, using different versions of Python will not work either. <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Your only option is to use Python 2.7, both for building LLDB and for running the test suite. Making sure the 2.7 interpreter is first in your PATH should be sufficient. Alternatively, you can explicitly pass -DPYTHON_EXECUTABLE=/path/to/python27.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Jonas<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jul 23, 2019 at 7:38 AM Romaric Jodin via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi everyone,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm trying to run the test suite on lldb and I'm having some issues with Python. I'm on branch 7.0.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When I build lldb, I've got a folder "python3.5/site-packages" generated. So I believe that the build system found python3 in my environment.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">But when I run the testsuite (using "ninja check-lldb"), I've got this issue:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-left:30.0pt;margin-right:0in">
<div>
<p class="MsoNormal">Traceback (most recent call last):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/decorators.py", line 113, in wrapper<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> func(*args, **kwargs)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/decorators.py", line 341, in wrapper<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> return func(self, *args, **kwargs)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py", line 39, in test_command_regex<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> child.expect_exact(prompt)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/third_party/Python/module/pexpect-2.4/pexpect.py", line 1386, in expect_exact<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> if type(pattern_list) in types.StringTypes or pattern_list in (<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">AttributeError: module 'types' has no attribute 'StringTypes'<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<p class="MsoNormal">It seems that it's because the code in "pexpect.py" is not compatible with python3.5.<o:p></o:p></p>
<div>
<p class="MsoNormal">If I force the system to use python2.7, I've got another issue because of the way "_lldb.so" is built (with python3.5):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-left:30.0pt;margin-right:0in">
<div>
<p class="MsoNormal">Traceback (most recent call last):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/test/dotest.py", line 7, in <module><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> lldbsuite.test.run_suite()<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/dotest.py", line 1180, in run_suite<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> import lldb<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> File "/home/rjodin/package-sdk-2019.3.0/upmem-internal/usr/share/upmem/lib/python3.5/site-packages/lldb/__init__.py", line 39, in <module><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> import _lldb<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">ImportError: dynamic module does not define init function (init_lldb)<o:p></o:p></p>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What do I do wrong?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- <o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.5pt;color:black">Romaric JODIN</span></b><span style="color:#888888"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;color:black">UPMEM</span><span style="color:#888888"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span style="font-size:7.5pt;color:black">Software Engineer</span></i><span style="color:#888888"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><img border="0" width="50" height="50" style="width:.5208in;height:.5208in" id="Picture_x0020_1" src="cid:image001.png@01D5541D.B27CB640" alt="Logo-original-source"></span><span style="color:#888888"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Flldb-dev&data=02%7C01%7Cjotrem%40microsoft.com%7C185e4cab94d444c53b3508d70f7d610d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636994903482780787&sdata=gTsUfgqvEz7Y38k04LzLD5bcjtfFvzvh34fobmOArYA%3D&reserved=0" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>