Bug 1224 - Ns-3-allinone fails to compile on Lion

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-08-07 16:52:49 +01:00
parent 39ffebadc2
commit 27e6fcc4fc
3 changed files with 24 additions and 7 deletions

View File

@@ -18,7 +18,8 @@ class ErrorHandler(pybindgen.settings.ErrorHandler):
pybindgen.settings.error_handler = ErrorHandler()
#print >> sys.stderr, ">>>>>>>>>>>>>>>>>>>>>>>>>>>> ", bool(eval(os.environ["GCC_RTTI_ABI_COMPLETE"]))
pybindgen.settings.gcc_rtti_abi_complete = bool(eval(os.environ["GCC_RTTI_ABI_COMPLETE"]))
class MyMultiSectionFactory(MultiSectionFactory):
def __init__(self, main_file_name):

View File

@@ -15,7 +15,7 @@ import Build
import Utils
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 794)
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 795)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
@@ -247,6 +247,23 @@ int main ()
msg = conf.env['BINDINGS_TYPE']
conf.check_message_custom('type of bindings to build', '', msg)
# check cxxabi stuff (which Mac OS X Lion breaks)
fragment = r"""
# include <cxxabi.h>
int main ()
{
const abi::__si_class_type_info *_typeinfo __attribute__((unused)) = NULL;
return 0;
}
"""
gcc_rtti_abi = conf.check(fragment=fragment, msg="Checking for internal GCC cxxabi",
okmsg="complete", errmsg='incomplete',
mandatory=False)
conf.env["GCC_RTTI_ABI_COMPLETE"] = str(bool(gcc_rtti_abi))
## Check for pygccxml
try:
conf.check_python_module('pygccxml')
@@ -296,9 +313,6 @@ int main ()
conf.env['ENABLE_PYTHON_SCANNING'] = True
conf.report_optional_feature("pygccxml", "Python API Scanning Support", True, None)
# ---------------------
def get_headers_map(bld):

View File

@@ -353,7 +353,9 @@ def ns3_python_bindings(bld):
#if not debug:
# target.append('ns3modulegen.log')
argv = ['NS3_ENABLED_FEATURES=${FEATURES}', '${PYTHON}']
argv = ['NS3_ENABLED_FEATURES=${FEATURES}',
'GCC_RTTI_ABI_COMPLETE=${GCC_RTTI_ABI_COMPLETE}',
'${PYTHON}']
#if debug:
# argv.extend(["-m", "pdb"])
@@ -368,7 +370,7 @@ def ns3_python_bindings(bld):
bindgen = bld.new_task_gen('command', source=source, target=target, command=argv)
bindgen.env['FEATURES'] = ','.join(features)
bindgen.dep_vars = ['FEATURES']
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
bindgen.before = 'cxx'
bindgen.after = 'gen_ns3_module_header_task'
bindgen.name = "pybindgen(ns3 module %s)" % module