我将我的ns-3版本(包括私有模块)更新到最后一个版本,在编译时,这是生成的错误:
mattia@pcsensori16:~/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
答案 0 :(得分:2)
尝试手动(rm -f build)或使用./waf distclean删除构建文件夹并重新配置。
答案 1 :(得分:0)
超老,但今天仍然发现这个问题。在我的 wscript 中,特别是 ns3,工具目录是 waf-tools
,所以你想要做这样的事情:
def options(opt):
opt.load('clang_compilation_database', tooldir='waf-tools')
def configure(conf):
conf.load('clang_compilation_database', tooldir='waf-tools')
发现这对于尝试使用 ns3 设置 clion 很有用:How to setup CLion to use waf as build system