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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-28-2013, 04:34 AM
|
#16
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 15.
No reason to worry about the Makefile.in : Is included in the patches.
And do not do any changes to the Makefile :
The proof Makefile is automatically generated from `Makefile.in'.
P.S. : Some of your issues may appear from the Makefile,
that's included in the leach patch.
Solution : Delete ns-2.34/Makefile, before running `./install'.
-
Last edited by knudfl; 12-28-2013 at 04:47 AM.
|
|
|
12-30-2013, 12:12 AM
|
#17
|
LQ Newbie
Registered: Aug 2013
Posts: 13
Original Poster
Rep: 
|
hello knudfl sir,
again i have the same error
invalid resource energy while executing in leach.err file
i use 12.04 ubuntu version
newly install ns2.34
then i put the gcc41compat g++41compat as your instruction
finally install leach
no error produce when installing above process
when i ns2.34$./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
but the leach.err shows
invalid resource energy
while exeuting
what im do next?
please help me sir
|
|
|
12-31-2013, 02:47 AM
|
#18
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 17 .
The solution I know, is to use the LEACH patch by @exidus.
See post #14 : exidus-pegasis-leach-ns234-patch.2.tar.gz
You will also get "pegasis", but you can very well use leach only.
-
|
|
|
01-01-2014, 11:20 PM
|
#19
|
LQ Newbie
Registered: Aug 2013
Posts: 13
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 17 .
The solution I know, is to use the LEACH patch by @exidus.
See post #14 : exidus-pegasis-leach-ns234-patch.2.tar.gz
You will also get "pegasis", but you can very well use leach only.
-
|
hello sir,
1) i newly installed ns2.34
2) then put $ cd ns-allinone-2.34/ && tar xvf exidus-pegasis-leach-ns234-patch.2.tar.gz
3) i download the gcc g++ compatfile and put it into ns-allinone-2.34/ directory
4) senthiya@senthiya-Lenovo-G580:~/ns2/ns-allinone-2.34$ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
5) sudo reboot
6)senthiya@senthiya-Lenovo-G580:~/ns2/ns-allinone-2.34$ export CC=gcc41 CXX=g++41 && ./install
but it shows the following error
Code:
In file included from mac/mac-802_11.cc:54:
mac/mac-802_11.h:52:27: error: CommonUtility.h: No such file or directory
mac/mac-802_11.h:539: error: ISO C++ forbids declaration of ‘CommonUtility’ with no type
mac/mac-802_11.h:539: error: expected ‘;’ before ‘*’ token
mac/mac-802_11.cc: In constructor ‘Mac802_11::Mac802_11()’:
mac/mac-802_11.cc:198: error: class ‘Mac802_11’ does not have any field named ‘utility’
mac/mac-802_11.cc: In member function ‘virtual int Mac802_11::command(int, const char* const*)’:
mac/mac-802_11.cc:310: error: ‘utility’ was not declared in this scope
mac/mac-802_11.cc:310: error: ‘CommonUtility’ was not declared in this scope
mac/mac-802_11.cc:310: error: expected primary-expression before ‘)’ token
mac/mac-802_11.cc:310: error: expected `;' before ‘TclObject’
mac/mac-802_11.cc: In member function ‘int Mac802_11::check_pktTx()’:
mac/mac-802_11.cc:1060: error: ‘utility’ was not declared in this scope
make: *** [mac/mac-802_11.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
i hit this command sir
Code:
senthiya@senthiya-Lenovo-G580:~$ uname -m
i686
how to install pegasis sir
leach-setup.sh file need or not for installing pegasis?
is the leach and pegasis have the same steps for installing?
what do next?
pls help me sir?
|
|
|
01-02-2014, 04:14 AM
|
#20
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 19 .
Quote:
mac/mac-802_11.h:52:27: error: CommonUtility.h: No such file or directory
|
The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.
What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
|
|
|
01-02-2014, 10:35 PM
|
#21
|
LQ Newbie
Registered: Aug 2013
Posts: 13
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 19 .
The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.
What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
|
hi
thank for replying
sir my requirement
1) cluster formation
2) CH create ant for finding path information
3) ACO(Ant Colony Optimization) algorithm is applied in the search for multiple paths between the CH and sink node.
and CH transmit data selected shortest path(mutihop communication)
this is my project concept sir
for that just i want cluster formation
in my home directory i installed ns229/ns2.29 and ns227/ns2.27 and ns2.34
in nsleach/ns2.34 im trying to run leach within its but its not working
so i install another ns2/ns2.34 in home directory and trying to run exidus-pegasis-leach
sir im confused
when installing leach, leach_setup.sh used for installing leach
but exidus-pegasis-leach ==> sh file need or not for installing pegasis?
pls send step-by-step procedure for installing pegasis sir
i delete the content present in bash_aliases sir.
in #572 http://www.linuxquestions.org/questi...68/page39.html
in this thread you said rename the executable 'ns' to e.g. ns-pegasis
where the ns executable present.
sir im new to ns2 please guide me sir
Last edited by senthiya; 01-02-2014 at 10:39 PM.
|
|
|
01-04-2014, 12:04 AM
|
#22
|
LQ Newbie
Registered: Aug 2013
Posts: 13
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 19 .
The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.
What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
|
knudfl sir,
$ cd ns-allinone-2.34/ && tar xvf exidus-pegasis-leach-ns234-patch.2.tar.gz
$ export CC=gcc41 CXX=g++41 && ./install
$ cd ns-2.34/ && sudo make install
..ns-allinone-2.34/ns-2.34$ ./configure
..ns-allinone-2.34/ns-2.34$ ./make clean
..ns-allinone-2.34/ns-2.34$ ./make
..ns-allinone-2.34/ns-2.34$ ./leach_test
pegasis.err file shows
Code:
couldn't read file "/home/tomas/ns-allinone-2.34/ns-2.34/mit/uAMPS/ns-pegasis.tcl": no such file or directory
while executing
and then edit path as my location...
finally i run $./leach_test
again pegasis.err file shows the same error as shown in leach
Code:
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/home/senthiya/Desktop/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/senthiya/Desktop/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
("uplevel" body line 1)
what i do next sir?
please help and guide me sir
pls pls pls...
|
|
|
01-07-2014, 11:21 PM
|
#23
|
LQ Newbie
Registered: Aug 2013
Posts: 13
Original Poster
Rep: 
|
hello knudfl sir,
im waiting for your reply sir...
|
|
|
01-08-2014, 11:38 AM
|
#24
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
#23, #22 :
What's to answer ? You already got the build / test sequence in other pegasis posts,
#17 http://www.linuxquestions.org/questi...219/page2.html → →
→ 1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/
3) tar xvf exidus-pegasis-leach-ns234.patch.2.tar.gz
4) export CC=gcc41 CXX=g++41
5) ./install
6) cd ns-2.34/ && sudo make install
#584 http://www.linuxquestions.org/questi...68/page39.html → →
→ ... run leach with e.g. :
$ export RCA_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/rca && export uAMPS_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/uAMPS && ./test
All pegasis http://www.linuxquestions.org/questions/tags/pegasis/
-
|
|
|
01-17-2014, 07:06 AM
|
#25
|
Member
Registered: Jan 2014
Posts: 52
Rep: 
|
hello knudfl sir,I m using ubuntu 12.04 with ns2.34 for leach protocol.I have done all the steps as your post#24. but my leach.err contains this error
couldn't read file "../../rca/ns-ranode.tcl": no such file or directory
while executing
"source.orig ../../rca/ns-ranode.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 ../../rca/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/leach.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/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
please help.
i have changed path in uAMPS.tcl also.but still error persists.
|
|
|
01-17-2014, 07:28 AM
|
#26
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 25, @keepwalking123
Quote:
couldn't read file "../../rca/ns-ranode.tcl": no such file or directory
|
? You have probably done the command $ ./test
... The right command : See post #24 : export RCA_LIBRARY=/home/<name>/... etc.
-
|
|
|
01-17-2014, 08:29 AM
|
#27
|
Member
Registered: Jan 2014
Posts: 52
Rep: 
|
@26, thanx for reply sir,
initially i have run only ./test.
but after that,i have done export RCA_LIBRARY=/home/<name>/... etc. and again run ./test but still error persists.
please help me..m totally stucked..
|
|
|
01-17-2014, 09:31 AM
|
#28
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 27 : Ref. #25 :
Quote:
I have changed path in uAMPS.tcl also.but still error persists.
|
The edited file(s) must be replaced with the original ones.
And :
If you are using the proof patch = exidus-pegasis-leach-ns234.patch.2.tar.gz,
no errors should appear.
-
|
|
|
01-18-2014, 12:09 AM
|
#29
|
Member
Registered: Jan 2014
Posts: 52
Rep: 
|
@knudfl (#28)
sir what do u mean by edited file.What i actually did is i installed ubuntu 12.04 and ns2.34 freshly.After that i patch exidus-pegasis-leach-ns234.patch.2.tar.gz this file as your post in #26(step 6).and at last i type commands export RCA_LIBRARY=.... and run ./test and also leach_test..was it not required to run leach_test file? please help..i m not getting solution..
|
|
|
01-18-2014, 01:16 AM
|
#30
|
Member
Registered: Jan 2014
Posts: 52
Rep: 
|
@knudfl
hello sir, i successfully run leach protocol by fixing that error.thank u..but my leach.out file is different.i think results are somewhat wrong.The nodes are getting dead.please check these leach.out and leach.tr files n tell me what is problem sir..thank u..awaiting for your reply..
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 06:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|