<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 16, 2020, at 3:08 PM, Jonas Devlieghere <<a href="mailto:jonas@devlieghere.com" class="">jonas@devlieghere.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 16, 2020 at 2:42 PM Davidino Italiano via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Apr 16, 2020, at 2:28 PM, Ted Woodward via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class=""><div class=""><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none" class=""><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><a href="http://lldb.llvm.org/resources/build.html" style="color:rgb(5,99,193);text-decoration:underline" target="_blank" class="">http://lldb.llvm.org/resources/build.html</a><span class=""> </span>Says we need swig 2 or later:<u class=""></u><u class=""></u></div><p style="margin-left:13.5pt;line-height:16.8pt;background-color:white" class=""><span style="font-family:Georgia,serif;color:rgb(62,67,73)" class="">If you want to run the test suite, you’ll need to build LLDB with Python scripting support.<u class=""></u><u class=""></u></span></p><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif;line-height:16.8pt;background-color:white" class=""><span style="font-size:10pt;font-family:Symbol;color:rgb(62,67,73)" class=""><span class="">·<span style="font-style:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"" class="">        <span class=""> </span></span></span></span><span style="font-family:Georgia,serif;color:rgb(62,67,73)" class=""><a href="http://www.python.org/" style="color:rgb(5,99,193);text-decoration:underline" target="_blank" class=""><span style="color:rgb(0,75,107)" class="">Python</span></a><u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif;line-height:16.8pt;background-color:white" class=""><span style="font-size:10pt;font-family:Symbol;color:rgb(62,67,73)" class=""><span class="">·<span style="font-style:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"" class="">        <span class=""> </span></span></span></span><span style="font-family:Georgia,serif;color:rgb(62,67,73)" class=""><a href="http://swig.org/" style="color:rgb(5,99,193);text-decoration:underline" target="_blank" class=""><span style="color:rgb(0,75,107)" class="">SWIG</span></a> 2 or later.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">I don’t think this is correct anymore.<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">test/API/python_api/sbenvironment/TestSBEnvironment.py has this line:<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">        env.Set("FOO", "bar", overwrite=True)<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">lldb built with swig 2.0.11 fails this test with the error:<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">    env.Set("FOO", "bar", overwrite=True)<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">TypeError: Set() got an unexpected keyword argument 'overwrite'<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class="">It works when lldb is built with swig 3.0.8.<u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif" class=""><u class=""></u> <u class=""></u></div></div></div></blockquote><br class=""></div><div class="">Yes, we bumped the swig requirements.</div><div class="">Swig-2, among others, don’t support python 3 correctly.</div></div></blockquote><div class=""><br class=""></div><div class=""><div style="" class="">I think you're confusing SWIG 1.x and SWIG 2.x. We bumped the requirements to 2, because that's the first version that correctly supported Python 3. Personally I don't mind bumping the version again, but this seems more like a bug that we should be able to fix with SWIG 2. </div></div><div class=""> </div></div></div></div></div></blockquote></div><div><br class=""></div><div>While swig 2 has support for python 3, it doesn’t work in all cases (there are bugs). Hence the choice of the word “correctly”, rather than “at all”.</div><div>If you go past this, you’ll probably find other problems, as I did when I originally made the transition. Some of them are trivial, some of them cause the python code generate to be incorrect and tests to fail.</div><div>If you want to fix them, be my guest. But realistically everybody I’ve seen builds using swig-3 [or swig-4]. Pick your poison.</div><div><br class=""></div><div>—</div><div>Davide</div></body></html>