LinuxQuestions.org
Visit Jeremy's Blog.
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 11-25-2011, 04:09 AM   #1
irphan
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Rep: Reputation: Disabled
SARA code implementation on ns-2.31


Dear I am new to ns-2
I need to install SARA algorithum on ns-2.31
http://cnm.tagus.inesc-id.pt/softwar...algorithm-sara
Looking forward for help

Regards
irphan
 
Old 11-25-2011, 04:33 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
There is a lengthy installation procedures document at that website. Have you read and followed it? If so, where are you having issues?
 
Old 11-25-2011, 06:13 AM   #3
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
And : Do not expect Ubuntu 11.04 to be usable for ns-2.31.
( Ubuntu 11.10 is unusable for any ns2.)



..

Last edited by knudfl; 11-26-2011 at 02:09 AM.
 
Old 11-28-2011, 05:58 AM   #4
irphan
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
SARA error

when I make the compilation i get the following error
I had made changes in the files as required by the documnet

sara/sara.cc: In member function ‘virtual void Sara::recv(Packet*, Handler*)’:
sara/sara.cc:516: error: ‘struct hdr_cmn’ has no member named ‘pt_’
sara/sara.cc:529: error: ‘struct hdr_cmn’ has no member named ‘pts_’
sara/sara.cc:534: error: ‘struct hdr_cmn’ has no member named ‘pts_’
sara/sara.cc: In member function ‘virtual void Sara::rt_ll_failed(Packet*)’:
sara/sara.cc:2013: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc: In member function ‘virtual void Sara::forwardData(Packet*, double)’:
sara/sara.cc:2229: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc:2230: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc:2231: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc:2263: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc:2265: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc:2265: error: ‘struct hdr_cmn’ has no member named ‘pid’
sara/sara.cc: In member function ‘virtual void Sara::addSN(Packet*)’:
sara/sara.cc:2872: error: ‘struct hdr_cmn’ has no member named ‘psn_’
sara/sara.cc:2878: error: ‘struct hdr_cmn’ has no member named ‘psn_’
sara/sara.cc: In member function ‘virtual void Sara::getSN(Packet*)’:
sara/sara.cc:2899: error: ‘struct hdr_cmn’ has no member named ‘psn_’
make: *** [sara/sara.o] Error 1
 
Old 11-29-2011, 12:27 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
# 4.

Which Ubuntu are you using ? ?

And which compiler ? g++-3.4 ? ?
 
Old 12-09-2011, 05:38 AM   #6
R@bia
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
SARA code implementation

I have also tried to run this "Simple Ant Routing Algorithm" using ns 2.31 on Ubunutu 10.10,gcc 4.3 and have also experienced the same errors as quoted by irphan.Please can any one help.
 
Old 12-09-2011, 07:43 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
@ R@bia, post #6 : Welcome to LQ.

ns-allinone-2.31 : In Ubuntu 10.04 the g++-4.1 compiler
from Ubuntu 10.04 Lucid must be used.

Please see post #7 here :
http://www.linuxquestions.org/questi...10-a-841718/#7

..

Last edited by knudfl; 12-14-2011 at 01:11 PM.
 
Old 12-14-2011, 04:27 AM   #8
R@bia
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
i got the following message while installing the ubuntu lucid g++4.1 compiler

Dependency is not satisfiable: gcc-4.1-base (= 4.1.2-27ubuntu1)
 
Old 12-14-2011, 05:49 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.
Quote:
Dependency is not satisfiable: gcc-4.1-base (= 4.1.2-27ubuntu1)
Then please uninstall the 'gcc-4.1-base' package, if installed.
Download it from the links shown in post #7,
and then install it manually with 'sudo dpkg -i gcc-4.1-base*'.
The same for 'cpp-4.1'. (The last package to install is 'g++4.1'.

..
 
Old 12-23-2011, 06:48 AM   #10
R@bia
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
I have implemented simple ant routing algorithm using ns2.31 on fedora 14 .and encountered the following errors when i compile

trace/cmu-trace.o: In function `hdr_sara::access(Packet const*)':
cmu-trace.cc.text._ZN8hdr_sara6accessEPK6Packet[hdr_sara::access(Packet const*)]+0x7): undefined reference to `hdr_sara:ffset_'
trace/cmu-trace.o: In function `hdr_cbr::access(Packet const*)':
cmu-trace.cc.text._ZN7hdr_cbr6accessEPK6Packet[hdr_cbr::access(Packet const*)]+0x7): undefined reference to `hdr_cbr:ffset_'
collect2: ld returned 1 exit status
make: *** [ns] Error 1

need help
 
Old 12-23-2011, 11:41 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

First : Make sure that g++34 is used, not the default g++ ,
which is version 4.5.1 .
( # yum install compat-gcc-34-c++ )

Start from scratch with a new unpacked ns-allinone-2.31,
or 'make clean' in otcl-*/ , tclcl-*/ , ns-2.31/.

Install command :
cd ns-allinone-2.31/ && export CC=gcc34 CXX=g++34 && ./install

.

Last edited by knudfl; 12-23-2011 at 11:44 AM.
 
Old 12-24-2011, 11:49 AM   #12
R@bia
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
@ post 11

i have installed ns-2.31 from scratch by using these steps


cd ns-allinone-2.31/ && export CC=gcc34 CXX=g++34 automake autoconf libtool libX11-devel \ libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel && ./install

after that i made changes in ~/.bashrc file as

# LD_LIBRARY_PATH
OTCL_LIB=/home/rabia/ns-allinone-2.31/otcl-1.13
NS2_LIB=/home/rabia/ns-allinone-2.31/lib
X11_LIB=/usr/X11R6/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB

# TCL_LIBRARY
TCL_LIB=/home/rabia/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/rabia/ns-allinone-2.31/bin:/home/rabia/ns-allinone-2.31/tcl8.4.14/unix:/home/rabia/ns-allinone-2.31/tk8.4.14
NAM=/home/rabia/ns-allinone-2.31/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

after that i have done source ~/.bashrc
and ./validate ..
but how can i know that that g++34 is used, not the default g++ ,
which is version 4.5.1 .?
 
Old 12-24-2011, 02:54 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
Quote:
cd ns-allinone-2.31/ && export CC=gcc34 CXX=g++34 automake autoconf libtool libX11-devel \ libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel && ./install
Wrong. The package names are the ones, you will have to install with yum:
# yum install gcc-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel




Quote:
after that i made changes in ~/.bashrc
.
.
after that i have done source ~/.bashrc
Why ? Not required.


Quote:
how can i know that that g++34 is used
This command clearly says : Use g++34 :
cd ns-allinone-2.31/ && export CC=gcc34 CXX=g++34 && ./install
Which you also will see, when you look at the make sequence for ns-2.34/.

Last edited by knudfl; 12-25-2011 at 03:00 AM.
 
Old 12-27-2011, 01:32 AM   #14
irphan
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Knudfl

Dear Rabia and kundfl

I am going through the same issue as Rabia has mentioned in her post . If possible for you both specially kundfl I can arrange a remote Desktop of my installation so that we should achieve the solution ASAP
More over for information I am trying to run same SARA algorithum on fedora 14 and recieving same issues
my current installation is on VMWARE with fedora14 and ns2.31

please respond
Irphan
 
Old 01-15-2012, 05:05 PM   #15
R@bia
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
SARA algorithm

in implementing the SARA algorithm by installing ns2.31 using gcc3.4 on fedora 14 .. now when i run the following on command prompt

make clean all;
few errors comes like this . can anybody help.? what this shows?
for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
make[1]: Entering directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rabia/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb'
 
  


Reply

Tags
ns2, sara



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
Does anyone have SARA 7.9.1 or 7.9.2A available kaplan71 Linux - Software 3 04-27-2010 12:21 PM
Linux + Code Blocks + Shared Library + my Implementation = Not Working! morty346 Programming 1 04-27-2009 04:21 PM
Unable to execute code in Implementation class when a button is clicked Gnarg Programming 2 12-01-2005 06:36 AM
SARA install Crashed_Again Linux - Security 4 12-19-2002 05:37 PM
SARA and ipchains ugge Linux - Security 2 10-02-2001 12:48 AM

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

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