2015-11-02 116 views
0

更新我的NS-3版本(包括私有模块)的最后一个版本和编译时,这是所产生的错误:错误编译NS-3 WAF(无法加载WAF工具“clang_compilation_database)

[email protected]:~/ns3-mmwave$ ./waf configure 
Setting top to       : /home/mattia/ns3-mmwave 
Setting out to       : /home/mattia/ns3-mmwave/build 
Checking for 'gcc' (C compiler)   : /usr/bin/gcc 
Checking for cc version     : 4.8.4 
Checking for 'g++' (C++ compiler)  : /usr/bin/g++ 
Could not load the Waf tool 'clang_compilation_database' from ['/home/mattia/ns3-mmwave/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7', '/home/mattia/ns3-mmwave', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client'] 
No module named clang_compilation_database 
(complete log in /home/mattia/ns3-mmwave/build/config.log) 

有人对我失踪的事有个想法吗?

[编辑:添加的config.log文件]

Checking for 'clang++' (C++ compiler) 
find program=['clang++'] paths=['/Library/Frameworks/Python.framework/Versions/3.4/bin', '/Library/Frameworks/Python.framework/Versions/3.4/bin', '/opt/local/bin', '/opt/local/sbin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/opt/X11/bin', '/Library/TeX/texbin'] var='CXX' -> ['/usr/bin/clang++'] 
(tool ar is already loaded, skipping) 
/usr/bin/clang++ 
from /Users/mattia/ns3-mmwave: Could not load the Waf tool 'clang_compilation_database' from ['/Users/mattia/ns3-mmwave/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7', '/Users/mattia/ns3-mmwave/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib', '/Users/mattia/ns3-mmwave', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages'] 
No module named clang_compilation_database 

回答

2

尽量去除生成文件夹或者手动(RM -f生成)或与./waf distclean命令和重新配置。

+0

嗨Konstantinos,我尝试了你的建议,但仍然无法正常工作。不管怎么说,还是要谢谢你。 – Mattia

+0

您正在使用哪个ns-3版本以及哪个操作系统?你是否检查了[NS-3.24]上的勘误表(https://www.nsnam.org/wiki/Ns-3.24-errata)? 您还可以提供具有完整错误日志的完整日志/home/mattia/ns3-mmwave/build/config.log吗? – Konstantinos

+0

我解决了,谢谢你的支持。 – Mattia