OS: CentOS 6.5
参考:
https://www.nsnam.org/docs/dce/manual/html/getting-started.html
编译方法:
1 下载bake代码,设置环境变量
hg clone http://code.nsnam.org/bake bake export BAKE_HOME=`pwd`/bake export PATH=$PATH:$BAKE_HOME export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
2 创建目录下载source代码,并编译
mkdir dce cd dce bake.py configure -e dce-ns3-|version| bake.py download bake.py build
3 如果编译出错,安装一些依赖条件
3.1 xx-dev如果没招到,就安装xx-devel, yum install xx-devel (xx是模块名)
3.2 开启debuginfo库,并安装glibc-debuginfo(这个elf-loader需要它)。参考我上两篇博客
debuginfo-install glibc
3.3 修改pygccxml版本的判断方法,参考我上两篇博客
允许识别pygccxml的新版本命名方法(v1.x.y instead of 1.x.y)
4 测试
$ cd source/ns-3-dce $ ./waf --run dce-udp-simple $ ls
编译解决方法:
与参考文档相同,通过bake.py --debug来发现问题,
在下面句子中增加调试,来判断错误出现在哪里
bake/bake/ModuleEnvironment.py L523
try:
print(' execute: %s %s. \n'
% (str(directory), str(args)))
popen = subprocess.Popen(args,
stdin = stdin,
stdout = stdout,
stderr = stderr,
cwd = directory,
env = tmp)
此处thttp补丁位置问题,可以修改bakeconf.py