LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 01-07-2012, 12:16 PM   #181
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

# 180.

1) Did you remember to replace cmu-trace.h ? See post #176.
( ns-allinone-2.34/2.34/trace/cmu-trace.h ).

2) I think that only g++ version 4.1 will work with ns-2.34 in an updated
Ubuntu 10.10 . The easy solution : Use gcc41-compat / g++41-compat :

gcc41-compat https://docs.google.com/open?id=0B7S...RjNjJhOTZjNjI2
g++41-compat https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4
And :
sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
Then reboot, and the new compiler is ready for use :

cd ns-allinone-2.34/ns-2.34/ && make clean && cd ../ &&
export CC=gcc41 CXX=g++41 && ./install : No errors, Ubuntu 10.10 32bits.

..

Last edited by knudfl; 01-07-2012 at 12:24 PM.
 
Old 01-09-2012, 04:32 AM   #182
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi! i think i have 64 bit os of ubuntu 10.10.
i am working on leach protocol so plz can u find the link which supports 64 bit
this the following error
moin@moin-Inspiron-N5010:~$ sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
dpkg: error processing gcc41-compat-4.1.2_i386.deb (--install):
package architecture (i386) does not match system (amd64)
dpkg: error processing g++41-compat-4.1.2_i386.deb (--install):
package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
gcc41-compat-4.1.2_i386.deb
g++41-compat-4.1.2_i386.deb
 
Old 01-10-2012, 09:49 PM   #183
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi! i think i have 64 bit os of ubuntu 10.10.
i am working on leach protocol so plz can u find the link which supports 64 bit
this the following error
moin@moin-Inspiron-N5010:~$ sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
dpkg: error processing gcc41-compat-4.1.2_i386.deb (--install):
package architecture (i386) does not match system (amd64)
dpkg: error processing g++41-compat-4.1.2_i386.deb (--install):
package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
gcc41-compat-4.1.2_i386.deb
g++41-compat-4.1.2_i386.deb
 
Old 01-10-2012, 09:52 PM   #184
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
You need to add a declaration of format_rca in cmu-trace.h
Code:
void format_imep(Packet *p, int offset);
void format_aodv(Packet *p, int offset);
void format_aomdv(Packet *p, int offset);
#ifdef MIT_uAMPS
void format_rca(Packet *p, int offset);
#endif

// This holds all the tracers added at run-time
static PacketTracer *pktTrc_;

};
where this lines should be added in cmu-trace.h
 
Old 01-11-2012, 04:27 AM   #185
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
# 182.

The 64bits g++-4.1 compiler from Ubuntu Hardy can be installed:

Synaptic : Settings > Archives > Other Software, and then tick
these entries : "Hardy Heron", + the two "Important security updates"
below the 'Hardy Heron' line.
Next : sudo apt-get update && sudo apt-get install g++-4.1

Note : You will get a reduced result with any ns2, on any 64bits OS :
Some more tests will fail, when you do './validation



#184
Quote:
? where this lines should be added in cmu-trace.h ?
? Are you talking about the edited cmu-trace.h in post #9 here ?
http://www.linuxquestions.org/questi...ra13-907076/#9

..

Last edited by knudfl; 01-11-2012 at 04:30 AM.
 
Old 01-11-2012, 04:53 AM   #186
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
h! i am getting the error in leach.err
can u plz find this soln to me ASAP

can't read "env(RCA_LIBRARY)": no such variable
while executing
"source $env(RCA_LIBRARY)/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 9)
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)
 
Old 01-12-2012, 07:36 PM   #187
revathhy
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Rep: Reputation: Disabled
i need to run leach in ns2 for my project . i have installed fedora2 and ns2.29. i have patched ns2 with mannasim patch. but its not working. i went through most of the posts in this forum. can i install ns2.34 in fedora2 and then the patch files. Will ns2.34 work in fedora2.
if i have to install ns2.34 , have i to uninstall ns2.29.
 
Old 01-20-2012, 03:15 AM   #188
jignya
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
hi all...

Thank you all for your help.
I have followed all the steps mentioned in Post#5.

After make clean and make commands,

In /home/jignya/ns-allinone-2.34/ns-2.34/ns-234-leach/mit/leach_sims , I found in leach.out following warnings:

Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead

At 494.80000000004401:
Total Energy = 327.82507706058254
Total Data = 44146
Total Alive = 4

Simulation complete.

What do i need to do? Are these simulation results correct?
 
Old 01-28-2012, 07:59 AM   #189
gowdham
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
integrating leach in ns 2.34 in ubuntu 10.04

Quote:
Originally Posted by MayTamer View Post
I suppose that ns-2.34 is installed with the compiler gcc-4.3.
The home directory of ns-2.34 is "/opt/ns-allinone-2.34"
1- download the package "ns-234-leach.tar.gz" into the directory "/opt/ns-allinone-2.34/ns-2.34".
https://docs.google.com/uc?id=0BzLWx...CNWG1NQK&hl=en
2- download the bash file "leach-setup.sh" into the directory "/opt/ns-allinone-2.34/ns-2.34".
https://docs.google.com/uc?id=0BzLWx...CJSU5ZYG&hl=en
3- If the home directory of your "ns-2.34" is other than "/opt/...", then you need to find "/opt/ns-allinone-2.34" and replace with "yourpath/ns-allinone-2.34" for the file "leach-setup.sh".
4- move to the directory "/opt/ns-allinone-2.34/ns-2.34" and patch the file "leach-setup.sh"
wsn@ubuntu:~$ cd /opt/ns-allinone-2.34/ns-2.34/
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$ bash leach-setup.sh
5- If the home directory of your "ns-2.34" is other than "/opt/...", then you need to find "/opt/ns-allinone-2.34" and replace with "yourpath/ns-allinone-2.34" for the follwoing two files:
- "Makefile" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34".
- "Makefile.in" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34".
6. Edit both “Makefile” & “Makefile.in” as following:
CC = gcc-4.3
CPP = g++-4.3
7- run the following commands
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$./configure
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$make clean
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$make
7- If the previous commands passed successfully then you are ready to test your "Leach" by running ./test:
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$./test
8. check the file "leach.err", if no error reported then go to "leach.out" and enjoy your results!





@maytamer post #5

i got d followin error aftr followin ur steps..


trace/cmu-trace.cc:1531: error: ‘ADV_CHAR’ was not declared in this scope
trace/cmu-trace.cc:1535: error: ‘REQ_CHAR’ was not declared in this scope
trace/cmu-trace.cc:1539: error: ‘DATA_CHAR’ was not declared in this scope
make: *** [trace/cmu-trace.o] Error 1


can u pls help me out..
thank u in advance!
 
Old 01-28-2012, 09:31 AM   #190
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
# 189, @gowdham.

1) Ubuntu 11.04 : Use the gcc41/g++41 -compat compiler mentioned in post #181.
...... ( Or the gcc42/g++42 -compat, mentioned in post #2 here
http://www.linuxquestions.org/questi...-4-a-910246/#2 )

2) And use the edited cmu-trace.h : There's a reference in post #185.

.
 
Old 01-28-2012, 08:45 PM   #191
gowdham
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Unhappy

post #190, knudfl,

but i'm using ubuntu 10.04!
 
Old 01-29-2012, 12:35 PM   #192
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
# 191

Sorry. Ubuntu 10.04 :
Used to be OK with the default g++-4.4 compiler.
After some updates : It seems now to require g++-4.3 for ns-2.34 :
sudo apt-get install g++-4.3

cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install

Remark : The new "cmu-trace.h" is still required.

.
 
Old 01-31-2012, 03:24 AM   #193
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by MayTamer View Post
I suppose that ns-2.34 is installed with the compiler gcc-4.3.
The home directory of ns-2.34 is "/opt/ns-allinone-2.34"
1- download the package "ns-234-leach.tar.gz" into the directory "/opt/ns-allinone-2.34/ns-2.34".
https://docs.google.com/uc?id=0BzLWx...CNWG1NQK&hl=en
2- download the bash file "leach-setup.sh" into the directory "/opt/ns-allinone-2.34/ns-2.34".
https://docs.google.com/uc?id=0BzLWx...CJSU5ZYG&hl=en
3- If the home directory of your "ns-2.34" is other than "/opt/...", then you need to find "/opt/ns-allinone-2.34" and replace with "yourpath/ns-allinone-2.34" for the file "leach-setup.sh".
4- move to the directory "/opt/ns-allinone-2.34/ns-2.34" and patch the file "leach-setup.sh"
wsn@ubuntu:~$ cd /opt/ns-allinone-2.34/ns-2.34/
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$ bash leach-setup.sh
5- If the home directory of your "ns-2.34" is other than "/opt/...", then you need to find "/opt/ns-allinone-2.34" and replace with "yourpath/ns-allinone-2.34" for the follwoing two files:
- "Makefile" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34".
- "Makefile.in" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34".
6. Edit both “Makefile” & “Makefile.in” as following:
CC = gcc-4.3
CPP = g++-4.3
7- run the following commands
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$./configure
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$make clean
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$make
7- If the previous commands passed successfully then you are ready to test your "Leach" by running ./test:
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$./test
8. check the file "leach.err", if no error reported then go to "leach.out" and enjoy your results!
@MayTamer and all,

In step #7, how do we know that all the commands have passed successfully? In my case, I got
Code:
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/zahariahmanap/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'
after hitting make command.

Then, when I tried to run ./test, I got "Permission denied".

Tq all. really appreciate your attention n helps.
 
Old 01-31-2012, 03:38 AM   #194
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
# 193.

The directories "indep-utils/**" are not cleaned by 'make clean'.
"Nothing to be done for `all'" means : Everything has been built.
Is OK, and has nothing to do with LEACH.


Permission denied for ./test : No available '/bin/bash' command ? ?
You may also get 'Permission denied' if some commands were run
by using 'sudo <command>'

.
 
Old 01-31-2012, 04:21 AM   #195
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
@knudfl,

this is what I got after typing './test'
Code:
bash: ./test: Permission denied
.

I tried 'sudo ./test', but I got
Code:
 sudo: ./test: command not found
.

tq knudfl for your prompt reply
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis



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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 AM.

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