LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Closed Thread
  Search this Thread
Old 01-28-2010, 10:27 AM   #1
Scofield
LQ Newbie
 
Registered: Jan 2010
Posts: 14

Rep: Reputation: 3
LEACH protocol installation on NS2.27


Hi,

I am working on LEACH protocol. I have just installed NS2.27 onto my system. Following the LEACH installation steps I just downloaded the mit.tar.gz file for LEACH.

Now I require leach_makefile-2.27.patch for further installation. Can anyone suggest me where can I download this patch for LEACH.

Thank you
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-28-2010, 12:07 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I can show the notes, I made a week ago ..

I downloaded this : MIT_uAMPS_ns.tar.gz , which seems
to be a complete ' ns-2.1b5 ', patched with LEACH.
This old version will work perfect on CentOS 3.9 .
But I have not yet tried to install this LEACH version.

So where did you get "" mit.tar.gz "" ?
May be you can provide a link.

I found no working links for any ns-2.27 LEACH files.

The notes, 22-Jan-2010 are attached ..
.....
Attached Files
File Type: txt 22-Jan-10-LEACH-download.txt (1.8 KB, 583 views)
 
Old 01-28-2010, 02:35 PM   #3
Scofield
LQ Newbie
 
Registered: Jan 2010
Posts: 14

Original Poster
Rep: Reputation: 3
Steps and Site for installation

Hey thanks for the reply...
Please try installing LEACH on NS2.27 in Ubuntu 9.10.
The whole setup will take little time I will give you the site to download

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

Leach make file:

http://www.internetworkflow.com/down...leach/Makefile

LEACH installation steps are given in the pdf file I have attached.. U will get mit.tar.gz at the above link. If the above site does not open please give me ur mail id I will send u the mit.tar.gz file. Here I am unable to upload it.


for clearly written steps follow this link.

http://cypress.tistory.com/entry/ns2-227-ubuntu

Please help me in installing the above, I am struck in between...

I will send u the errors I got while I install LEACH.

Thank you
Attached Files
File Type: pdf ns2leach.pdf (24.7 KB, 597 views)
 
2 members found this post helpful.
Old 01-28-2010, 06:57 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Thank you for showing the http://www.internetworkflow.com link.
Was down for a long time a week ago. Gave up using it then.

http://www.internetworkflow.com/downloads/ns2leach/
> > leach_install

http://www.internetworkflow.com/down...leach/Makefile
> > Makefile for ns-2.27

Google .. leach makefile-2.27.patch ..
.. probably the same things, you already found :
http://namaste.tistory.com/142
1) wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch
2) Step 9 / Step 5.1 : Makefile edits.

http://ns2.blogspot.com/2004_04_01_archive.html

http://read.pudn.com/downloads95/sou...34.patch__.htm
> > ns227-gcc34.patch

... So this was about all, I found today.
.....
 
Old 01-28-2010, 10:28 PM   #5
Scofield
LQ Newbie
 
Registered: Jan 2010
Posts: 14

Original Poster
Rep: Reputation: 3
LEACH patch

are the leach makefile-2.27.patch and gcc410.patch are same because according to the instruction given in the below link(atch -p0 < leach_makefile-2.27.patch)

http://cypress.tistory.com/entry/ns2-227-ubuntu

may be we have to use the leach makefile-2.27.patch file

I searched for it and I didnt get.. i followed
wget http://voyager.ce.fit.ac.jp/wiki/too...ile-2.27.patch
but it seems the link doesnot exist.

Any how after following the steps for LEACH installation from various links, after giving ./test, i get that ./leach_test: No such file or directory....


I will show u this error

PHP Code:
sawyer@sawyer:~/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
warning
no class variable Phy/WirelessPhy::alive_

    see tcl
-object.tcl in tclcl for info about this warning.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

INITIALIZE THE 
LIST xListHead
warning
no class variable Phy/WirelessPhy::alive_

    see tcl
-object.tcl in tclcl for info about this warning.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

warning
no class variable Phy/WirelessPhy::alive_

    see tcl
-object.tcl in tclcl for info about this warning.

warningno class variable Phy/WirelessPhy::Efriss_amp_

warning
no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning
no class variable Phy/WirelessPhy::EXcvr_

warning
no class variable Phy/WirelessPhy::sleep_

warning
no class variable Phy/WirelessPhy::ss_

warning
no class variable Phy/WirelessPhy::dist_

Loading connection pattern
...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp Calc highestAntennaZ_ and distCST_
highestAntennaZ_ 
1.5,  distCST_ 89.8
SORTING LISTS 
...DONE!
NS EXITING...
./
testline 5: ./leach_testNo such file or directly 
error can be seen in the last line.

What about the status of you trying for this. Did u try installing. Can you please try and install LEACH onto NS2.27 and try to find out where I am missing. or am I miss any installation file.
 
1 members found this post helpful.
Old 02-09-2010, 06:50 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Finally got it to compile. ( ./install ).

Code:
knudfl@88:~$ cd 9tmp/ns-allinone-2.27/ns-2.27
knudfl@88:~/9tmp/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...
The "test" script has a typo, this will work :
Code:
#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test
.....
P.S. : The warnings have no importance, are information only.
So actually your test passed OK. !
I got no warnings on Ubuntu 9.10 , but warnings identical to yours
did appear on PCLinuxOS.
.....

Last edited by knudfl; 03-19-2010 at 05:54 AM.
 
1 members found this post helpful.
Old 02-12-2010, 05:54 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Your first test : ( from post # 5 )
Quote:
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
.. is OK ..

Your new test, received by email today, shows :
Quote:
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
sleep: invalid time interval `2\r'
Try `sleep --help' for more information.
Did you change "test" ? Please copy / paste the "test"
from post # 6, which is known to work.
Or did you use an MS - Windows app to copy or write
the test script, so is not UNIX text format any more ? ?
"" sleep: invalid time interval `2\r' "" looks like a formatting issue.
.....

Last edited by knudfl; 02-12-2010 at 06:13 AM.
 
2 members found this post helpful.
Old 02-12-2010, 10:53 AM   #8
Scofield
LQ Newbie
 
Registered: Jan 2010
Posts: 14

Original Poster
Rep: Reputation: 3
It worked

hey thank you very much.. I just edited the test file as it was in the 6th post and it worked.
yes the problem was it was in default opening through MS word (a WINE application).
I just edited the test file and saved it and run the ./test. I didnt get any errors..(only irritating warnings)
 
Old 03-06-2010, 06:05 AM   #9
emtarik05
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Rep: Reputation: 3
urgently

please can you send for me the patch "ns-2.27-gcc410.patch"
because the link doesn't work
thanks

Last edited by emtarik05; 03-07-2010 at 05:48 AM.
 
Old 03-07-2010, 04:26 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ emtarik05, welcome to LQ.

The file ns-2.27-gcc410.patch is just mentioned as an example
on things that were / are available. Not at all needed.
Please read the LEACH threads, tagged : leach , and see,
that we did build LEACH without that.
http://www.linuxquestions.org/questi...atch-791222/#2

And better delete your email adress, to prevent spam.
Unless you haven't seen it, we can click your name,
and use the function : "Send email to emtarik05".
.....
 
Old 03-07-2010, 08:14 AM   #11
emtarik05
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Rep: Reputation: 3
thanks knudfl
I want to install NS2.27 on ubuntu 9.10.
but it indicate the following problem

============================================================
* Build tcl8.4.5
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for unistd.h... yes
checking for limits.h... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking for required early compiler flags... _LARGEFILE64_SOURCE
checking for 64-bit integer type... long long
checking for struct dirent64... no
checking for struct stat64... yes
checking for off64_t... yes
checking whether byte ordering is bigendian... no
checking for getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoull... yes
checking for tmpnam... yes
checking for waitpid... yes
checking for strerror... yes
checking for getwd... yes
checking for wait3... yes
checking for uname... yes
checking for realpath... yes
checking dirent.h... yes
checking for errno.h... yes
checking for float.h... yes
checking for values.h... yes
checking for limits.h... (cached) yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... yes
checking for dlfcn.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for sys/modem.h... no
checking termios vs. termio vs. sgtty... termios
checking for fd_set in sys/types... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for tm_zone in struct tm... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking tm_tzadj in struct tm... no
checking tm_gmtoff in struct tm... yes
checking long timezone variable... yes
checking for st_blksize in struct stat... yes
checking for fstatfs... yes
checking for 8-bit clean memcmp... yes
checking for memmove... yes
checking proper strstr implementation... yes
checking for strtoul... yes
checking for strtod... yes
checking for strtod... (cached) yes
checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for socklen_t... yes
checking for opendir... (cached) yes
checking union wait... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for a putenv() that copies the buffer... no
checking for langinfo.h... yes
checking whether to use nl_langinfo... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking how to build libraries... static
checking for ranlib... ranlib
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.

tarik@tarik-desktop:~/Bureau/ns-allinone-2.27$

Last edited by emtarik05; 03-07-2010 at 08:15 AM.
 
Old 03-07-2010, 08:38 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Please read post # 10 again.
And read everything in the links very carefully.

When you follow the procedure in post # 3 here strictly ..
http://www.linuxquestions.org/questi...9.10-782356/#3

.. you will not meet any tcl-8.4.5 ( or 8.3.2 ),
because you are not using it ! Instead the 8.4.18
from ns-allinone-2.34 is linked and used !
.....

Another very important thing : Remove the system tcl, tk :
sudo apt-get remove tcl*
.. before you start the build of any ns2.

.....

Last edited by knudfl; 03-07-2010 at 08:41 AM.
 
Old 03-09-2010, 11:27 PM   #13
maunik
LQ Newbie
 
Registered: Mar 2010
Posts: 6

Rep: Reputation: 0
hi
i am working on leach protocol.
i can't download mit.tar.gz from link http://www.internetworkflow.com/down...ach/mit.tar.gz .
because this link not open now.
please give me another link i download mit.tar.gz.
thanks....
 
Old 03-10-2010, 12:14 PM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ maunik : Click my name, send an email, and I will attach
mit.tar.gz + LEACH-Makefile-org to a return mail. ( 580 kB.)

.....
 
Old 03-17-2010, 05:35 AM   #15
enji
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
hi,
I am a new user in LQ.

I'm trying to work with LEACH on ns-2.
So refer to the previous post I install ns-2.27 on Ubuntu 9.10.
But the problem now is the link for downloading LEACH for ns 2.27 give before, doesn't work.

So please, someone can give me a working link.
Thanks.
 
  


Closed Thread

Tags
leach, leach-ns227, ns2, ns227



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in simulating Black Hole Attack in AODV Protocol through NS2 in FC8 shyan Linux - Newbie 3 02-17-2015 03:21 PM
NS2 installation ds_priyaa Fedora 2 05-28-2008 02:23 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 01:08 AM
ns2 installation pranoti Linux - Software 2 06-11-2007 12:45 AM
LXer: Interview with Bernard Leach (iPodLinux) LXer Syndicated Linux News 0 10-31-2006 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:10 PM.

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
Open Source Consulting | Domain Registration