Bug 2013 - Waf Fails to recognize pygccxml version 1.6.2
Waf Fails to recognize pygccxml version 1.6.2
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3.21
PC Linux
: P5 enhancement
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-03 15:32 EST by Ben Newton
Modified: 2014-11-26 18:02 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Newton 2014-11-03 15:32:36 EST
because of the 'v' in the version reported from pygccxml, waf has the following error:

Python module pygccxml                                                                           : v1.6.2 
Traceback (most recent call last):
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 97, in waf_entry_point
    run_commands()
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 153, in run_commands
    ctx=run_command(cmd_name)
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 146, in run_command
    ctx.execute()
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Configure.py", line 128, in execute
    super(ConfigurationContext,self).execute()
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Context.py", line 87, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Context.py", line 128, in recurse
    user_function(self)
  File "/home/bn/research/src/ns-3.21/wscript", line 376, in configure
    conf.recurse('bindings/python')
  File "/home/bn/research/src/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Context.py", line 128, in recurse
    user_function(self)
  File "/home/bn/research/src/ns-3.21/bindings/python/wscript", line 258, in configure
    pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
ValueError: invalid literal for int() with base 10: 'v1'


------
Proposed solution:

diff -r 3ccd77077936 bindings/python/wscript
--- a/bindings/python/wscript	Mon Nov 03 14:59:58 2014 -0500
+++ b/bindings/python/wscript	Mon Nov 03 15:28:52 2014 -0500
@@ -255,6 +255,8 @@
                             "import pygccxml; print pygccxml.__version__"],
                             stdout=subprocess.PIPE).communicate()[0]
     pygccxml_version_str = out.strip()
+    if pygccxml_version_str[0] == 'v':
+        pygccxml_version_str = pygccxml_version_str[1:]
     pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
     conf.msg('Checking for pygccxml version', pygccxml_version_str)
     if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION):


Thanks,
  Ben Newton
Comment 1 Tom Henderson 2014-11-26 18:02:29 EST
I fixed by pushing something similar in changeset 11074:ff5ee93352fe