LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Re: Help regarding installation of NS-2.27 on Ubuntu 9.10 (https://www.linuxquestions.org/questions/linux-newbie-8/re-help-regarding-installation-of-ns-2-27-on-ubuntu-9-10-a-782356/)

Scofield 01-15-2010 05:56 AM

Re: Help regarding installation of NS-2.27 on Ubuntu 9.10
 
Can anyone please help me with the steps to install NS 2.27 on Ubuntu 9.10.

Thank you,
Scofiled

Davno 01-16-2010 04:05 AM

Its all here:
http://nsnam.isi.edu/nsnam/index.php/User_Information

knudfl 01-16-2010 05:57 AM

'ns-2.27' .. .. Ubuntu 9.10 Karmic
 
Welcome to LQ. .. :)

General for all ns2 versions :
sudo apt-get install g++ autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev
.....
.....
Assume ns-allinone-2.27
You will need ns-allinone-2.34 too.

Edit ns-allinone-2.27/ns-2.27/Makefile.in , line 36-37 to :
CC = gcc-3.3
CPP = g++-3.3

.. and ns-allinone-2.27/nam-1.10/Makefile.in , line 44-45 :
The same.

The required g++-3.3 : sudo apt-get install g++-3.3
For that, hardy must be added to /etc/apt/sources.list
Code:

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

The g++-3.3 packages can also be found here
http://packages.ubuntu.com/hardy/g++-3.3
to do : sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb

Having ns-allinone-2.27/ and ns-allinone-2.34/ in the same directory
e.g. /home/"username"/ns2/ :
cd ns-allinone-2.27/
mv otcl-1.8/ back-otcl-1.8
mv tcl8.4.5/ back-tcl8.4.5
mv tclcl-1.15/ back-tclcl-1.15
mv tk8.4.5/ back-tk8.4.5

ln -s ../ns-allinone-2.34/tcl8.4.18/
ln -s ../ns-allinone-2.34/tcl8.4.18/ tcl8.4.5
ln -s ../ns-allinone-2.34/tk8.4.18/
ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5
ln -s ../ns-allinone-2.34/otcl-1.13/
ln -s ../ns-allinone-2.34/otcl-1.13/ otcl-1.8
ln -s ../ns-allinone-2.34/tclcl-1.19/
ln -s ../ns-allinone-2.34/tclcl-1.19/ tclcl-1.15

mkdir -p include
cd include/
ln -s ../tcl8.4.18/generic/tclInt.h
ln -s ../tcl8.4.18/generic/tclIntDecls.h
( These two links may already be present.)

Apply the tk-8.4-lastevent.patch in tk8.4.14.
Apply the otcl-113-configure.in.patch in otcl-1.13.

Then : ./install , in the ns-allinone-2.27/ top directory.

For more info : 'LQ Search' > "Tag Name" = ns2 ,
'LQ Search' > "Tag Name" = leach .

vichia 03-31-2010 08:07 AM

Thank you for your installation guide. I have to work with SIP simulation (which is only supported by ns2 2.27) so I followed your guide above, but there are some problems. What I did are :

I followed your link to install g++3.3 but I can't not do it because :
- g++-3.3_3.3.6-15ubuntu4_i386.deb requires libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb
- libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb requires g++-3.3_3.3.6-15ubuntu4_i386.deb

--> loop

So I install g++ via terminal : sudo apt-get install g++ ---> it is g++-4.4

Then I changed makefile.in as follow :
CC = gcc-3.3
CPP = g++-4.4

After that I did exactly what you said, and I encoutered this error with ./install command :
Quote:

otcl.o: In function `OTclDispatch':
/home/vichenka/Downloads/NS2_Installation/ns-allinone-2.27/otcl-1.8/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/vichenka/Downloads/NS2_Installation/ns-allinone-2.27/otcl-1.8/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
otcl-1.8 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Can you help me with this ?

knudfl 04-01-2010 04:34 AM

Post # 4 , @ vichia : Welcome to LQ. .. .. :) ..

"" --> loop "" .. or explained in another way :
Both packages depend on each other.
Please use "chain install" :
sudo dpkg -i <package> <package>

In fact, you could have done that from the very beginning ..
sudo dpkg -i <package> <package> <package> <package> <package>
Like shown in post # 3.
.....
.....
And the only reason for installing this 'g++-3.3' is :
The default g++ ( = g++-4.4 ) cannot be used with ns-2.27 !
.....

knudfl 04-19-2010 01:24 AM

1 Attachment(s)
Message from @ Scofield : .... QUOTE :
Hello Knudfl,
I have been working on LEACH protocol and installed it on NS2.27. I have some doubts regarding the files in MIT directory. Under MIT directory, we have a file leach_sims. I am unable to understand the contents of the files in leach_sims such as
1. What are the values represented in leach.alive , leach.data and leach.energy, leach.save1, leach.save2, startup.energy.
2. I have an error returned in leach.err that is
...... See attachment.

3. The leach.out file is empty without any values. Is any value is written in it
4. And also the values given in the file TDMAschedule.0.txt (files 0,20,40,........520)..
.......? why is the time taken upto 520 cycles ?
5. the values are calculated for 100 nodes... what should I do to calculate the values for 200, 300 upto 1000 nodes....

thanking you,
Scofield
------- end QUOTE ---------
EDIT : What is the command that causes the errors ?

Vivek pandey 04-23-2010 10:03 AM

I want to install mannasim in ns-2
But facing the errors like list no suh file or directory.
Errors are for headers of standard template libraries.

So can anyone please help me

Thankin You i Advance
Vivek

knudfl 04-24-2010 06:46 AM

Post #7 , @ Vivek pandey : welcome to LQ.

Mannasim is to be used in ns-allinone-2.29.3
The mannasim threads are found here :
LQ Search http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = mannasim

This thread is about ns-2.27, when you have more questions,
please start a new thread. And info about the used Linux, please... EL5 ?
Redhat EL5 or similar : no problems at all with
ns-allinone-2.29.3 + mannasim , if I remember right.
..
.. .. Good luck .. .. :)

_man_ouer 04-24-2010 12:29 PM

I try for some time to install ns-allinone 2.27 to use later leach
without success and I blocked it all the time at installation ns-allinone
and I have this error message.

Code:

Build tcl8.4.5
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for unistd.h... yes
checking for limits.h... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking for required early compiler flags...  _LARGEFILE64_SOURCE
checking for 64-bit integer type... long long
checking for struct dirent64... no
checking for struct stat64... yes
checking for off64_t... yes
checking whether byte ordering is bigendian... no
checking for getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoull... yes
checking for tmpnam... yes
checking for waitpid... yes
checking for strerror... yes
checking for getwd... yes
checking for wait3... yes
checking for uname... yes
checking for realpath... yes
checking dirent.h... yes
checking for errno.h... yes
checking for float.h... yes
checking for values.h... yes
checking for limits.h... (cached) yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... yes
checking for dlfcn.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for sys/modem.h... no
checking termios vs. termio vs. sgtty... termios
checking for fd_set in sys/types... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for tm_zone in struct tm... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking tm_tzadj in struct tm... no
checking tm_gmtoff in struct tm... yes
checking long timezone variable... yes
checking for st_blksize in struct stat... yes
checking for fstatfs... yes
checking for 8-bit clean memcmp... yes
checking for memmove... yes
checking proper strstr implementation... yes
checking for strtoul... yes
checking for strtod... yes
checking for strtod... (cached) yes
checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for socklen_t... yes
checking for opendir... (cached) yes
checking union wait... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for a putenv() that copies the buffer... no
checking for langinfo.h... yes
checking whether to use nl_langinfo... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking how to build libraries... static
checking for ranlib... ranlib
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.


also i couldn't found the patch

ubuntu 9.04

thank you for your help

knudfl 04-24-2010 12:59 PM

@_man_ouer , welcome to LQ. .. . :)

The install instructions are here :
http://www.linuxquestions.org/questi...10-a-782356/#3

And please read all the 'LEACH' posts, if any problems.
( There are six "leach" threads.)
LQ Search http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = leach

... Good luck.
...

_man_ouer 04-24-2010 01:36 PM

I'am sorry but i don't understand my problem

also i don't understand why i have problem with tcl8.3.2
because the package of ns-allinone2.27 contain tcl8.5.4

i tried to change the makefile.in
(the CC and CPP variable) but i have the same probleme

knudfl 04-24-2010 01:55 PM

# 11 : The word "tcl8.3.2" is just a typo in the install
script, not a real error. But anyway, tcl8.4.5 is not to
be used. You will have to use 8.4.18 like the instructions
say. And take your time. It is not uncomplicated.
..

_man_ouer 04-24-2010 02:55 PM

I followed the instructions that you mentioned
I have now surpassed the installation of tcl but it hangs at tk8


tcl8.4.5 installation succeeded.
============================================================
* Build Tk8.4.5
============================================================
cd: 386: can't cd to ./tk8.4.5/unix
./install: 393: ./configure: not found
tk8.3.2 configuration failed! Exiting ...

even though I followed all the instructions

knudfl 04-24-2010 03:00 PM

#13 : Forgot a link ?

ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5

..

_man_ouer 04-24-2010 03:23 PM

thank you a lot Mr knudfl

i found it too after posting my message , :redface:

but now the make of NS return an error with trace/trace.o:scratch:

Code:

ns-allinone-2.27/tclcl-1.15/tclcl-config.h:37:1: attention : ceci est la localisation d'une précédente définition
In file included from trace/trace.cc:39:
./common/packet.h: In constructor ‘p_info::p_info()’:
./common/packet.h:170: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:171: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:172: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:173: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:174: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:175: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:176: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:177: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:178: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:179: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:180: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:181: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:182: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:183: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:184: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:185: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:186: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:187: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:188: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:189: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:191: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:192: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:193: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:194: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:195: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:196: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:198: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:199: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:200: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:201: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:202: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:203: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:204: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:205: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:206: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:207: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:208: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:209: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:210: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:211: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:213: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:214: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:216: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:217: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:218: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:221: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:224: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:227: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:230: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:233: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:236: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:240: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:244: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:245: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:247: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:248: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:251: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:253: attention : deprecated conversion from string constant to ‘char*’
In file included from trace/trace.cc:42:
./sctp/sctp.h: At global scope:
./sctp/sctp.h:69: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:82: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:91: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:122: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:137: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:149: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:178: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:190: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:196: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:208: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:216: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:228: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:249: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:255: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:260: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:267: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:269: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:278: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:293: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:374: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:380: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:421: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:432: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:440: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:447: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:453: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:464: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:483: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:488: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:494: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:501: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:507: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:632: erreur: extra qualification ‘SctpAgent::’ on member ‘DumpSendBuffer’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
make: *** [trace/trace.o] Erreur 1
Ns make failed!



could you help me with this please
thank you a lot


All times are GMT -5. The time now is 06:03 PM.