nicole_coco 2025-02-19 19:15 采纳率: 58.3%
浏览 36

ubuntu ns3文件编译问题

针对于一个ns3项目文件,执行.\waf configure之后。出现以下情况,我已经折腾很久了,但是还是没有解决。
这个项目使用的ns3为ns3 3.17,我使用的python环境是2.7

coco@coco-virtual-machine:~/Desktop/Hawkeye-NS3$ CC='gcc-5' CXX='g++-5' ./waf configure --with-pybindgen=/home/coco/.local/lib/python2.7/site-packages
Setting top to                           : /home/coco/Desktop/Hawkeye-NS3 
Setting out to                           : /home/coco/Desktop/Hawkeye-NS3/build 
Checking for 'gcc' (c compiler)          : gcc-5 
Checking for 'g++' (c++ compiler)        : g++-5 
Checking for compilation flag -Wl,--soname=foo... support : ok 
Checking for program python                               : /usr/bin/python 
Checking for python version                               : (2, 7, 18, 'final', 0) 
Checking for library python2.7 in LIBDIR                  : not found 
Checking for library python2.7 in python_LIBPL            : not found 
Checking for library python2.7 in $prefix/libs            : not found 
Checking for library python2.7m in LIBDIR                 : not found 
Checking for library python2.7m in python_LIBPL           : not found 
Checking for library python2.7m in $prefix/libs           : not found 
Checking for library python27 in LIBDIR                   : not found 
Checking for library python27 in python_LIBPL             : not found 
Checking for library python27 in $prefix/libs             : not found 
Checking for program /usr/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/bin/python2.7-config 
Checking for header Python.h                                                                     : :-( 
Asking python-config for pyembed --cflags flags                                                  : yes 
Asking python-config for pyembed --libs flags                                                    : yes 
Asking python-config for pyembed --ldflags flags                                                 : yes 
Getting pyembed flags from python-config                                                         : Could not build a python embedded interpreter 
Checking boost includes                                                                          : 1_74 
Checking boost libs                                                                              : not found 
Checking boost includes                                                                          : 1_74 
Checking boost libs                                                                              : not found 
Checking for click location                                                                      : not found 
Checking for program pkg-config                                                                  : /usr/bin/pkg-config 
Checking for 'gtk+-2.0' >= 2.12                                                                  : yes 
Checking for 'libxml-2.0' >= 2.7                                                                 : yes 
Checking for type uint128_t                                                                      : not found 
Checking for type __uint128_t                                                                    : yes 
Checking high precision time implementation                                                      : 128-bit integer 
Checking for header stdint.h                                                                     : yes 
Checking for header inttypes.h                                                                   : yes 
Checking for header sys/inttypes.h                                                               : not found 
Checking for header sys/types.h                                                                  : yes 
Checking for header sys/stat.h                                                                   : yes 
Checking for header dirent.h                                                                     : yes 
Checking for header stdlib.h                                                                     : yes 
Checking for header signal.h                                                                     : yes 
Checking for header pthread.h                                                                    : yes 
Checking for header stdint.h                                                                     : yes 
Checking for header inttypes.h                                                                   : yes 
Checking for header sys/inttypes.h                                                               : not found 
Checking for library rt                                                                          : yes 
Checking for header netpacket/packet.h                                                           : yes 
Checking for NSC location                                                                        : not found 
Checking for 'sqlite3'                                                                           : yes 
Checking for header linux/if_tun.h                                                               : yes 
Checking for program sudo                                                                        : /usr/bin/sudo 
Checking for program valgrind                                                                    : not found 
Checking for 'gsl'                                                                               : yes 
Checking for compilation flag -Wno-error=deprecated-d... support                                 : ok 
Checking for compilation flag -Wno-error=deprecated-d... support                                 : ok 
Checking for compilation flag -fstrict-aliasing... support                                       : ok 
Checking for compilation flag -fstrict-aliasing... support                                       : ok 
Checking for compilation flag -Wstrict-aliasing... support                                       : ok 
Checking for compilation flag -Wstrict-aliasing... support                                       : ok 
Checking for program doxygen                                                                     : not found 
---- Summary of optional NS-3 features:
Python Bindings               : not enabled (Python library or headers missing)
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration     : not enabled (Required boost libraries not found)
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : not enabled (Python Bindings are needed but not enabled)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : not enabled (defaults to disabled)
Build examples                : not enabled (defaults to disabled)
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (3.018s)


  • 写回答

3条回答 默认 最新

  • 阿里嘎多学长 2025-02-19 19:16
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    ubuntu ns3文件编译问题

    你遇到的问题是,执行 .\waf configure 命令后,NS3 项目文件编译失败。已经尝试了很多解决方案,但是仍然没有解决。

    首先,NS3 3.17 版本需要 Python 2.7 或更高版本。请确保你的 Python 环境版本满足这个要求。

    其次,可能的解决方案是:

    1. 检查 NS3 项目文件中的依赖项是否正确。确保所有依赖项都已经安装和配置正确。
    2. 检查 Python 环境中的 PATH 变量是否正确。确保 Python 可以正确地找到 NS3 的依赖项。
    3. 尝试使用 --clean 选项来清除之前的编译结果,然后重新执行 .\waf configure 命令。
    4. 如果以上解决方案都不能解决问题,可以尝试查看 NS3 项目文件中的编译日志,了解具体的错误信息。

    如果你已经尝试了以上解决方案,但是仍然不能解决问题,可以提供更多的错误信息和项目文件的详细信息,我将尽力帮助你解决问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 2月19日