Search This Blog

Installing ns-2.1b9a on Fedora 8 / Ubuntu 9.04

Labels: , , ,

Kindly Note: Before you start installing ns-2.1b9a on Fedora 8/Ubuntu 9.04 please make sure you have installed gcc-3.3 and g++-3.3.

The patch required to install ns-2.1b9a on Fedora 8/Ubuntu 9.04 is designed and is available on the following link:

ns21b9a.patch

Following are the steps to install ns-2.1b9a on Fedora 8/Ubuntu 9.04:

1. Download ns-allinone-2.1b9a-gcc32.tar.gz

2. Download above given ns21b9a.patch

3. Untar ns-allinone-2.1b9a-gcc32.tar.gz. You will get a folder named ns-allinone-2.1b9a

4. Paste ns21b9a.patch in this folder and give the following command via terminal

    patch -p1 < ns21b9a.patch

5. Then give the following command

   ./install

You are done with it!

If you encounter any problem in downloading the patch, please follow this link:

http://www.mediafire.com/?4yy7dlrgub7cj6b

Hope it helps.

Regards,
Mohit P. Tahiliani


Comments (15)

I am just wondering why people still use ns version 2.1. The latest version is 2.35, right?

The latest version is ns-2.34.

Older versions of ns-2 are required sometimes because certain patches were designed with older versions of ns. These patches are compatible only with those versions of ns.

Regards,
Mohit P. Tahiliani

hi rohit when i try to install this i got this error.
In file included from /usr/include/c++/4.3/list:66,
from ./diffusion3/ns/difftimer.h:37,
from ./diffusion3/lib/main/timers.hh:42,
from ./diffusion3/lib/dr.hh:40,
from diffusion3/ns/diffagent.h:40,
from diffusion3/ns/diffagent.cc:33:
/usr/include/c++/4.3/bits/stl_algobase.h: At global scope:
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected unqualified-id before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected initializer before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected unqualified-id before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected initializer before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:232: error: function definition does not declare parameters
/usr/include/c++/4.3/bits/stl_algobase.h:252: error: function definition does not declare parameters
/usr/include/c++/4.3/bits/stl_algobase.h: In static member function ‘static bool std::__lexicographical_compare::__lc(const _Tp*, const _Tp*, const _Up*, const _Up*)’:
/usr/include/c++/4.3/bits/stl_algobase.h:904: error: expected unqualified-id before ‘(’ token
In file included from /usr/include/c++/4.3/vector:70,
from ./diffusion3/lib/nr/nr.hh:34,
from ./diffusion3/lib/main/message.hh:48,
from ./diffusion3/lib/main/filter.hh:41,
from ./diffusion3/lib/dr.hh:41,
from diffusion3/ns/diffagent.h:40,
from diffusion3/ns/diffagent.cc:33:
/usr/include/c++/4.3/bits/stl_vector.h: In member function ‘size_t std::vector<_Tp, _Alloc>::_M_check_len(size_t, const char*) const’:
/usr/include/c++/4.3/bits/stl_vector.h:1080: error: expected unqualified-id before ‘(’ token
In file included from /usr/include/c++/4.3/vector:71,
from ./diffusion3/lib/nr/nr.hh:34,
from ./diffusion3/lib/main/message.hh:48,
from ./diffusion3/lib/main/filter.hh:41,
from ./diffusion3/lib/dr.hh:41,
from diffusion3/ns/diffagent.h:40,
from diffusion3/ns/diffagent.cc:33:
/usr/include/c++/4.3/bits/stl_bvector.h: In member function ‘size_t std::vector::_M_check_len(size_t, const char*) const’:
/usr/include/c++/4.3/bits/stl_bvector.h:991: error: expected unqualified-id before ‘(’ token
make: *** [diffusion3/ns/diffagent.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

please help me.

dont mind mohit sorry for the name

Mohit, Actually i am working on ns-2 based wireless mesh network simulation where i have to change channel at interface of wireless node but i am unable to do so. I am using multi-interface patch developed by you. Kindly guide me how i can set data rate on the interface as well as tune a channel on a particular node interface instead of all nodes. Because in that patch, I have found that channel can be set but for all nodes after the topology has been created.
Best Regards,
Ejaz Ahmed

i am also trying to do this. if you get the solution please send me.

Hello Sashi and Ejaz,

I have provided a tcl file named "im3pmanual.tcl" in the tcl scripts folder provided on my blog "Revised: Adding Multiple Interface Support in NS2".

im3pmanual.tcl is a file wherein all nodes are not configured with same number of interfaces. There are some nodes with 2 interfaces and some with 3. Please refer that tcl file to know how to assign a particular channel to an interface.

Sashi, did u manage to solve the prb u posted regarding installation?

Hope it helps.

Regards,
Mohit P. Tahiliani

HI Mohit,
Actually i am working on ns-2.26 with gcc2.95 i have to install the patch SIP witch work o,nly with ns2.26 or ns2.1b9a t would like to try to install ns2.1b9a beacause the patch SIP do not work with ns2.26. you specifie that we must make sure if we have installed gcc-3.3 and g++-3.3 but i have gcc2.95 .ou. Kindly guide me how i can installed gcc-3.3 and g++-3.3.
i want to conserve both ns2.26 and ns2.1b9a in the same time to try to install the patch of SIP.

Best Regards,
imen.

Dear Mohit,

I downloaded your patches and it removed the majority of the error, However I encountered the same problem as Sashi:

...
from ./diffusion3/lib/nr/nr.hh:34,
from ./diffusion3/lib/main/message.hh:48,
from ./diffusion3/lib/main/filter.hh:41,
from ./diffusion3/lib/dr.hh:41,
from diffusion3/ns/diffagent.h:40,
from diffusion3/ns/diffagent.cc:33:
/usr/include/c++/4.3/bits/stl_bvector.h: In member function ‘size_t std::vector::_M_check_len(size_t, const char*) const’:
/usr/include/c++/4.3/bits/stl_bvector.h:991: error: expected unqualified-id before ‘(’ token
make: *** [diffusion3/ns/diffagent.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems.

Can you please help me!
Thank you
Vix

HI Mohit,
how to install gcc-3.3 and g++-3.3 on fedora8 (rq: i have an other version of gcc already installed gcc2.95)
Can you please help me Mohit!
Thank you
Imen

Hello,
I am new user of ns2. I would like to ask your help about the mobile-agents installation problems .

I need to integrate ns2.32 or ns2.34 with (http://www.cs.lamar.edu/faculty/osborne/Thesis/mobile-agents.tar)working on ns-2.1b9a.
But, when I modify NS-2.34 , it throws me error message.
please, show me steps how to install it in ns2.3x ?
thank you very much.

hello sir,i need to install ns-2.19ba in ubuntu 10.04 . whenever i run command make command it gives error at every time.. please sir provide me patch for it..

hello sir,Is this patch works in ubuntu10.04?

how to install gcc-3.3 and g++-3.3. on ubuntu 10.04 ?

during installation i got msg
creating Makefile
creating tkConfig.sh
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I/tmp/ns-allinone-2.1b9a/tk8.3.2/unix -I/tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic -I/tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../bitmaps -I/tmp/ns-allinone-2.1b9a/tcl8.3.2/generic -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 -DSTATIC_BUILD=1 -DTCL_NO_DEPRECATED /tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic/tk3d.c
In file included from /tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic/tkInt.h:21:0,
from /tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic/tk3d.h:18,
from /tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic/tk3d.c:16:
/tmp/ns-allinone-2.1b9a/tk8.3.2/unix/../generic/tk.h:83:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.3.2 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
What should i do????Plz help me...