Bugzilla – Bug 1682
./waf crashes on FC10
Last modified: 2013-07-11 05:59:12 UTC
ns-3-dev changeset: 9755:92b68bcb87f6 building on a Fedora Core 10 (gcc 4.3.2, python 2.5.2) # hg clone http://code.nsnam.org/ns-3-dev # cd ns-3-dev # ./waf configure --enable-modules=lte --enable-examples --enable-tests Traceback (most recent call last): File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Scripting.py", line 97, in waf_entry_point run_commands() File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Scripting.py", line 149, in run_commands parse_options() File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Scripting.py", line 127, in parse_options Context.create_context('options').execute() File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Options.py", line 134, in execute super(OptionsContext,self).execute() File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Context.py", line 87, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Context.py", line 128, in recurse user_function(self) File "/root/ns-3-dev/wscript", line 209, in options opt.recurse('src') File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Context.py", line 128, in recurse user_function(self) File "/root/ns-3-dev/src/wscript", line 44, in options opt.load('boost', tooldir=['waf-tools']) File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Context.py", line 81, in load module=load_tool(t,path) File "/root/ns-3-dev/.waf-1.7.10-4f6df1d839dc35640834d81573053140/waflib/Context.py", line 296, in load_tool __import__(tool) File "waf-tools/boost.py", line 359 except Errors.ConfigurationError as exc: ^ SyntaxError: invalid syntax same error with simply "./waf" and other commands such as "./waf clean", "./waf distclean", etc.
I've found that the problem is solved by updating waf-tools/boost.py to a more recent version which I found here: https://code.google.com/p/waf/source/browse/waflib/extras/boost.py?r=95449949a237133e8651a2e3fc3fa9e671e86608
Is this bug still valid ? T.
yes, I just tested with changeset: 9919:5596934962c2 and the bug is still there
I can take a look at this if someone can provide me SSH to FC10 machine.
I think it's worth checking if changing the boost.py fixes the issue (and if it doesn't bring issues to other OSes). Unfortunately I don't have a FC10 available. Maybe there's one on Jenkins. T.
I actually wonder if this is a result of our modifications, since we took latest boost.py with waf upgrade.
Unfortunately I can't give you ssh access to the FC10 machine I am using. However I can test other versions of boost.py if you wish.
Vedran is right, it is one of our modifications to that file. If you check the differences between the "original" boost.py and "our" boost.py, the error message pints to one of our additions. for cxxflags in (['/MD', '/EHsc'], []): self.env.stash() self.env["CXXFLAGS_%s" % var] += cxxflags try: try_link() self.end_msg("ok: winning cxxflags combination: %s" % (self.env["CXXFLAGS_%s" % var])) e = None break except Errors.ConfigurationError as exc: self.env.revert() e = exc And from this point on, I'll leave it to whoever knows something about Python. For me it's more or less like reading Chinese.
This might be relevant... http://www.gossamer-threads.com/lists/python/python/785327 It seems that "as" might cause errors on older Pythons. Aaaaand: - building on a Fedora Core 10 (gcc 4.3.2, python 2.5.2) It seems that the correct syntax is: except Exception, exc: No idea if this syntax will do the work and will work as intended on newer Pythons as well.
Created attachment 1627 [details] Possible fix Try this one please.
it works on the FC10 machine!!
(In reply to comment #11) > it works on the FC10 machine!! Good, can we check if it works on other systems as well ? On MacOSX (10.8) it works. T.
works also on ubuntu 12.04 64bit and 10.04 32bit
Fixed in changeset: 9920:e90d966ba939