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 02-06-2014, 11:52 PM   #1
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Rep: Reputation: Disabled
Unhappy NS2: please help new LEACH user


I am new to leach..kindly help me how re-election happens in leach and also kindly give me the step by step to install leach plz..
 
Old 02-07-2014, 02:10 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
PLEASE spell out your words
please IS NOT SPELLED " plz"

this is NOT a "text message" so please DO NOT use "text speak"

You might want to read the guide to posting a question
http://www.linuxquestions.org/linux/...Ask_a_Question

include the Operating system and version and what you have done so far
and what EXACTLY it is you are installing
a URL to it would help

Last edited by John VV; 02-07-2014 at 02:20 AM.
 
Old 02-07-2014, 02:11 AM   #3
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
Please try to be more descriptive with your titles in future!

Tell us, in detail, which distro you're using and what the specs of your computer are.
Also, what exactly is leach? What do you need it for? I can't find anything by that name in the Debian repositories and a Web search doesn't bring up anything meaningful.
 
Old 02-07-2014, 02:36 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please use a descriptive title for your thread excluding words like 'urgent' or 'help'. Using a proper title makes it easier for members to help you. This thread has been reported for title modification. Please do not add replies that address the thread title.
 
Old 02-07-2014, 12:15 PM   #5
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
@Abhinaya : Welcome to LQ.

Leach info, post #3 here ..
http://www.linuxquestions.org/questi...-4175493139/#3
 
1 members found this post helpful.
Old 02-11-2014, 08:31 AM   #6
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Question

Hello knudfl
sir i get these errors while installing gcc and g++ for ubuntu 12.04

abhinaya@abhinaya:~/leachfiles$ sudo dpkg -i compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb compat-gcc-34-c++_3.4.6-20_amd64.deb
dpkg: error processing compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb (--install):
package architecture (amd64) does not match system (i386)
dpkg: error processing compat-gcc-34-c++_3.4.6-20_amd64.deb (--install):
package architecture (amd64) does not match system (i386)
Errors were encountered while processing:
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb
compat-gcc-34-c++_3.4.6-20_amd64.deb

kindly help me.thanks
 
Old 02-11-2014, 09:30 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
# 6 .

*amd64.deb packages are for a 64bits OS. Which is not recommended.

When you have the recommended 32bits (i686) OS :
Please use the *i386.deb packages. For Ubuntu 12.04, they are :
gcc41-compat-4.1.2.ubu1204_i386.deb and g++41-compat-4.1.2_i386.deb .
Please read post #18 here ..
http://www.linuxquestions.org/questi...022/page2.html

-
 
1 members found this post helpful.
Old 02-11-2014, 10:14 AM   #8
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Unhappy

thanks sir it worked but when i run make it shows the following error

abhinaya@abhinaya:~/Desktop/ns-allinone-2.34/ns-2.34$ make
gcc-4.1 -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I. -I/home/abhinaya/Desktop/ns-allinone-2.34/tclcl-1.19 -I/home/abhinaya/Desktop/ns-allinone-2.34/otcl -I/home/abhinaya/Desktop/ns-allinone-2.34/include -I/home/abhinaya/Desktop/ns-allinone-2.34/include -I/home/abhinaya/Desktop/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -I./mit/rca -I./mit/uAMPS -o tcp/linux/tcp_naivereno.o tcp/linux/tcp_naivereno.c
make: gcc-4.1: Command not found
make: *** [tcp/linux/tcp_naivereno.o] Error 127
 
Old 02-11-2014, 10:31 AM   #9
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
# 8 .

Please read http://www.linuxquestions.org/questi...022/page2.html
I.e. the c compiler name is gcc41 , not gcc-4.1 .
Which means you will have to reconfigure with
$ export CC=gcc41 CXX=g++41 && ./configure

.. or edit the Makefile to
CC = gcc41
CPP = g++41

-
 
1 members found this post helpful.
Old 02-12-2014, 07:13 AM   #10
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Question

hello knudfl sir
thank you for your post.i successfully installed but i got these errors in leach.err kindly help me to rectify

leach.err
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/home/abhinaya/Desktop/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/abhinaya/Desktop/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.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 /home/abhinaya/Desktop/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 24)
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 02-12-2014, 07:35 AM   #11
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
# 10 .

Has been answered many many time before ..
* http://www.linuxquestions.org/questions/tags/leach/
* http://www.linuxquestions.org/questions/tags/pegasis/

Please reread #3 http://www.linuxquestions.org/questi...-4175493139/#3
I.e. ""The latest patch is exidus-pegasis-leach-ns234-patch.2.tar.gz ,
.. which is the proof way of running leach in a contemporary Linux OS.""

-
 
2 members found this post helpful.
Old 03-12-2014, 11:48 AM   #12
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
gcc errors

hello knudfl sir i had started from scartch of installing ns2 but i got these new errors when installing gcc 3.4 please help me to rectify it.
dharani@dharani:~/Documents/leachfiles$ sudo dpkg -i compact-gcc34-3.4.6-ubuntu1204-1_amd.deb compact-gcc-34-c++_3.4.6-20_amd64.deb
[sudo] password for dharani:
dpkg: error processing compact-gcc34-3.4.6-ubuntu1204-1_amd.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing compact-gcc-34-c++_3.4.6-20_amd64.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
compact-gcc34-3.4.6-ubuntu1204-1_amd.deb
compact-gcc-34-c++_3.4.6-20_amd64.deb
 
Old 03-12-2014, 01:17 PM   #13
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
# 12 .

Please show the output from the command $ uname -m <Enter>

And $ cat /etc/issue <Enter>


-
 
Old 03-12-2014, 09:24 PM   #14
Abhinaya
LQ Newbie
 
Registered: Jan 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
the output for those commands

dharani@dharani:~$ uname -m
x86_64
dharani@dharani:~$ cat /etc/issue
Ubuntu 12.04.1 LTS \n \l
 
Old 03-13-2014, 07:12 AM   #15
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
# 14 .

All ns2 is for a 32bits (i686) OS.
Some versions / patches will however sometimes work with some 64bits (x86_64) OS's.


#12
Quote:
compact-gcc34-3.4.6-ubuntu1204-1_amd.deb
compact-gcc-34-c++_3.4.6-20_amd64.deb
There are no packages with those file names.
Please don't try typing long file names. Use copy/past instead.
( It's "compat" (like compatible), not "compact".

-

Last edited by knudfl; 03-13-2014 at 07:14 AM.
 
  


Reply

Tags
leach, ns2



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
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 14 04-16-2018 07:10 AM
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 04:54 AM
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM

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

All times are GMT -5. The time now is 03:19 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