问题描述
我试图通过在Windows 7上的Cygwin上键入以下命令来下载,构建和测试NS-3:
$ cd
$然后我将目录更改为bake目录并输入:
$ mkdir工作区
$ cd工作区
$ hg克隆http://code.nsnam.org/bake
$ export BAKE_HOME =`pwd`
$ export PATH = $ PATH:$ BAKE_HOME:$ BAKE_HOME:$ BAKE_HOME / build / bin
$ export PYTHONPATH = $ PYTHONPATH:$ BAKE_HOME:$ BAKE_HOME / build / lib
然后:
./ bake.py configure -e ns-3.25
屏幕上没有显示任何内容然后输入:
./ bake.py check
我在屏幕上显示以下内容:
Python - OK
> GNU C ++编译器 - OK
> Mercurial - OK
> CVS - OK
> GIT - OK
> Bazaar - OK
>焦油工具 - OK
>解压缩工具 - OK
> Unrar工具 - 缺少
> 7z数据压缩实用程序 - OK
> XZ数据压缩实用程序 - OK
> Make - OK
> cMake - OK
>补丁工具 - OK
> autoreconf工具 - OK
>路径搜索工具:/ usr / local / bin / usr / bin /cygdrive/d/app/user/product/11.2.0/DB_HOME/bin /cygdrive/d/app/user/product/11.2.0/dbhome_1/ bin / cygdrive / c / Windows / system32 / cygdrive / c / Windows / cygdrive / c / Windows / System32 / Wbem /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/cygdrive/c/程序文件(x86)/ Microsoft SQL Server / 100 / Tools / Binn / cygdrive / c / Program Files(x86)/ Microsoft SQL Server / 100 / DTS / Binn / cygdrive / c / Program Files(x86)/ Skype / Phone / cygdrive / user / AppData / Local / Programs / MiKTeX 2.9 / miktex / bin / x64 / usr / lib / lapack / home / user-PC / ns-3-allinone-74b94ecd0120 / ns-3-dev / bake / workspace / bake / home / user-PC / ns-3-allinone-74b94ecd0120 / ns-3-dev / bake / workspace / bake / build / bin / home / bake / workspace / bake / home / user-PC / ns-3-allinone-74b94ecd0120 / ns-3-dev / bake / workspace / bake / build / lib
然后我在命令prompot上输入:
$ ./bake .py下载
我必须得到以下内容才能完成此过程:
>>正在下载gccxml-ns3(目标目录:gccxml) - OK
>>搜索系统依赖性python-dev - OK
>>搜索系统依赖项pygraphviz - OK
>>搜索系统依赖关系pygoocanvas - OK
>>搜索系统依赖关系setuptools - OK
>>搜索系统依赖性g ++ - OK
>>搜索系统依赖关系qt4 - OK
>>正在下载pygccxml - OK
>>下载netanim-3.107 - OK
>>正在下载pybindgen-0.17.0.post49 + ng0e4e3bc(目标目录:pybindgen) - OK
>>下载ns-3.25 - OK
但我遇到了以下问题,获取所需的依赖关系:
$ ./bake.py download
>>搜索系统依赖关系qt4 - OK
>>搜索系统依赖性g ++ - OK
>>搜索系统依赖关系setuptools - 问题
>问题:可选依赖性,模块setuptools不可用
这可能会降低最终构建的功能。
然而,bake将继续,因为setuptools不是一个重要的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>搜索系统依赖关系pygoocanvas - 问题
>问题:可选的依赖,模块pygoocanvas不可用
这可能会降低最终构建的功能。
然而,bake会继续,因为pygoocanvas不是一个重要的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>搜索系统依赖pygraphviz - 问题
>问题:可选依赖关系,模块pygraphviz不可用
这可能会降低最终构建的功能。
然而,bake会继续,因为pygraphviz不是一个重要的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>搜索系统依赖性python-dev - OK
>>正在下载gccxml-ns3(目标目录:gccxml) - Problem
>问题:可选依赖性,模块gccxml-ns3失败
这可能会降低最终构建的功能。
然而,bake将继续,因为gccxml-ns3不是必需的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>正在下载pygccxml - Problem
>问题:可选依赖关系,模块pygccxml失败
这可能会降低最终构建的功能。
然而,bake会继续,因为pygccxml不是一个重要的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>下载netanim-3.107 - Problem
>问题:可选依赖性,模块netanim-3.107失败
这可能会降低最终构建的功能。
然而,bake将继续,因为netanim-3.107不是一个重要的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>下载pybindgen-0.17.0.post49 + ng0e4e3bc(目标目录:pybindgen) - Problem
>问题:可选依赖关系,模块pybindgen-0.17.0.post49 + ng0e4e3bc失败
这可能会降低最终构建的功能。
然而,bake会继续,因为pybindgen-0.17.0.post49 + ng0e4e3bc不是一个基本的依赖。
有关详细信息,请使用-v或-vvv调用bake,以获取完整详细模式。
>>正在下载ns-3.25 - Problem
>错误:严重依赖,模块ns-3.25失败
有关更多信息调用使用--debug和/或-v,-vvv进行完全详细模式(bake --help)
解决方案看来你缺少Unrar工具。我没有cygwin在这里测试,但你迁移尝试:
wget http://www.rarlab.com/ rar / unrarsrc-5.1.7.tar.gz
tar -xzvf unrarsrc-5.1.7.tar.gz
cd unrar
make
,然后再次执行bake下载。
资料来源:
I am trying to download, build and test NS-3 using bake by typing the following commands on Cygwin on windows 7:
$ cd $ mkdir workspace $ cd workspace $ hg clone http://code.nsnam.org/bake
Then I changed the directory to bake directory and typed:
$ export BAKE_HOME=`pwd` $ export PATH=$PATH:$BAKE_HOME:$BAKE_HOME/build/bin $ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME:$BAKE_HOME/build/lib
Then :
./bake.py configure -e ns-3.25
I got nothing displayed on the screen and then typed:
./bake.py check
I got the following displayed on the screen:
> Python - OK > GNU C++ compiler - OK > Mercurial - OK > CVS - OK > GIT - OK > Bazaar - OK > Tar tool - OK > Unzip tool - OK > Unrar tool - is missing > 7z data compression utility - OK > XZ data compression utility - OK > Make - OK > cMake - OK > patch tool - OK > autoreconf tool - OK > Path searched for tools: /usr/local/bin /usr/bin /cygdrive/d/app/user/product/11.2.0/DB_HOME/bin /cygdrive/d/app/user/product/11.2.0/dbhome_1/bin /cygdrive/c/Windows/system32 /cygdrive/c/Windows /cygdrive/c/Windows/System32/Wbem /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0 /cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn /cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn /cygdrive/c/Program Files (x86)/Skype/Phone /cygdrive/c/Users/user/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64 /usr/lib/lapack /home/user-PC/ns-3-allinone-74b94ecd0120/ns-3-dev/bake/workspace/bake /home/user-PC/ns-3-allinone-74b94ecd0120/ns-3-dev/bake/workspace/bake/build/bin bin /home/user-PC/ns-3-allinone-74b94ecd0120/ns-3-dev/bake/workspace/bake /home/user-PC/ns-3-allinone-74b94ecd0120/ns-3-dev/bake/workspace/bake/build/lib
Then I typed on the command prompot:
$ ./bake.py download
I have to get the following in order to complete this process:
>> Downloading gccxml-ns3 (target directory:gccxml) - OK >> Searching for system dependency python-dev - OK >> Searching for system dependency pygraphviz - OK >> Searching for system dependency pygoocanvas - OK >> Searching for system dependency setuptools - OK >> Searching for system dependency g++ - OK >> Searching for system dependency qt4 - OK >> Downloading pygccxml - OK >> Downloading netanim-3.107 - OK >> Downloading pybindgen-0.17.0.post49+ng0e4e3bc (target directory:pybindgen) - OK >> Downloading ns-3.25 - OK
But I got the following problems and I do not have an idea how to get the needed dependencies:
$ ./bake.py download >> Searching for system dependency qt4 - OK >> Searching for system dependency g++ - OK >> Searching for system dependency setuptools - Problem > Problem: Optional dependency, module "setuptools" not available This may reduce the functionality of the final build. However, bake will continue since "setuptools" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Searching for system dependency pygoocanvas - Problem > Problem: Optional dependency, module "pygoocanvas" not available This may reduce the functionality of the final build. However, bake will continue since "pygoocanvas" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Searching for system dependency pygraphviz - Problem > Problem: Optional dependency, module "pygraphviz" not available This may reduce the functionality of the final build. However, bake will continue since "pygraphviz" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Searching for system dependency python-dev - OK >> Downloading gccxml-ns3 (target directory:gccxml) - Problem > Problem: Optional dependency, module "gccxml-ns3" failed This may reduce the functionality of the final build. However, bake will continue since "gccxml-ns3" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Downloading pygccxml - Problem > Problem: Optional dependency, module "pygccxml" failed This may reduce the functionality of the final build. However, bake will continue since "pygccxml" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Downloading netanim-3.107 - Problem > Problem: Optional dependency, module "netanim-3.107" failed This may reduce the functionality of the final build. However, bake will continue since "netanim-3.107" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Downloading pybindgen-0.17.0.post49+ng0e4e3bc (target directory:pybindgen) - Problem > Problem: Optional dependency, module "pybindgen-0.17.0.post49+ng0e4e3bc" failed This may reduce the functionality of the final build. However, bake will continue since "pybindgen-0.17.0.post49+ng0e4e3bc" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode. >> Downloading ns-3.25 - Problem > Error: Critical dependency, module "ns-3.25" failed For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)
解决方案It seems you are missing "Unrar tool". I don't have cygwin to test here, but you migth try:
wget http://www.rarlab.com/rar/unrarsrc-5.1.7.tar.gz tar -xzvf unrarsrc-5.1.7.tar.gz cd unrar make
and then run bake download again.
Source: https://wjianz.wordpress.com/2014/09/28/howto-extract-rar-files-on-cygwin/
这篇关于如何安装和构建NS-3使用烘焙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!