Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
@ WSNs, # 42, welcome to LQ. Suggest: delete your 'email address'.
Email addresses displayed on the internet are used by spammers.
The "Send email to WSNs" is already present in the WSNs Menu.
....... Please do not write three posts for one short message.
Better use the 'Edit' button instead.
Please read LQ threads with a 'leach' Tag. LQ Search → 'Tag Name' = leach
Ubuntu cannot compile old tcl tk otcl tclcl. Replace with versions
from ns-allinone-2.34 and / or make links as described. The script
'install' will use 'old names' only. Hence the 8.4.5=>8.4.14 etc. links.
LQ Rules > > sms, chatspeak, shorthand like plz/PLZ: not allowed.
@ zeost, # 45, welcome to LQ. The term ' ns_2.35". ' is unknown. Google will tell. Do you mean ns-allinone-2.34? Be precise, please.
EDIT : Found ns-allinone-2.35-RC3.tar.gz, 'release candidate 3'.
And please read the 6 leach threads. → Lots of info.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
Post # 40, @ sahel_s : about the ns-2.27-gcc410.patch ..
I don't think it works. And when you anyway have to use
a "compat" gcc, g++ : There is no big difference installing
( or using ) version 3.3.x instead of version 4.1.x.
.............. 'g++ 3.3.x' works, we know that for sure.
..
In my Ubuntu 9.10 I remove gcc-4.0 and g++-4 then I install gcc-3.3 and g++ and every thing is ok. I install ns-2.27 and its work But after I do modifications to work with LEACH and try to make ns-2.27 it gives me this error:
--------------------------------------
--------------------------------------
Code:
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/naif/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/naif/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/naif/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/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/naif/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/naif/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
--------------------------------------
Can you help me to solve this error?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
Post # 50, @WSNs: Which errors ? The only error I see, is :
You removed gcc 4.4.1 and g++ 4.4.1 . Suggest : reinstall.
All 3 or 4 (5) 'gcc, g++' can be installed at the same time.
Also suggest : read the LEACH threads ( again )
Correct is : cd ns-allinone-2.27/ns-2.27/ && make clean
.. and better check indep-utils/<all-folders>/*/* to make
sure that all objects are removed ( binaries + files.o ).
(make clean to be repeated in the folders with a Makefile.)
Next : make -f LEACH-Makefile-modified
Either modified by yourself, or use this.
..
I do what you said and after I make:
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
But after I enter ./test (LEACH):
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Code:
naif@ubuntu:~/ns-allinone-2.27/ns-2.27$ ./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...
./test: line 5: ./leach_test: No such file or directory
naif@ubuntu:~/ns-allinone-2.27/ns-2.27$
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
Actually, the files test and leach_test in the directory ns-allinone-2.27/ns-2.27
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 54, WSNs :
Using "test" , see post # 6. ( The test script must be edited.)
When are you going to read all posts ? Please do not ask questions
already answered in this thread.
....
Thank you very much knudfl
I am so sorry about my code.
Code:
naif@ubuntu:~/ns-allinone-2.27/ns-2.27$ ./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...
My question is nam does not work:
Code:
naif@ubuntu:~$ nam
nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
naif@ubuntu:~$
Can you help?
and about leach after I run it how can I deal with it and can I run leach in nam?
Thanks again.
thanks knudfl
I have installed ns-2.34 without any error and performing simple programs given in "ex" folder.
please any body tell me how to define a cluster head in a network ?
If u have any simple code for that send me .
my id is nvnmtech@gmail.com
thanks in advance..
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
WSNs , post 57 : Thank you for editing post # 54. Nice.
The 'nam' issue : cd ns-allinone-2.34/tk8.4.14/
'tk' is to be compiled with the 'tk-8.4-lastevent.patch'
Run ./install in ns-allinone-2.34/, (to make sure, you
don't disturb your new fine ns-2.27.)
cd ns-allinone-2.34/nam-1.13/ && sudo make install.
Then you get /usr/local/bin/nam ,
can be used with all versions of ns2
Read about it all in the 'ns2' threads. Has been answered before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.