LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   leach installation problems (https://www.linuxquestions.org/questions/linux-newbie-8/leach-installation-problems-4175453312/)

emma166 03-08-2013 03:15 PM

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 !!

knudfl 03-08-2013 03:47 PM

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.

-

emma166 03-08-2013 03:59 PM

Quote:

Originally Posted by knudfl (Post 4907632)
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??

emma166 03-08-2013 04:29 PM

Quote:

Originally Posted by emma166 (Post 4907635)
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!!

knudfl 03-09-2013 07:41 AM

# 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

-

knudfl 03-09-2013 09:19 AM

# 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

emma166 03-11-2013 06:34 PM

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

inamul 03-20-2013 09:08 PM

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

knudfl 03-21-2013 04:37 AM

# 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 ?

-


All times are GMT -5. The time now is 06:32 PM.