LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 03-09-2012, 03:20 AM   #16
anitha.r.u
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
How to install leach in feroda


can u guide me how to install leach protocol in fedora. I am in new user in this tool.
 
Old 03-09-2012, 03:33 AM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
Post # 16, @ anitha.r.u

Your other thread is about ns-2.27. This thread is about ns-2.34 + Fedora.
Just read all the above 15 posts carefully, and you are supposed to succeed.

...... Please ask, if you have specific issues.

.
 
Old 09-04-2012, 11:30 AM   #18
swtjeeva
LQ Newbie
 
Registered: Jul 2012
Posts: 21

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

# yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel

cd ns-allinone-2.34/tk8.4.18/ &&
wget ftp://ftp.swin.edu.au/gentoo-portage...astevent.patch
&& patch -p0 < tk-8.4-lastevent.patch && cd ../ &&
export CC=gcc34 CXX=g++34 && ./install

And LEACH, post # 5 here
http://www.linuxquestions.org/questi...2-34-a-870368/

..

Am new to linux and ns2.....
Can u pls explain me briefly..,how to execute these commands....???? Pls
"cd ns-allinone-2.34/tk8.4.18/ &&
wget ftp://ftp.swin.edu.au/gentoo-portage...astevent.patch
&& patch -p0 < tk-8.4-lastevent.patch && cd ../ &&
export CC=gcc34 CXX=g++34 && ./install"
 
Old 09-04-2012, 12:48 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 18

It's either one command at a time :
1) cd ns-allinone-2.34/tk8.4.18/
2) wget ftp://ftp.swin.edu.au/gentoo-portage...astevent.patch
3) patch -p0 < tk-8.4-lastevent.patch
4) cd ../
5) export CC=gcc34 CXX=g++34
6) ./install

Or : All of it as one command :
Code:
cd ns-allinone-2.34/tk8.4.18/ && wget ftpftp://ftp.swin.edu.au/gentoo-portage/dev-lang/tk/files/tk-8.4-lastevent.patch://ftp.swin.edu.au/gentoo-portage/dev-lang/tk/files/tk-8.4-lastevent.patch && patch -p0 < tk-8.4-lastevent.patch && cd ../ && export CC=gcc34 CXX=g++34 && ./install
 
Old 02-14-2013, 02:21 AM   #20
Pavith
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

# yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel


..
i m getting this error on executing the above lines:

Loaded plugins: langpacks, presto, refresh-packagekit
http://linuxdownload.adobe.com/linux...ta/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host"
Trying other mirror.
http://linuxdownload.adobe.com/linux...ta/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: adobe-linux-i386. Please verify its path and try again
 
Old 02-14-2013, 03:19 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 20
Quote:
Cannot retrieve repository metadata (repomd.xml) for repository: adobe-linux-i386
The URL seems not to be valid any more.
cd /etc/yum.repos.d/
... Then remove or hide the corrupt repo :
# rm adobe-linux-i386.repo
 
1 members found this post helpful.
Old 02-14-2013, 03:52 AM   #22
Pavith
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Unhappy

i removed it.. and tried the same procedure again..
got this:

Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
 
Old 02-14-2013, 05:40 AM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 22 . http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

Which Fedora ? Version and "arch", please.

Version : $ cat /etc/redhat-release

Architecture : $ uname -m

-
 
1 members found this post helpful.
Old 02-18-2013, 03:20 AM   #24
Pavith
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Smile

[root@localhost ~]# cat /etc/redhat-release
Fedora release 16 (Verne)
[root@localhost ~]# uname -m
i686

thank u again!!
 
Old 02-18-2013, 03:44 AM   #25
Pavith
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Unhappy

i tried reinstalling ns 2.34 in the same system.. so i deleted the previous ns allinone folder..
then i downloaded ns2.34, extracted it in /opt.
gave install command.. got the following error!!

Quote:
tools/ranvar.cc
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [tools/ranvar.o] Error 1
Ns make failed!
 
Old 02-18-2013, 03:53 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 25 .

The default install directory is /home/<name>/ns2/ .

And the install command is :
$ export CC=gcc34 CXX=g++34 && ./install

About your error : Looks like g++ was used. Must be g++34.

-
 
Old 02-18-2013, 04:02 AM   #27
Pavith
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
============================================================
* Testing for Darwin (OS X) environment
============================================================
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
============================================================
FreeBSD not detected
============================================================
* Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking if malloc debugging is wanted... no
checking for gcc... (cached) 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... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for X... (cached) libraries , headers
checking for dnet_ntoa in -ldnet... (cached) no
checking for dnet_ntoa in -ldnet_stub... (cached) no
checking for gethostbyname... (cached) yes
checking for connect... (cached) yes
checking for remove... (cached) yes
checking for shmat... (cached) yes
checking for IceConnectionNumber in -lICE... (cached) yes
checking for float.h... (cached) yes
checking for limits.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strcasecmp... (cached) yes
creating ./config.status
creating Makefile
creating autoconf.h
autoconf.h is unchanged
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c dialog.c
dialog.c: In function ‘make_msg_box’:
dialog.c:780:5: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
/usr/include/stdio.h:677:18: note: expected ‘size_t * __restrict__’ but argument is of type ‘char *’
dialog.c:780:5: error: too few arguments to function ‘getline’
/usr/include/stdio.h:677:18: note: declared here
dialog.c: In function ‘getline’:
dialog.c:893:7: error: argument ‘lptr’ doesn’t match prototype
/usr/include/stdio.h:677:18: error: prototype declaration
dialog.c:899:1: error: number of arguments doesn’t match prototype
/usr/include/stdio.h:677:18: error: prototype declaration
make: *** [dialog.o] Error 1
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g -c -o ctangle.o ctangle.c
ctangle.w:75:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.c
common.w:1409:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -o ctangle ctangle.o common.o
gcc -g -c -o cweave.o cweave.c
cweave.w:79:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -o cweave cweave.o common.o
ln: failed to create symbolic link `cweave': File exists
ln: failed to create symbolic link `ctangle': File exists
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
gcc34 -g -I/usr/local/sgb/include test_io.c gb_io.o -o test_io
make: gcc34: Command not found
make: *** [test_io] Error 127
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
gcc -I../include -L../lib -DFBSD -o ../bin/itm itm.o geog.o ts.o dfs.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/sgb2alt sgb2alt.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/edriver edriver.o eval.o -lm -lgb
gt-itm has been installed successfully.
gcc -I../include -L../lib -o ../bin/sgb2comns sgb2comns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2hierns sgb2hierns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2ns sgb2ns.o -lm -lgb
sgb2ns has been installed successfully.
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.2.3 with gcc34.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
make: Nothing to be done for `all'.
Zlib has been installed successfully.
============================================================
* Build tcl8.4.18
============================================================
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc34
checking whether the C compiler works... no
configure: error: in `/root/Desktop/ns-allinone-2.34/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 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.



i m sorry,
i realise that u r spending time for me.. Thank u lots.. u r really helpful!!

Gratitude
 
Old 02-18-2013, 08:41 AM   #28
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 27 .
Quote:
checking for gcc... gcc34
checking whether the C compiler works... no
configure: error: in `/root/Desktop/ns-allinone-2.34/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
* Seems like you forgot to install the gcc packages : gcc-c++, compat-gcc-34-c++.

Please read post # 2 : # yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel

-
 
Old 07-08-2013, 04:27 AM   #29
DeepaliDeshpande
LQ Newbie
 
Registered: Jul 2013
Posts: 11

Rep: Reputation: Disabled
Hi Knfudl
I have seen that u have help many for leach implementation.
Please help me also to find remaining energy using stats.tcl
and also let me know how leach.energy file is created. Its really very urgent
Thank u
 
Old 07-31-2013, 02:53 AM   #30
gunjan9876
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Rep: Reputation: Disabled
newbie in ns2.34

Hello sir,

I am trying to install LEACH in ns2.34 (Ubuntu 12.04, gcc-4.6)but i am getting the following error


"cp: cannot create regular file `/opt/ns-allinone-2.34/ns-2.34': No such file or directory "

whereas my path is "home/bhargavi/ns-allinone-2.34/..."

Please guide me ...
 
  


Reply

Tags
leach, leach-f13, leach-ns234, 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
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
Leach on ns2.34 linux_ubuntu Linux - Newbie 2 10-04-2011 02:32 AM
LEACH on NS2 deepa_2111 Linux - Newbie 1 04-05-2011 07:53 PM
leach in ns2.33 hayet Linux - Newbie 2 03-18-2011 06:03 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM


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