Bugzilla – Full Text Bug Listing |
Summary: | bindings failures on selected platforms | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
Component: | python bindings | Assignee: | Gustavo J. A. M. Carneiro <gjcarneiro> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jpelkey, ns-bugs |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | All | ||
OS: | All |
Description
Tom Henderson
2011-04-26 00:47:42 EDT
I'm pretty sure this is just another instance of cross-dll dynamic_cast failures. I just tested this quick fix, and it solves the problem (tested in examples/routing/simple-routing-ping6.py), but of course it makes the python bindings less "modular": it forces all python modules to link to all ns-3 module libraries. Since newer systems appear to have this dlopen/dynamic_cast issue fixed, I think the ideal way to fix this would be to add some waf configure compilation/runtime test, and depending on the test result make python modules link to all libraries or not. But the waf (and C++ test) code to do this is not trivial. As temporary fallback, I'm ok with just applying this simple patch, at least until I find time to develop the more complete bug fix... diff -r f0748224dd68 src/wscript --- a/src/wscript Thu Apr 28 09:10:29 2011 -0700 +++ b/src/wscript Fri Apr 29 09:34:50 2011 -0400 @@ -251,7 +251,7 @@ def ns3_python_bindings(bld): pymod.source = ['bindings/ns3module.cc'] pymod.target = '%s/%s' % (module_target_dir, extension_name) pymod.name = 'ns3module_%s' % module - pymod.uselib_local = "ns3-"+module + pymod.uselib_local = pymod.env['NS3_ENABLED_MODULES'] #"ns3-"+module if pymod.env['ENABLE_STATIC_NS3']: if sys.platform == 'darwin': pymod.env.append_value('LINKFLAGS', '-Wl,-all_load') Well I'd love to see green buildbots very soon, so if this is what it takes for now, I'm all for it. (In reply to comment #2) > Well I'd love to see green buildbots very soon, so if this is what it takes for > now, I'm all for it. Please commit your workaround, and we can keep this open if you plan to improve it in the future (feel free to rename the bug title). changeset: 7098:bb919b08a773 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Fri Apr 29 18:27:03 2011 +0100 summary: Link Python bindings modules to all enabled ns-3 module libraries. Fixes #1117. |