NS-3构建由于G 编译器错误而失败
NS-3 build fails due to g++ compiler error
我正在尝试在Raspbian(Jessie)上构建NS3并遇到此错误:
...
[1507/1924] Compiling src/internet/model/ripng-header.cc
[1508/1924] Compiling src/internet/helper/ripng-helper.cc
[1509/1924] Compiling src/internet/helper/rip-helper.cc
[1510/1924] Compiling build/src/internet/bindings/ns3module.cc
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Waf: Leaving directory `/home/pi/tarballs/ns-allinone-3.26/ns-3.26/build'
Build failed
-> task in 'ns3module_internet' failed (exit status 4):
{task 3056100368L: cxx ns3module.cc -> ns3module.cc.8.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-fno-strict-aliasing', '-fstack-protector-strong', '-fwrapv', '-fvisibility=hidden', '-Wno-array-bounds', '-pthread', '-pthread', '-I.', '-I..', '-Isrc/internet/bindings', '-I../src/internet/bindings', '-I/usr/include/python2.7', '-I/usr/include/arm-linux-gnueabihf/python2.7', '-I/usr/include/gtk-2.0', '-I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/arm-linux-gnueabihf/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DNS_DEPRECATED=', '-DNS3_DEPRECATED_H', '-DHAVE_PYEXT=1', '-D_FORTIFY_SOURCE=2', '-DNDEBUG', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', 'src/internet/bindings/ns3module.cc', '-c', '-o', '/home/pi/tarballs/ns-allinone-3.26/ns-3.26/build/src/internet/bindings/ns3module.cc.8.o']
Waf died. Not running tests
我已经搜索过,现有问题似乎都没有相关。总的来说,总的来说,似乎肯定有一些问题,因为我认为(?)应该花很多小时才能到达这一点。1小时构建NS-3。
不确定您是否仍在寻找解决方案,但是问题似乎与内存约束有关。我通过启用/配置Swapfile解决了问题。
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
构建项目后,您可以选择禁用Swapfile(仅在需要的情况下)。在您的终端中进行此类型:
sudo swapoff /swapfile
sudo rm /swapfile
希望这会有所帮助!
我也有类似的问题。
NS3版本与Python,GCC版本相结合,或者是RAM或GPU内存的问题。
所以,我设置了一个新的Ubuntu VM,并使用RAM加倍,但没有使用最新的NS3版本(ns3 3.33)
由于NS3版本2.xx
基于Python2,因此我建议版本3.xx
。
相关文章:
- 尝试使用 std::vector<std::thread时出现静态断言失败错误>
- Websocket++ 错误:收到错误handle_transport_init TLS 握手失败
- Netbeans 10:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- 这个失败的测试是将零添加到空指针未定义的行为、编译器错误还是其他什么?
- 构建失败错误:无法使用 qibuild 构建C++ SDK Helloworld
- q网络回复 无状态码或错误,但失败
- 创建服务失败0x6f7存根收到错误数据
- 两个线程一个使用流 Api,另一个线程创建文件失败并出现错误ERROR_SHARING_VIOLATION
- CMake 错误:链接器命令失败,退出代码为 1 和 cpp.o 文件
- clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) - 体系结构的未定义符号 x86_64:
- 调试模板时出现问题.专门针对 Linux GCC 7、GCC 6、GCC 5、GCC 4.9 错误构建失败:模板参数 1
- 如何修复 clang: 错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- 错误:断言失败 (src.type() == CV_8UC1) 在阈值中
- 失败,出现错误 87:参数不正确.如何判断哪个参数不正确?
- 创建进程 API 失败,在窗口 122 上出现错误代码 10
- 加速兽握手:sslv3 警报握手失败错误
- 自定义预期失败的完整错误消息(boost::spirit::x3)
- 从 Linux OMI (omicli) 到 Windows WMI 的连接失败,并出现与 DMTF 相关的错误
- libcurl错误失败的写作已接收到磁盘/应用程序的数据
- std::timed_mutex::try_lock*错误失败