[Ns-bugs] [Bug 1075] New: Python examples fail when static built is enabled
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Mar 18 14:26:48 PDT 2011
http://www.nsnam.org/bugzilla/show_bug.cgi?id=1075
Summary: Python examples fail when static built is enabled
Product: ns-3
Version: pre-release
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P5
Component: build system
AssignedTo: gjcarneiro at gmail.com
ReportedBy: watrous at u.washington.edu
CC: ns-bugs at isi.edu
Estimated Hours: 0.0
If you do build the non-static (shared dynamic) version of ns-3, all of the
tests in test.py pass.
But, if you do
/waf configure --enable-static
or
/waf configure --enable-static -d release
all of the Python examples fail:
FAIL: Example examples/routing/simple-routing-ping6.py
FAIL: Example examples/wireless/wifi-ap.py
FAIL: Example examples/wireless/mixed-wireless.py
FAIL: Example examples/tutorial/first.py
FAIL: Example src/bridge/examples/csma-bridge.py
I think the reason is that I changed the wscript files to make the bindings be
a static library. Before, they were always being created as shared libraries.
To be specific, I added to following to bindings/python/wscript:
if bld.env['ENABLE_STATIC_NS3']:
features = 'cxx cstaticlib pyext'
else:
features = 'cxx cshlib pyext'
if env['ENABLE_PYTHON_PCH']:
features += ' pch'
I also added following to wscript:
if env['ENABLE_STATIC_NS3']:
if sys.platform == 'darwin':
env.STATICLIB_MARKER = '-Wl,-all_load'
else:
env.STATICLIB_MARKER = '-Wl,--whole-archive,-Bstatic'
env.SHLIB_MARKER = '-Wl,-Bdynamic,--no-whole-archive'
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list