Skip to content

Solved : Problem and Step-by-Step Installing NS-2.34 On Ubuntu 12.04 LTS

A few days ago, I installed my new PC in my lab with Ubuntu 12.04 LTS. I used to work with Ubuntu 10.04 LTS, but now I want to try Ubuntu 12.04. For my research purpose, I need to install Network Simulation NS-2 on it. As usual everything is not that easy while you’re going to work with Open Source or freeware…hehehe. That’s the challenges in Open Source. I like it.

I found some problem when installed NS-2.34 on Ubuntu 12.04.  So, I suggest you before you upgrade or install new OS, check for its compatibility issues, such as gcc, and g++ compiler. In Ubuntu 12.04, the compiler version is 4.6. Otherwise NS-2 have some compatibility problem with gcc-4.6 version. That’s why you need to install older gcc version, in this post I used gcc-4.4 version. To install gcc-4.4 and g++-4.4 do following command :

STEP 1:  ~$ sudo apt-get install gcc-4.4 g++-4.4

First of all before installing NS-2, you need to update and install your Ubuntu library.

STEP 2: ~$ sudo apt-get install libxt-dev libx11-dev libxmu-dev xorg-dev xgraph

After download ns-allinone-2.34 package, then extract ns-allinone-2.34.tar.gz into your home directory. After that you will get into your ns-allinone-2.34 in your home directory..

STEP 3: ~$ cd /home/abdusy/ns-allinone-2.34

And for installation, we use type this simple command, right?

STEP 10: ~$ ./install

But wait a minute…….patient please. If you did that STEP 10 then you would find error message like this:

g++ -c -g -O2 -Wall …tools/ranvar.o tools/ranvar.cc
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’
make[1]: *** [tools/ranvar.o] Error 1

Don’t be panic. That’s why I told you before….It’s only a challenge to make you more interested in Open Source. So, I highly recommend you to have some modification before you do STEP 10. There are files you need to modified as follows:

  • otcl-1.13/configure
  • tools/ranvar.cc
  • mobile/nakagami.cc
  • tcl8.4.18/unix/Makefile.in
  • ns-2.34/Makefile
  • ns-2.34/Makefile.in

 Due to the linking error problem :

otcl.o: In function `OTclDispatch’:
/home/abdusy/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local’
otcl.o: In function `Otcl_Init’:
/home/abdusy/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] Error 1
otcl-1.13 make failed! Exiting …
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

To solved this problem, fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure. We need to edit one line 6304  in otcl-1.13/configure as follows:

STEP 4:  ~$ gedit /home/abdusy/ns-allinone-2.34/otcl-1.13/configure

Linux*)
SHLIB_CFLAGS=”-fpic”
#SHLIB_LD=”ld -shared”       //disabled this line
SHLIB_LD=”gcc -shared”       // add this line
SHLIB_SUFFIX=”.so”
DL_LIBS=”-ldl”
SHLD_FLAGS=””
;;

The next file you need to modified is ns-2.34/tools/ranvar.cc and change the line 219.

STEP 5 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/tools/ranvar.cc 

SOLVED:
double GammaRandomVariable::value()
{
// Proposed by Marsaglia in 2000:
// G. Marsaglia, W. W. Tsang: A simple method for gereating Gamma variables
// ACM Transactions on mathematical software, Vol. 26, No. 3, Sept. 2000
if (alpha_ < 1) {
  double u = rng_->uniform(1.0);
  //return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); /*  Disabled*/
  return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); /*add this line*/
}

Next step is change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc.  
STEP 6 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/mobile/nakagami.cc

SOLVED:
if (int_m == m) {
//resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
} else {
//resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();
resultPower = GammaRandomVariable(m, Pr/m).value();
}

 The next step is to edit line 270 in tcl8.4.18/unix/Makefile.in.

STEP 7 : ~$ gedit /home/abdusy/ns-allinone-2.34/tcl8.4.18/Makefile.in

SOLVED:
#CC = @CC@
CC = @CC@-4.4

To used gcc-4.4 and g++-4.4 as compiler to compile ns-allinone-2.34, change the line 36-37 in ns-2.34/Makefile.in.

STEP 8 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile.in

SOLVED:
#CC = @CC@
#CPP = @CXX@
CC = @CC@-4.4
CPP = @CXX@-4.4

Also change the line 36-37  in ns-2.34/Makefile 

STEP 9 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile 

SOLVED:
#CC = gcc
#CPP = g++
CC = gcc-4.4
CPP = g++-4.4

 That’s it…..After that you can back re-run STEP 10. Have a nive day…Bonne Journée 😀 .

43 thoughts on “Solved : Problem and Step-by-Step Installing NS-2.34 On Ubuntu 12.04 LTS”

  1. Sir,
    while installing ns2-2.34 on Ubuntu 12.04 LTS it is giving the following error
    gcc -c -DNO_TK -DNDEBUG -DUSE_SHM -DHAVE_ZLIB_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -I. -I/usr/include -I/home/mtech/ns-allinone-2.34/otcl-1.13 -I/home/mtech/ns-allinone-2.34/include -I/home/mtech/ns-allinone-2.34/include -I/home/mtech/ns-allinone-2.34/include -o tcl2c++.o tcl2c++.c
    rm -f tcl2c++
    g++ -o tcl2c++ tcl2c++.o
    make: g++: Command not found
    make: *** [tcl2c++] Error 127
    tclcl-1.19 make failed! Exiting …
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    and i also want to inform that
    as you suggested
    ” Also change the line 36-37 in ns-2.34/Makefile
    STEP 9 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile
    SOLVED:
    #CC = gcc
    #CPP = g++
    CC = gcc-4.4
    CPP = g++-4.4 ”
    I did not findMakefile there. So, i did not change that. Can you please suggest me what to do.

  2. Sir,
    i have installed ns 2.34 following the instruction provided by you on ubuntu 12.04. I want to simulate routing protocol of WSN like LEACH,DEED,GAF etc. Please help me what i do next to do the same..Thank u

  3. Add a line after line 64 in ns-2.34/mac/mac-802_11Ext.h to read:
    #include
    then it will work properly for ns2.34allinone

  4. Dear sir, when i am patching up leach protocol into ns2.34 it shows the following error
    cp: cannot create directory `/mohd/ns-allinone-2.34/ns-2.34′: No such file or directory
    cp: target `/mohd/ns-allinone-2.34/ns-2.34/apps’ is not a directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/mac’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/mac’: No such file or directory
    cp: target `/mohd/ns-allinone-2.34/ns-2.34/mac’ is not a directory
    cp: target `/mohd/ns-allinone-2.34/ns-2.34/mac’ is not a directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/mac’: No such file or directory
    cp: target `/mohd/ns-allinone-2.34/ns-2.34/mac’ is not a directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/trace’: No such file or directory
    cp: target `/mohd/ns-allinone-2.34/ns-2.34/common’ is not a directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/common’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/tcl/mobility’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/tcl/mobility’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/tcl/mobility’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/tcl/mobility’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34/tcl/ex’: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34′: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34′: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34′: No such file or directory
    cp: cannot create regular file `/mohd/ns-allinone-2.34/ns-2.34′: No such file or directory

  5. hello sir m getting d following error plz help me out..
    linkstate/ls.cc: In member function ‘int LsRetransmissionManager::ackIn(int, const LsMessage&)’:
    linkstate/ls.cc:448:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    In file included from linkstate/ls.cc:67:0:
    linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
    linkstate/ls.cc:396:28: required from here
    linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map<int, LsIdSeq, std::less, std::allocator<std::pair > >’ are not found by unqualified lookup
    linkstate/ls.h:137:20: note: use ‘this->erase’ instead
    make: *** [linkstate/ls.o] Error 1
    Ns make failed!
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

  6. sir,i followed all the steps above you provided..and installed ns2.34 in uduntu 12.04,while validating i got this
    Running test aloha:
    ../../ns test-suite-satellite.tcl aloha QUIET
    Test output agrees with reference output
    Running test aloha.collisions:
    ../../ns test-suite-satellite.tcl aloha.collisions QUIET
    Test output agrees with reference output
    Running test mixed.legacy:
    ../../ns test-suite-satellite.tcl mixed.legacy QUIET
    Test output agrees with reference output
    All test output agrees with reference output.
    Mon Feb 18 06:05:18 IST 2013
    These messages are NOT errors and can be ignored:
    warning: using backward compatibility mode
    This test is not implemented in backward compatibility mode
    validate overall report: some portable tests failed:
    ./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
    some non-portable tests also failed:
    ./test-all-session
    to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
    yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$
    i am using ns-2.34-bgp_2.0 patch for using bgp protocol..
    > cd ~/ns-allinone-2.34/ns-2.34
    > ./configure
    > make clean ; make
    while executing last step
    i got this error
    bgp/Util/ipaddress.cc: In constructor ‘IPaddress::IPaddress(std::string)’:
    bgp/Util/ipaddress.cc:163: warning: comparison between signed and unsigned integer expressions
    bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’:
    bgp/Util/ipaddress.cc:279: warning: comparison between signed and unsigned integer expressions
    bgp/Util/ipaddress.cc:295: error: ‘sprintf’ was not declared in this scope
    bgp/Util/ipaddress.cc: In member function ‘boolVector IPaddress::str2bin(std::string)’:
    bgp/Util/ipaddress.cc:310: warning: comparison between signed and unsigned integer expressions
    bgp/Util/ipaddress.cc: In member function ‘int IPaddress::intval()’:
    bgp/Util/ipaddress.cc:420: warning: comparison between signed and unsigned integer expressions
    bgp/Util/ipaddress.cc: In member function ‘int IPaddress::masked_intval(int)’:
    bgp/Util/ipaddress.cc:580: warning: comparison between signed and unsigned integer expressions
    bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’:
    bgp/Util/ipaddress.cc:667: error: ‘sprintf’ was not declared in this scope
    bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’:
    bgp/Util/ipaddress.cc:698: error: ‘sprintf’ was not declared in this scope
    make: *** [bgp/Util/ipaddress.o] Error 1
    yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$
    i did this also
    udo apt-get install \
    > g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev
    but i checked gcc version through this gcc -v
    yashwanth@ubuntu:~$ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
    Target: i686-linux-gnu
    Configured with: ../src/configure -v –with-pkgversion=’Ubuntu/Linaro 4.6.3-1ubuntu5′ –with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –program-suffix=-4.6 –enable-shared –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-gxx-include-dir=/usr/include/c++/4.6 –libdir=/usr/lib –enable-nls –with-sysroot=/ –enable-clocale=gnu –enable-libstdcxx-debug –enable-libstdcxx-time=yes –enable-gnu-unique-object –enable-plugin –enable-objc-gc –enable-targets=all –disable-werror –with-arch-32=i686 –with-tune=generic –enable-checking=release –build=i686-linux-gnu –host=i686-linux-gnu –target=i686-linux-gnu
    Thread model: posix
    gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
    i am not able to run the bgp configured tcl file…please help me out..

  7. Respected Sir ,
    i modified all the files as per ur instruction but for installation i am getting following error
    ./install: 522: ./install: ./configure: Permission denied
    tclcl-1.19 configuration failed! Exiting …
    please help

    1. I got similar problem and my solution is to navigate to tclcl directory from terminal and then run sudo ./configure

    2. If above solution doesn`t work, then try sudo chown -R yourname ns-allinone-2.34/’
      … to change file access permission and don`t use sudo in later commands ( ./configure and then ./install and so on).

  8. Dear Sir,
    when i am installing ns-allinone-2.34 on ubuntu12.10 the following error:
    checking for a BSD-compatible install… /usr/bin/install -c
    configure: creating ./config.status
    config.status: creating Makefile
    rm -f libotcl.so otcl.o so_locations
    gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/sameer/ns-allinone-2.34/include -I/home/sameer/ns-allinone-2.34/include -I/home/sameer/ns-allinone-2.34/include -I/include otcl.c
    ld -shared -o libotcl.so otcl.o
    otcl.o: In function `OTclDispatch’:
    /home/sameer/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local’
    otcl.o: In function `Otcl_Init’:
    /home/sameer/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: Bad value
    make: *** [libotcl.so] Error 1
    otcl-1.13 make failed! Exiting …
    Sir please help me ……

  9. i hv executd leach code on ns-2.34 with gcc-4.4…..bt i dnt know what will b the output and how can i find dat code hs been executed successfully…….

  10. hai.. very nice post..
    then what about ns2.31 in ubuntu 12.04 i still have a problem
    now i doing my project
    salam dari almamater kuning

  11. gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile
    this gives me a new file . Makefile does not exist in ns-allinone-2.34/ns-2.34/

  12. config.status: creating Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    rm -f tcl2c++
    g++ -o tcl2c++ tcl2c++.o
    make: g++: Command not found
    make: *** [tcl2c++] Error 127

  13. is the following can be solved ?
    i read some posts saying because of 64-bit machine, is that true ?
    validate overall report: some portable tests failed:
    ./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-diffusion3 ./test-all-smac ./test-all-manual-routing ./test-all-links ./test-all-WLtutorial ./test-all-wireless-infra ./test-all-wireless-infra-mobility ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-gridkeeper ./test-all-wireless-lan-newnode ./test-all-wireless-lan-newnode-80211Ext ./test-all-wpan ./test-all-energy
    some non-portable tests also failed:
    ./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma
    to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
    please help

  14. perfectly working… very nicely given description. Sir can you also give a description for running LEACH protocol on ns2.34 with gcc4.4..

  15. packmime/packmime_OL.o packmime/packmime_OL_ranvar.o packmime/packmime_ranvar.o tmix/tmix.o tmix/tmix_delaybox.o gen/version.o gen/ns_tcl.o gen/ptypes.o common/win32.o common/tkAppInit.o -L/home/ganesh/ns2/ns-allinone-2.34/tclcl-1.19 -ltclcl -L/home/ganesh/ns2/ns-allinone-2.34/otcl -lotcl -L/home/ganesh/ns2/ns-allinone-2.34/lib -ltk8.4 -L/home/ganesh/ns2/ns-allinone-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm
    for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
    make[1]: Entering directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest’
    make[1]: Entering directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec’
    make[1]: Entering directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa’
    make[1]: Entering directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr’
    make[1]: Entering directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/ganesh/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb’
    ganesh@ubuntu:~/ns2/ns-allinone-2.34/ns-2.34$

  16. Hi,thank you for forum.
    I have the same error, can you help me :
    for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
    make[1]: Entering directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest’
    make[1]: Entering directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec’
    make[1]: Entering directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa’
    make[1]: Entering directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr’
    make[1]: Entering directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/home/leach/ns2/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb’
    make: warning: Clock skew detected. Your build may be incomplete.

    1. Those who read this comment, facing the same error.
      tcl8.4.18 make failed!
      Install ns2 only in home folder. This made my installation complete.

  17. Hi sir, i am trying to install NS2 2.34 with gcc-4.9 and getting few errors could you please suggest some solutions for this or what version of ns2 and gcc should i use to install on ubuntu 14.04.

  18. i think its actually 4.8 updated automatically even i typed 4.9
    and stilletting error while ./install command, eroor make: gcc-shared: Command not found
    make: *** [libotcl.so] Error 127
    otcl-1.13 make failed! Exiting …

  19. I tried to compile a new protocol for testing purpose on ns2.34. while i used “make myprotocol.cc” i got the error. And when I tried to run “./validate” in /ns-2.34 directory it gave the following output—-
    (Validation can take 1-30 hours to run.)
    Mon Oct 27 00:33:04 PDT 2014
    *** ./test-all-simple
    Tests: tahoe1 tahoe1Bytes tahoe1RED tahoe1REDbytes tahoe2 tahoe3 tahoe3RED tahoe4 no_bug bug reno1 reno renoA reno2 reno3 reno4 reno4a reno5 reno5_nobug telnet delayed phase phase1 phase2 timers manyflows stats statsECN stats1 stats1Bytes stats1a stats1aBytes statsHeaders stats2 stats3 stats4 statsTFRC
    Running test tahoe1:
    ../../ns test-suite-simple.tcl tahoe1 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe1Bytes:
    ../../ns test-suite-simple.tcl tahoe1Bytes QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe1RED:
    ../../ns test-suite-simple.tcl tahoe1RED QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe1REDbytes:
    ../../ns test-suite-simple.tcl tahoe1REDbytes QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe2:
    ../../ns test-suite-simple.tcl tahoe2 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe3:
    ../../ns test-suite-simple.tcl tahoe3 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe3RED:
    ../../ns test-suite-simple.tcl tahoe3RED QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test tahoe4:
    ../../ns test-suite-simple.tcl tahoe4 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test no_bug:
    ../../ns test-suite-simple.tcl no_bug QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test bug:
    ../../ns test-suite-simple.tcl bug QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno1:
    ../../ns test-suite-simple.tcl reno1 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno:
    ../../ns test-suite-simple.tcl reno QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test renoA:
    ../../ns test-suite-simple.tcl renoA QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno2:
    ../../ns test-suite-simple.tcl reno2 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno3:
    ../../ns test-suite-simple.tcl reno3 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno4:
    ../../ns test-suite-simple.tcl reno4 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno4a:
    ../../ns test-suite-simple.tcl reno4a QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno5:
    ../../ns test-suite-simple.tcl reno5 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test reno5_nobug:
    ../../ns test-suite-simple.tcl reno5_nobug QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test telnet:
    ../../ns test-suite-simple.tcl telnet QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test delayed:
    ../../ns test-suite-simple.tcl delayed QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test phase:
    ../../ns test-suite-simple.tcl phase QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test phase1:
    ../../ns test-suite-simple.tcl phase1 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test phase2:
    ../../ns test-suite-simple.tcl phase2 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test timers:
    ../../ns test-suite-simple.tcl timers QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test manyflows:
    ../../ns test-suite-simple.tcl manyflows QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test stats:
    ../../ns test-suite-simple.tcl stats QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test statsECN:
    ../../ns test-suite-simple.tcl statsECN QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    Running test stats1:
    ../../ns test-suite-simple.tcl stats1 QUIET
    ./test-all-template1: 110: ./test-all-template1: ../../ns: not found
    ^C
    please help me its urgent

  20. Sir,
    While installing ns tool 2.34 i got following error.
    /chaitanya/Desktop/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c
    In file included from /home/chaitanya/Desktop/ns-allinone-2.34/tk8.4.18/unix/../generic/tkInt.h:21:0,
    from /home/chaitanya/Desktop/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.h:18,
    from /home/chaitanya/Desktop/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c:16:
    /home/chaitanya/Desktop/ns-allinone-2.34/tk8.4.18/unix/../generic/tk.h:81:23: fatal error: X11/Xlib.h: No such file or directory
    compilation terminated.
    make: *** [tk3d.o] Error 1
    tk8.4.18 make failed! Exiting …
    For problems with Tcl/Tk see http://www.scriptics.com
    Please help me.

  21. I have done all the changes except step 9 and received this error
    g++ -o tcl2c++ tcl2c++.o
    make: g++: Command not found
    make: *** [tcl2c++] Error 127
    tclcl-1.19 make failed! Exiting …
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    The reason I could not perform the step 9 is that there is no Makefile in ns-2.34 folder as ls command result is as follows:
    faisal@ubuntu:~/Documents/ns-allinone-2.34/ns-2.34$ ls
    adc COPYRIGHTS mac routing
    allinone delaybox Makefile.in rtproto
    AllinOne diffserv Makefile.in~ satellite
    aodv diffusion makefile.vc sctp
    aomdv diffusion3 mcast sensor-nets
    apps doc mobile src_rtg
    asim dsdv mpls tcl
    autoconf.h.in dsr nam tcp
    autoconf-win32.h empweb nix test-all
    BASE-VERSION emulate ns.1 test-output
    baytcp FILES ns_tclsh.cc tmix
    bin gaf packmime TODO.html
    bitmap HOWTO-CONTRIBUTE pgm tools
    CHANGES.html html plm tora
    classifier imep pushback trace
    common indep-utils qs update.out
    conf install-sh queue validate
    config.guess INSTALL.WIN32 rap validate.out
    config.h lib README VERSION
    config.sub LICENSES realaudio webcache
    configure link release_steps.txt wpan
    configure.in linkstate routealgo xcp
    faisal@ubuntu:~/Documents/ns-allinone-2.34/ns-2.34$
    plese resolve my problem. Thanx

  22. Hi
    I have some problem yet
    I tried to change the line 219 in ranvar.cc, but its read-only file & I cant save the changes.
    the Error is:
    You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.
    my ns2 file is on my Desktop & I used this : ~$ gedit /home/sahara/Desktop/ns-allinone-2.34/ns-2.34/tools/ranvar.cc
    what can I do?
    I appreciate u if help me
    plz send ur answer to my email too
    Thank u so much

  23. When i given ./install command the error shows which is given below.
    mac/mac-802_11Ext.cc:863:46: error: ‘struct hdr_cmn’ has no member named ‘mod_scheme_’
    ch->txtime() = mac_->txtime(ch->size(), ch->mod_scheme_);
    ^
    mac/mac-802_11Ext.cc: In member function ‘void TXC::generateRTSFrame(Packet*)’:
    mac/mac-802_11Ext.cc:1070:6: error: ‘struct hdr_cmn’ has no member named ‘mod_scheme_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1070:20: error: ‘ModulationScheme’ was not declared in this scope
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1070:37: error: expected ‘;’ before ‘mac_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1090:46: error: ‘struct hdr_cmn’ has no member named ‘mod_scheme_’
    ch->txtime() = mac_->txtime(ch->size(), ch->mod_scheme_);
    ^
    mac/mac-802_11Ext.cc: In member function ‘void RXC::generateACKFrame(Packet*)’:
    mac/mac-802_11Ext.cc:1236:6: error: ‘struct hdr_cmn’ has no member named ‘mod_scheme_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1236:20: error: ‘ModulationScheme’ was not declared in this scope
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1236:37: error: expected ‘;’ before ‘mac_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc: In member function ‘void RXC::generateCTSFrame(Packet*)’:
    mac/mac-802_11Ext.cc:1269:6: error: ‘struct hdr_cmn’ has no member named ‘mod_scheme_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1269:20: error: ‘ModulationScheme’ was not declared in this scope
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc:1269:37: error: expected ‘;’ before ‘mac_’
    ch->mod_scheme_= (ModulationScheme)mac_->phymib_.getBasicModulationScheme();
    ^
    mac/mac-802_11Ext.cc: At global scope:
    mac/mac-802_11Ext.cc:1304:8: error: redefinition of ‘double Mac802_11Ext::txtime(int)’
    double Mac802_11Ext::txtime(int )
    ^
    In file included from mac/mac-802_11Ext.cc:66:0:
    mac/mac-802_11Ext.h:570:9: error: ‘double Mac802_11Ext::txtime(int)’ previously defined here
    double txtime(int bytes) { /* clobber inherited txtime() */
    ^
    make: *** [mac/mac-802_11Ext.o] Error 1
    Please help me.

  24. Hello Sir,
    I had successfully installed ns-2.34 in ubuntu 12.04 but when I run the command ./configure I got this error:
    .
    .
    .
    checking for otcl.h… -I../otcl-1.13
    checking for libotcl1.13… -L../otcl-1.13 -lotcl
    checking for tclcl.h… -I../tclcl-1.19
    checking for libtclcl… no
    checking for tcl2c++… no
    configure: error: Installation of tclcl seems incomplete or can’t be found automatically.
    Please correct the problem by telling configure where tclcl is
    using the argument –with-tclcl=/path/to/package
    (perhaps after installing it),
    or the package is not required, disable it with –with-tclcl=no.
    Please help us how to get out of this problem.

  25. hello sir ,
    user@user:~$ sudo apt-get install libxt-dev libx11-dev libxmu-dev xgraphReading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package libx11-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    Package libxt-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    Package libxmu-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package ‘libxt-dev’ has no installation candidate
    E: Package ‘libx11-dev’ has no installation candidate
    E: Package ‘libxmu-dev’ has no installation candidate
    how to solve this error? please reply as soon as possible
    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *