[Ns-developers] Build Seems to be Broken
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Mon Jul 21 16:32:42 PDT 2008
Hi all,
The python part of the build for ns-3-dev seems to be broken. It's not a
fatal error since I can always ./waf --python-disable and ignore ./waf
check, (and I can also manually edit bindings to fix it -- see below)
however, what I see is
> hg clone http://code.nsnam.org/ns-3-dev
> cd ns-3-dev
> ./waf -d debug configure
> ./waf - j 4
[ ... ]
debug/bindings/python/ns3_module_helper.cc: In function â?~PyObject*
_wrap_PyNs3
PointToPointHelper_SetDeviceParameter(PyNs3PointToPointHelper*, PyObject*,
PyObj
ect*)â?T:
debug/bindings/python/ns3_module_helper.cc:864: error: â?~PyErr_WarnExâ?T
was no
t declared in this scope
debug/bindings/python/ns3_module_helper.cc: In function â?~PyObject*
_wrap_PyNs3
PointToPointHelper_SetChannelParameter(PyNs3PointToPointHelper*, PyObject*,
PyOb
ject*)â?T:
debug/bindings/python/ns3_module_helper.cc:903: error: â?~PyErr_WarnExâ?T
was no
t declared in this scope
[ ...]
This is the change from Parameter to Attribute in the point-to-point-helper
that was made earlier this month rearing its evil head.
If I manually remove the offending binding commands from
bindings/python/ns3_module_helper.py (there are existing Set*Attribute
versions):
## point-to-point-helper.h: void
ns3::PointToPointHelper::SetDeviceParamete\
r(std::string name, ns3::AttributeValue const & value) [member function]
cls.add_method('SetDeviceParameter',
'void',
[param('std::string', 'name'),
param('ns3::AttributeValue&',\
'value', is_const=True)],
deprecated=True)
## point-to-point-helper.h: void
ns3::PointToPointHelper::SetChannelParamet\
er(std::string name, ns3::AttributeValue const & value) [member function]
cls.add_method('SetChannelParameter',
'void',
[param('std::string', 'name'),
param('ns3::AttributeValue&',\
'value', is_const=True)],
deprecated=True)
It works just fine. I don't want to add back the SetDeviceParameter and
SetChannelParameter with __attribute__ (deprecated) since the compiler on
ns-regression (and my max) don't support it.
If I do a ./waf --python-scan to try and rescan the bindings, it looks like
the xml parser dies a horrible death:
/home/craigdo/repos/ns-3-dev/build/debug/ns3/attribute-list.h:88:
AnnotationsWar
ning: Annotation 'caller_owns_return=false' not used (used in static
ns3::Attrib
uteList * ns3::AttributeList::GetGlobal() [member function])
static AttributeList *GetGlobal (void);
Traceback (most recent call last):
File "/home/craigdo/repos/ns-3-dev/bindings/python/ns3modulescan.py", line
276
, in ?
ns3_module_scan(sys.argv[1], sys.argv[3], sys.argv[2])
File "/home/craigdo/repos/ns-3-dev/bindings/python/ns3modulescan.py", line
267
, in ns3_module_scan
module_parser.scan_functions()
File
"/home/craigdo/repos/ns-3-dev/bindings/python/pybindgen/pybindgen/gccxmlp
arser.py", line 1586, in scan_functions
self._scan_namespace_functions(self.module, self.module_namespace)
File
"/home/craigdo/repos/ns-3-dev/bindings/python/pybindgen/pybindgen/gccxmlp
arser.py", line 1737, in _scan_namespace_functions
func_wrapper = module.add_function(fun.name, return_type, arguments,
**kwarg
s)
File
"/home/craigdo/repos/ns-3-dev/bindings/python/pybindgen/pybindgen/module.
py", line 396, in add_function
func = Function(*args, **kwargs)
File
"/home/craigdo/repos/ns-3-dev/bindings/python/pybindgen/pybindgen/functio
n.py", line 57, in __init__
assert isinstance(function_name, str)
AssertionError
Question: What is the preferred way to fix something like this? The last I
heard, the solution was to tell Gustavo and he'll take care of it. If the
build is broken, can I just check in a change to ns3_module_helper.py to get
it working for the nightly build, or is that a bad plan.
Guide me oh wise pybindgen guru :-)
-- Craig
More information about the Ns-developers
mailing list