<div dir="ltr">Hi,<div><br></div><div>I don't know. I already had gone back to v3.0.2.</div><div>It just the alert for you, guys.<br></div><div><br></div><div>Thanks,</div><div>Ilia</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 22, 2015 at 8:38 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you turn off default variable support in swig? You will probably need to detect the swig version first to make sure it supports an option that can disable default variable values before passing the extra option to the swig command line tool, but this would probably fix things no?<br>
<br>
Greg<br>
<div><div class="h5"><br>
> On Jan 21, 2015, at 3:55 PM, Ilia K <<a href="mailto:ki.stfu@gmail.com">ki.stfu@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> Today I had errors after updating the SWIG to version 3.0.3.<br>
><br>
> After rebuild I can't run any tests because I got the following errors:<br>
> $ ./dotest.py -v --executable $BUILDDIR/bin/lldb<br>
> ['./dotest.py', '-v', '--executable', '/Users/IliaK/p/llvm/build_ninja/bin/lldb']<br>
> LLDB library dir: /Users/IliaK/p/llvm/build_ninja/bin<br>
> Traceback (most recent call last):<br>
> File "<string>", line 1, in <module><br>
> File "/Users/IliaK/p/llvm/build_ninja/lib/python2.7/site-packages/lldb/__init__.py", line 1867<br>
> def RemoveListener(self, listener, event_mask=4294967295U):<br>
> ^<br>
> SyntaxError: invalid syntax<br>
> lldb-330.99.0<br>
> This script requires lldb.py to be in either /Users/IliaK/p/llvm/tools/lldb/build/Debug/LLDB.framework/Resources/Python, /Users/IliaK/p/llvm/tools/lldb/build/Release/LLDB.framework/Resources/Python, or /Users/IliaK/p/llvm/tools/lldb/build/BuildAndIntegration/LLDB.framework/Resources/Python. Some tests might fail.<br>
> Traceback (most recent call last):<br>
> File "./dotest.py", line 1295, in <module><br>
> os.path.walk(testdir, visit, 'Test')<br>
> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 246, in walk<br>
> walk(name, func, arg)<br>
> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 246, in walk<br>
> walk(name, func, arg)<br>
> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 238, in walk<br>
> func(arg, top, names)<br>
> File "./dotest.py", line 1192, in visit<br>
> suite.addTests(unittest2.defaultTestLoader.loadTestsFromName(base))<br>
> File "/Users/IliaK/p/llvm/tools/lldb/test/unittest2/loader.py", line 111, in loadTestsFromName<br>
> module = __import__('.'.join(parts_copy))<br>
> File "/Users/IliaK/p/llvm/tools/lldb/test/api/check_public_api_headers/TestPublicAPIHeaders.py", line 8, in <module><br>
> from lldbtest import *<br>
> File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 43, in <module><br>
> import lldb<br>
> ImportError: No module named lldb<br>
><br>
> llvm/build_ninja/lib/python2.7/site-packages/lldb/__init__.py, line 1867:<br>
> def RemoveListener(self, listener, event_mask=4294967295U):<br>
> """<br>
> RemoveListener(SBBroadcaster self, SBListener listener, uint32_t event_mask=4294967295U) -> bool<br>
> RemoveListener(SBBroadcaster self, SBListener listener) -> bool<br>
> """<br>
> return _lldb.SBBroadcaster_RemoveListener(self, listener, event_mask)<br>
><br>
> Previously with v3.0.2, it looks like:<br>
> def RemoveListener(self, *args):<br>
> """<br>
> RemoveListener(SBBroadcaster self, SBListener listener, uint32_t event_mask=4294967295U) -> bool<br>
> RemoveListener(SBBroadcaster self, SBListener listener) -> bool<br>
> """<br>
> return _lldb.SBBroadcaster_RemoveListener(self, *args)<br>
><br>
> I found that "event_mask=4294967295U" is taken from interface file scripts/Python/interface/SBBroadcaster.i:<br>
> class SBBroadcaster<br>
> {<br>
> ...<br>
> bool<br>
> RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);<br>
><br>
> As I understood SWIG since v3.0.3 supports default variables (unstable).<br>
><br>
> If you already had updated to v3.0.3 the following patch will help you:<br>
> diff --git a/scripts/Python/interface/SBBroadcaster.i b/scripts/Python/interface/SBBroadcaster.i<br>
> index b5e25b6..6fa7d2b 100644<br>
> --- a/scripts/Python/interface/SBBroadcaster.i<br>
> +++ b/scripts/Python/interface/SBBroadcaster.i<br>
> @@ -56,7 +56,7 @@ public:<br>
> EventTypeHasListeners (uint32_t event_type);<br>
><br>
> bool<br>
> - RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);<br>
> + RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = 4294967295);<br>
><br>
> bool<br>
> operator == (const lldb::SBBroadcaster &rhs) const;<br>
> If not, don't update to this version.<br>
><br>
> Bug already has been posted in SWIG's bug tracker: <a href="https://github.com/swig/swig/issues/313" target="_blank">https://github.com/swig/swig/issues/313</a><br>
><br>
> Thanks,<br>
> Ilia<br>
><br>
</div></div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div><br></div>