Chinaunix首页 | 论坛 | 博客
  • 博客访问: 214847
  • 博文数量: 58
  • 博客积分: 2807
  • 博客等级: 少校
  • 技术积分: 610
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-09 14:18
文章分类

全部博文(58)

文章存档

2012年(1)

2011年(17)

2010年(40)

我的朋友

分类: LINUX

2011-09-28 15:57:31

NS2的版本为2.34,Ubuntu版本为
安装过程中
NS2 can't find X includes 
sudo apt-get install libxt-dev

ns-allinone-2.34 installs on Ubuntu Intrepid 8.10. Make sure you have the following packages installed:

libxt-dev libx11-dev libxmu-dev

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.



设置环境变量加入到  ~/.bashrc

PATH="$PATH":/home/lizhipeng/Downloads/ns-allinone-2.34/bin:/home/lizhipeng/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/lizhipeng/Downloads/ns-allinone-2.34/tk8.4.18/unix

LD_LIBRARY_PATH="/home/lizhipeng/Downloads/ns-allinone-2.34/otcl-1.13:/home/lizhipeng/Downloads/ns-allinone-2.34/lib"

TCL_LIBRARY="/home/lizhipeng/Downloads/ns-allinone-2.34/tcl8.4.18/library"



阅读(2364) | 评论(0) | 转发(0) |
0

上一篇:Blog重新启用

下一篇:NS2.34环境变量设置

给主人留下些什么吧!~~