LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-27-2010, 01:54 PM   #1
bnkdul
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 6
how to install ns2.27 on Ubuntu 9.10 64-bits version


Hi,

I tried to install ns2.27 on my Ubuntu 9.10 64-bits version. I downloaded the gcc-3.3...amd64.deb instead of the one you recommend. When installing the debian files, I get this at the terminal


sudo dpkg -i cpp-3.3_3.3.6-15ubuntu4_amd64.deb g++-3.3_3.3.6-15ubuntu4_amd64.deb gcc-3.3_3.3.6-15ubuntu4_amd64.deb gcc-3.3-base_3.3.6-15ubuntu4_amd64.deb libstdc++5-3.3-dev_3.3.6-15ubuntu4_amd64.deb
[sudo] password for cielo:
(Reading database ... 152340 files and directories currently installed.)
Preparing to replace cpp-3.3 1:3.3.6-15ubuntu4 (using cpp-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement cpp-3.3 ...
Preparing to replace g++-3.3 1:3.3.6-15ubuntu4 (using g++-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement g++-3.3 ...
Preparing to replace gcc-3.3 1:3.3.6-15ubuntu4 (using gcc-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement gcc-3.3 ...
Preparing to replace gcc-3.3-base 1:3.3.6-15ubuntu4 (using gcc-3.3-base_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement gcc-3.3-base ...
Preparing to replace libstdc++5-3.3-dev 1:3.3.6-15ubuntu4 (using libstdc++5-3.3-dev_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement libstdc++5-3.3-dev ...
Setting up gcc-3.3-base (1:3.3.6-15ubuntu4) ...
Setting up cpp-3.3 (1:3.3.6-15ubuntu4) ...
Processing triggers for man-db ...
Setting up gcc-3.3 (1:3.3.6-15ubuntu4) ...
Setting up libstdc++5-3.3-dev (1:3.3.6-15ubuntu4) ...
Setting up g++-3.3 (1:3.3.6-15ubuntu4) ...


I don't see any errors but the file is not installed (I think) because when I go to synaptic
they are not there. And trying to proceed with the ns2 installation results in error since I don't have the gcc3.3
 
Old 12-27-2010, 02:25 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Welcome to LQ.

All your installs say "replace / replacement" :
Looks like the packages were already installed.

'g++-3.3' can also be installed with 'sudo apt-get install' or Synaptic ..
I.e. add Hardy 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
Please try this command : ls /usr/bin/g++*
( And / or : which g++-3.3 ).


What are the errors you get, when you compile ns-2.27 ? ?

..
 
Old 12-27-2010, 03:23 PM   #3
bnkdul
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 6
Thanks a lot for the warm welcome

Quote:
Originally Posted by knudfl View Post

Please try this command : ls /usr/bin/g++*
( And / or : which g++-3.3 ).


What are the errors you get, when you compile ns-2.27 ? ?

..
I got this after typing the command:
/usr/bin/g++ /usr/bin/g++-3.3 /usr/bin/g++-4.3

(I have no idea what that means, but I'm assuming it means somehow g++3.3_3.3.6 is installed)

And the errors that I get when installing ns2.27 are these:

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/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o setdest.cc
setdest.cc:71:1: warning: "INFINITY" redefined
In file included from /usr/include/math.h:40,
from setdest.cc:43:
/usr/include/bits/inf.h:27:1: warning: this is the location of the previous definition
In file included from ../../../config.h:54,
from setdest.h:5,
from setdest.cc:57:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
In file included from setdest.cc:57:
setdest.h:26: error: extra qualification ‘vector::’ on member ‘operator=’
setdest.h:31: error: extra qualification ‘vector::’ on member ‘operator+=’
setdest.h:36: error: extra qualification ‘vector::’ on member ‘operator==’
setdest.h:39: error: extra qualification ‘vector::’ on member ‘operator!=’
setdest.cc: In member function ‘void Node:ump()’:
setdest.cc:876: error: cast from ‘Neighbor*’ to ‘int’ loses precision
make[1]: *** [setdest.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o proxytrace.o proxytrace.cc
In file included from proxytrace.cc:3:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
make[1]: *** [proxytrace.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
g++ -c -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(Entry&)’:
tr-stat.cc:154: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I../../.. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
In file included from ../../../config.h:54,
from logparse.h:7,
from tr-stat.cc:24:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:141: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:152: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
g++ -c -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:174: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:187: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
make: *** [all-recursive] Error 2
Ns make failed!


I think the error is related to the gcc. But I don't know how to fix it. Thanks again for replying.

Last edited by bnkdul; 12-27-2010 at 03:28 PM.
 
Old 12-27-2010, 04:00 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Yes, those are errors only occurring on a 64 Bits OS.

The example, you show from ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/
is ucb/ , which comes with a separate Makefile.in .
Line 27 can be edited to : CC = g++-3.3

These files are actually of minor importance, as the binary 'ns' at this stage
already has been created. ( As I remember it.)

Except from ucb/, there may be a couple more directories in webtrace-conv/
with either a Makefile.in or a Makefile. Same procedure :
You can try editing CC = @CXX@ to CC = g++-3.3 , if they cause errors.

Good luck !
..
 
1 members found this post helpful.
Old 12-27-2010, 05:59 PM   #5
bnkdul
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 6
Thanks knudfl!

in ../ns2.27 I typed the following command "find -iname Makefile.in"

Then, you get the following directories:

./indep-utils/webtrace-conv/ucb/Makefile.in
./indep-utils/webtrace-conv/dec/Makefile.in
./indep-utils/webtrace-conv/epa/Makefile.in
./indep-utils/webtrace-conv/nlanr/Makefile.in
./indep-utils/cmu-scen-gen/setdest/Makefile.in
./Makefile.in

I manually modified each Makefile.in changing line #27 CC = @CXX@ to CC = gcc-3.3. I know you said g++-3.3 but I got confused since in your thread you said gcc-3.3. Makefile is automatically modified when you change Makefile.in, so no need to edit it.

Anyway, there is an improvement in the errors. I'm only getting this now:

make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o setdest.cc
setdest.cc:71:1: warning: "INFINITY" redefined
In file included from /usr/include/math.h:40,
from setdest.cc:43:
/usr/include/bits/inf.h:27:1: warning: this is the location of the previous definition
In file included from ../../../config.h:54,
from setdest.h:5,
from setdest.cc:57:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
In file included from setdest.cc:57:
setdest.h:26: error: extra qualification ‘vector::’ on member ‘operator=’
setdest.h:31: error: extra qualification ‘vector::’ on member ‘operator+=’
setdest.h:36: error: extra qualification ‘vector::’ on member ‘operator==’
setdest.h:39: error: extra qualification ‘vector::’ on member ‘operator!=’
setdest.cc: In member function ‘void Node:ump()’:
setdest.cc:876: error: cast from ‘Neighbor*’ to ‘int’ loses precision
make[1]: *** [setdest.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
gcc-3.3 -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o proxytrace.o proxytrace.cc
In file included from proxytrace.cc:3:
../../../autoconf.h:85: error: namespace `CPP_NAMESPACE' undeclared
make[1]: *** [proxytrace.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
gcc-3.3 -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I../../.. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
In file included from ../../../config.h:54,
from logparse.h:7,
from tr-stat.cc:24:
../../../autoconf.h:85: error: namespace `CPP_NAMESPACE' undeclared
tr-stat.cc: In function `double lf_analyze(lf_entry&)':
tr-stat.cc:134: warning: cast to pointer from integer of different size
tr-stat.cc:136: warning: cast to pointer from integer of different size
tr-stat.cc:137: warning: cast to pointer from integer of different size
tr-stat.cc:141: warning: cast from pointer to integer of different size
tr-stat.cc:148: warning: cast to pointer from integer of different size
tr-stat.cc:152: warning: cast from pointer to integer of different size
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'


I will proceed with the installation of MIT LEACH and see how it goes and update you. I only reply so soon because I noticed the number of views of this thread got so high in just three hours, so I'm guessing there are quite a few ppl out there in my situation.
 
Old 12-28-2010, 04:04 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
CC = @CXX@ , i.e. CXX means c++.

indep-utils/webtrace-conv/ucb/ : CXX = g++-3.3


The others are less important, will usually compile with the default gcc, g++.
indep-utils/webtrace-conv/dosdbell/ : CC = gcc-3.3
indep-utils/webtrace-conv/dec/ : CC = g++-3.3
indep-utils/webtrace-conv/epa/ : CC = g++-3.3
indep-utils/webtrace-conv/nlanr/ : CC = g++-3.3
indep-utils/cmu-scen-gen/setdest/ : CC = gcc-3.3 , CCX = g++
When you have file.c : gcc. When it's files.cc : g++ for c++ files.
( *.c is c code. *.cc (or *.cpp) is c++ code.)


I actually compiled a clean old ns-allinone-2.27 on Fedora 14 - 32,
while I wrote post # 4. No files from ns-allinone-2.34 was used.
The patch ns-2.27-gcc410.patch was included : (Works for gcc-3.4.6...gcc-4.1.0).
http://cfs3.tistory.com/upload_contr...7-gcc410.patch
And no editing of any Makefile.in, just : export CC=g++34 CXX=g++34 && ./install
And, validate : "validate overall report: all tests passed"

( But this simple method will usually not work on Ubuntu.)
..

Last edited by knudfl; 12-29-2010 at 06:48 AM.
 
2 members found this post helpful.
Old 12-28-2010, 06:55 AM   #7
bnkdul
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 6
to eliminate the error of
./../../autoconf.h:85: error: namespace `CPP_NAMESPACE' undeclared
make[1]: *** [proxytrace.o] Error 1.


In autoconfig.h.in replace line #84 "using namespace CPP_NAMESPACE"; to "using namespace std" and ns2 will compile with no errors at all.

I will address leach installation in my next post because now I'm having some minor errors
 
Old 12-29-2010, 12:24 PM   #8
bnkdul
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 6
This post is for anyone trying to install leach. The process is just the usual one. I hope this helps somehow.

For the installation of leach obtain the mit.tar.gz package at

http://www.internetworkflow.com/down...ach/mit.tar.gz

Step 1: Place the mit.tar.gz package into the ns-allione-2.27/ns-2.27 directory and type the following commands in the terminal cd ns-allione-2.27/ns-2.27

gunzip mit.tar.gz
tar -xvf mit.tar

Step 2: Edit the file in ns-allione2.27/ns-2.27/Makefile.in

Add –DMIT_uAMPS to the DEFINE list
Add -I./mit/rca –I./mit/uAMPS to the INCLUDE list

Add the following just prior to the line that says gaf/gaf.o \
mit/rca/energy.o mit/rca/rcagent.o \
mit/rca/rca-ll.o mit/rca/resource.o \
mac/mac-sensor-timers.o mac/mac-sensor.o mit/uAMPS/bsagent.o \

Edi the file in ns-allione-2.27/ns-2.27/mit/uAMPS/sims/uamps.tcl
Replace lines #12 to 15 with these lines:

source mit/rca/ns-ranode.tcl
source mit/uAMPS/ns-bsapp.tcl
source mit/uAMPS/extras.tcl
source mit/uAMPS/stats.tcl

Replace lines #20 to 22 with these lines:
source mit/rca/resources/ns-resource-manager.tcl
source mit/rca/resources/ns-energy-resource.tcl
source mit/rca/resources/ns-neighbor-resource.tcl

Follow the same logic of replacing $env(RCA_LIBRARY) and $env(uAMPS_LIBRARY) with mit/rca and mit/uAMPS correspondingly in the following files: ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach.tcl ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach-c.tcl

Step 3: cd ns-allione-2.27/ns-2.27/

./configure
make clean
make
./validate
./leach-test

Check in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.err if the file reports any errors

Check the simulation outputs in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.out

GOOD LUCK!
D.BONEKE
 
1 members found this post helpful.
Old 01-20-2011, 01:15 PM   #9
ashwinipatankar
Member
 
Registered: Oct 2009
Location: Bangalore, India
Distribution: Fedora
Posts: 32

Rep: Reputation: 10
try this http://nsnam.isi.edu/nsnam/index.php..._on_Ubuntu7.04 or this http://www.techquark.com/2009/09/ins...buntu-904.html equally applicable till 10.04 but not for 10.10 , else visit www.wirelesscafe.wordpress.com
 
0 members found this post helpful.
Old 09-18-2011, 02:18 PM   #10
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
Hi everyone...
I[m following the bnkdul tutorial to install leach and ns-2.27 but I got an error.
I[m using gcc and g++ version 3.3.6, when I run the make command, i[m getting:
Code:
g++-3.3.6: cannot specify -o with -c or -S and multiple compilations
make: *** [tools/random.o] Error 1
how do I solve it?
 
Old 09-18-2011, 02:41 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 10 , @ jimctu :

I don't think the edits in post #8 are meant as "complete install instructions".
Quote, post #8 : ""The process is just the usual one.""


The proof method for 'ns-allinone-2.27' is here, post #3 :
http://www.linuxquestions.org/questi...10-a-782356/#3

Suggest : Read all LEACH threads : LQ Search , Tag = leach

..
 
Old 03-09-2013, 07:19 PM   #12
doussa
LQ Newbie
 
Registered: Feb 2013
Posts: 29

Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by bnkdul View Post
This post is for anyone trying to install leach. The process is just the usual one. I hope this helps somehow.
hi,
I'm trying to install leach in NS2.27 (os:ubuntu 10.04) and I followed which is mentioned in thread #8 about installing leach.But when I run the ./test_leach I have the following error in the leach.err file
Code:
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
    while executing
"source.orig tcl/lib/ns-mobilenode.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig[list $fileName]"
    invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
    (procedure "source" line 8)
    invoked from within
"source tcl/lib/ns-mobilenode.tcl"
    (file "tcl/ex/wireless.tcl" line 184)
and instead I get the result in leach.out ,I have 2 new files "leach.save1" and" leach.save2" the first one has as a result
Code:
At 584.50000000006435:
		Total Energy = 334.47633141687106
		Total Data = 51407
		Total Alive = 4
and the second one has
Code:
At 331.6000000000069:
		Total Energy = 273.21666940025437
		Total Data = 35008
		Total Alive = 4
I don't undrestand what does it mean and I don't know if the compilation was successfully done or not.
I need your help and I will be Grateful if someone can replay me as soon as possible because it urgent work for me .
Thanks.

Last edited by doussa; 03-09-2013 at 07:21 PM.
 
Old 03-10-2013, 06:15 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 19 .

LEACH Ubuntu 10.04, posts #5 and #6 here ..
http://www.linuxquestions.org/questi...-4175453312/#5

cd ns-allinone-2.27/ns-2.27/
.. Please start with 'test' , which will run 'leach_test' :
export RCA_LIBRARY=$NS/mit/rca && export uAMPS_LIBRARY=$NS/mit/uAMPS && ./test

Replace $NS with the full path, like ..
export RCA_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/rca && export uAMPS_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/uAMPS && ./test

./leach_test can be run alone, in the same way :
1) export RCA_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/rca
2) export uAMPS_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/uAMPS
3) ./leach_test

Note : There is no file by name "test_leach".
More about running leach_test alone : In one of these threads :
http://www.linuxquestions.org/questi...2-34-a-870368/
http://www.linuxquestions.org/questi...2-27-a-785379/
.. Please look for posts by @deepa_2111 .

All LQ LEACH : LQ Search → Tag = leach

-

Last edited by knudfl; 03-10-2013 at 07:36 AM.
 
Old 03-10-2013, 11:39 AM   #14
doussa
LQ Newbie
 
Registered: Feb 2013
Posts: 29

Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by knudfl View Post
# 19

Replace $NS with the full path, like ..
export RCA_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/rca && export uAMPS_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/uAMPS && ./test

Note : There is no file by name "test_leach".

-
sorry I mean leach_test file.
I make all the changes as you said and I run ./test (after modify file test:with moving line:cd ../../ above line:./leach_test )
but I have this message couldn't read file "wireless-demo-csci694.tcl": no such file or directory

NOTE:the path of test file is ns-allinone-2.27/ns-2.27/mit
thank you for replying
 
Old 03-10-2013, 11:53 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
# 14 .
Quote:
the path of test file is ns-allinone-2.27/ns-2.27/mit
What do you mean ? ?

The tests, './test' and './leach_test' must be run from ns-allinone-2.27/ns-2.27/.
That's the required location.
Else the dependencies like wireless-demo-csci694.tcl etc. will not be found.
Code:
cd ns-allinone-2.27/ns-2.27/ && export RCA_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/rca && export uAMPS_LIBRARY=/home/doussa/ns-allinone-2.27/ns-2.27/mit/uAMPS && ./test

Last edited by knudfl; 03-10-2013 at 11:57 AM.
 
  


Reply

Tags
leach, ns2, ns227


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 02:44 AM
NS2.34 won't install on ubuntu 9.10 insync Linux - Wireless Networking 1 02-25-2010 03:34 AM
How to install NS2 simulator(version 2.29) in Fedora 7. mrbhush General 1 05-06-2009 02:41 AM
32 bits version distros running 64 bits CPU javb Linux - General 4 04-02-2006 08:21 AM


All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration