NS2安装笔记 - Ubuntu9.10
来源:互联网 发布:windows cortana如何 编辑:程序博客网 时间:2024/04/30 07:04
转帖:http://blog.csdn.net/wuyanna1989/archive/2010/01/02/5119823.aspx
参考书推荐:《NS与网络模拟》 - 徐雷鸣等
1. NS2下载
官网提供最新版本的下载: http://www.isi.edu/nsnam/ns/ , 我下载的版本是NS2.34, 下载的文件为ns-allinone-2.34.tar.gz 。
下载完后将它解压缩到主文件夹下(我的是 /home/yanna):
tar xvfz ns-allinone-2.34.tar.gz
2. 需要用到的软件包
build-essential
tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
libxmu-dev
3. 安装
cd /home/yanna/ns-allinone-2.34
sudo ./install
4. 出错处理
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/yanna/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/yanna/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] 错误 1cd ns-2.34; ./validate
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
在官网上有解决方案,应该是个BUG,会在以后版本中解决:
For Ubuntu 9.10 (karmic), you may encounter this error in the linking of otcl:
otcl.o: In function `OTclDispatch':
/home/ns/ns-allinone-2.34/otcl/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/ns/ns-allinone-2.34/otcl/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
This error is because the linker being used is "ld -shared" instead of "gcc -shared". If you edit one line in otcl-1.13/configure, and rerun install, it should work:
--- configure.orig 2009-11-02 12:14:52.556167945 -0800
+++ configure 2009-11-02 12:17:28.966706099 -0800
@@ -6301,7 +6301,7 @@
;;
Linux*)
SHLIB_CFLAGS="-fpic"
- SHLIB_LD="ld -shared"
+ SHLIB_LD="gcc -shared"
SHLIB_SUFFIX=".so"
DL_LIBS="-ldl"
SHLD_FLAGS=""
This will be fixed in future revisions of ns-2.
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/yanna/ns-allinone-2.34/otcl-1.13, /home/yanna/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>
(2) You MUST put /home/yanna/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
LD_LIBRARY_PATH="/home/yanna/ns-allinone-2.34/otcl-1.13:/home/yanna/ns-allinone-2.34/lib"
TCL_LIBRARY="$TCL_LIBRARY:/home/yanna/ns-allinone-2.34/tcl8.4.18/library"
- NS2安装笔记 - Ubuntu9.10
- NS2安装笔记 - NS2.34 Under Ubuntu9.10
- ubuntu9.04-ns2安装
- ubuntu9.04下的ns2安装问题
- Ubuntu9.10下常用软件的安装笔记
- Ubuntu9.10安装LTSP
- 硬盘安装Ubuntu9.10
- wubi安装ubuntu9.10
- 本地 安装 Ubuntu9.10
- ubuntu9.10安装simplescalar
- ubuntu9.10安装mysql
- ubuntu9.10安装NX
- ubuntu9.10安装wine
- ubuntu9.10 硬盘安装
- Wubi安装Ubuntu9.10
- NS2安装笔记---SUSE Linux
- ubuntu9.04+ns2-allinone-2.34
- ubuntu9.10 安装scim 输入法
- 2PC,3PC和Paxos分布式一致性算法
- 虚拟化技术改变传统文件备份战略
- NFS文档(FOR LINUX)
- 用MFC打开一个文件
- C#索引器
- NS2安装笔记 - Ubuntu9.10
- 再看一个内存对齐的例子
- CEGUI 类列表 Class List
- Linux下创建静态、动态库
- 在LoadRunner中进行Base64的编码和解码
- Javascript 中的常见问题 IE 和 FIREFOX在解析CSS方面的区别
- Linux命令行修改ip
- 套期保值
- 把鸡蛋放在一个篮子里了,呜呜。。。!