LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-08-2013, 03:15 PM   #1
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Rep: Reputation: Disabled
Unhappy leach installation problems


hi,i installed leach in ns2.27 according to this link
http://cypress.tistory.com/entry/ns2-227-ubuntu
and i followed what you said in one the threads about skiping the step talking about leach.patch and i downloaded the file makefile that contains the necessary changes as you said and from the link that you mentionned(i even use the link u gave to download mit.tar.gz).the problem is that when i run make i got error(.../mit/rca/energy.o not found) i checked my mit folder and i found out that energy.o,rcagent.o ,rca.o and resource.o don't exist in the mit/rca folder !!is this because i didn't patch my leach??or because the mit.tar.gz is missing some files and i should change it?? can i use leach version which is made for ns2.34 that contains (energy.o ..etc ) in ns2.27 or not because i'm thinking abt copying the missing files and paste it in my mit/rca ? thank you.please reply as soon as possible this is urgent !!
 
Old 03-08-2013, 03:47 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,686

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
Welcome to LQ.

Which OS are you using ?

Leach links, post #4 here http://www.linuxquestions.org/questi...each-862835/#4
.. Please use the Makefile.in :
An OK Makefile will be generated by ./configure.

There is a reason that some objects are missing.
Copying the objects will not solve the original errors.

-

Last edited by knudfl; 03-09-2013 at 06:08 AM.
 
Old 03-08-2013, 03:59 PM   #3
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Which OS are you using ?

Leach links, post #4 here http://www.linuxquestions.org/questi...-leach-862835/
.. Please use the Makefile.in :
An OK Makefile will be generated by ./configure.

There is a reason that some objects are missing.
Copying the objects will not solve the original errors.

-
i'm using ubunto 10.04,i have already read all the threads talking about leach in this site that's why i said i did just as u said even the files i downloaded from the links you mentionned.
did you mean i have to do ./configure and then makeclean and make and this will generate the missing files like energy.o??
 
Old 03-08-2013, 04:29 PM   #4
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by emma166 View Post
i'm using ubunto 10.04,i have already read all the threads talking about leach in this site that's why i said i did just as u said even the files i downloaded from the links you mentionned.
did you mean i have to do ./configure and then makeclean and make and this will generate the missing files like energy.o??
please this is urgent!!
 
Old 03-09-2013, 07:41 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,686

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
# 4 . The 32bits (i686) Ubuntu 10.04 .

tar xvf ns-allinone-2.27.tar.gz && cd ns-allinone-2.27/
patch -p1 < ns-2.27-gcc410.patch
export CC=gcc-4.1 CXX=g++-4.1 && ./install
cd ns-2.27/ ; mv ns ns-orig227 ; mv Makefile Makefile-orig ; mv Makefile.in Makefile.in-orig
cp Makefile.in.leach Makefile.in
tar xvf mit.tar.gz
export CC=gcc-4.1 CXX=g++-4.1 && ./configure && make : The new 'ns' with leach is created.
Saving 'ns' to a backup : cp ns ns-leach227

sudo mkdir -p /usr/local/man/man1 && sudo make install
I.e. 'make install' will copy 'ns' to /usr/local/bin/ns ,
.. and you can now run ./test

*** Be aware of the typos in 'test'. Please see the edited test here, post #10
http://www.linuxquestions.org/questi...7-a-785379/#10

-
 
Old 03-09-2013, 09:19 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,686

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
# 5 add :

ns-allinone-2.27/ns-2.27/mac/wireless-phy.cc should probably have been edited,
according to your link http://cypress.tistory.com/entry/ns2-227-ubuntu

.. And in ns-2.27 : $ make clean && make
 
Old 03-11-2013, 06:34 PM   #7
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Unhappy

i installed leach finally in my ns2.27 according to one of the threads in this site but when i do ./test and verify my energy in leach .out my nergy is > 200 j which is not correct because i have 100 nodes with 2 J each one i did all the modifications i even change my CC=gcc-4.4 and cpp=g++-4.4 in makefile.in i don't know what to do everything seems normal and i got no error when i do
./configure
make clean
make
but my leach.out is false !!
please help this is urgent for my project and i have no more time
 
Old 03-20-2013, 09:08 PM   #8
inamul
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
WHAT IS THE SOLUTION TO THIS PROBLEM:::
PLZ REPLY immediately........

g++: unrecognized option '-4.3'
In file included from ./mac/smac.h:90,
from trace/cmu-trace.cc:49:
./trace/cmu-trace.h:171:1: warning: "ADV_CHAR" redefined
In file included from ./mobile/energy-model.h:48,
from ./common/node.h:59,
from ./sctp/sctp.h:47,
from trace/cmu-trace.cc:43:
./trace/trace.h:56:1: warning: this is the location of the previous definition
In file included from ./mac/smac.h:90,
from trace/cmu-trace.cc:49:
./trace/cmu-trace.h:172:1: warning: "REQ_CHAR" redefined
In file included from ./mobile/energy-model.h:48,
from ./common/node.h:59,
from ./sctp/sctp.h:47,
from trace/cmu-trace.cc:43:
./trace/trace.h:57:1: warning: this is the location of the previous definition
In file included from ./mac/smac.h:90,
from trace/cmu-trace.cc:49:
./trace/cmu-trace.h:173:1: warning: "DATA_CHAR" redefined
In file included from ./mobile/energy-model.h:48,
from ./common/node.h:59,
from ./sctp/sctp.h:47,
from trace/cmu-trace.cc:43:
./trace/trace.h:58:1: warning: this is the location of the previous definition
trace/cmu-trace.cc:1531: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531: error: stray ‘\230’ in program
trace/cmu-trace.cc:1531: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531: error: stray ‘\231’ in program
trace/cmu-trace.cc:1535: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535: error: stray ‘\230’ in program
trace/cmu-trace.cc:1535: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535: error: stray ‘\231’ in program
trace/cmu-trace.cc:1539: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539: error: stray ‘\230’ in program
trace/cmu-trace.cc:1539: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539: error: stray ‘\231’ in program
trace/cmu-trace.cc: In member function ‘void CMUTrace::format_rca(Packet*, int)’:
trace/cmu-trace.cc:1531: error: ‘A’ was not declared in this scope
trace/cmu-trace.cc:1535: error: ‘R’ was not declared in this scope
trace/cmu-trace.cc:1539: error: ‘D’ was not declared in this scope
make: *** [trace/cmu-trace.o] Error 1
 
Old 03-21-2013, 04:37 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,686

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
# 8.

Please edit post #8 to use codetags http://www.linuxquestions.org/questi....php?do=bbcode
I.e. type [/code] at error/code text end, and [code] at start.

Text speak is not accepted at LQ. Please write Please, not plz.
Don't use words like { urgent, immediately }.
We are volunteers, and will may be answer ... when it is convenient.

Your question cannot be answered : All essential information is missing.
The "must tell for every question" : ns2 version, OS name and version,
and most importantly : The commands used to get the errors.
And for the above error : Did you type " -4.3" somewhere ?

-
 
  


Reply

Tags
leach, leach-ns227, ns2


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
Leach installation in NS-2.34 swtjeeva Linux - Software 1 10-08-2012 01:00 PM
LEACH installation in centos geethamit Linux - Software 1 03-05-2012 04:27 AM
LEACH installation geethamit Linux - Software 1 11-01-2011 03:58 PM
LEACH installation geethamit Linux - Software 1 10-17-2011 10:45 AM
Leach Installation on NS2 Asmaa Seyam Linux - General 3 10-19-2010 12:31 PM


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

Main Menu
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