LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-05-2013, 04:23 AM   #1
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Rep: Reputation: Disabled
GPSR on NS2.34


hi,
I need to patch GPSR on ns2.34 and yet I know that some members did it already so I'm asking for help

I follow steps on the readme file
http://www.cs.binghamton.edu/~kliu/r...ode/index.html
when i make i have no errors but i realize that there is no ".o"file for gpsr and so I can't simulate this routing protocol

invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set planar_type_ 0 "

in fact I'm not sure what is the problem
thkx

Last edited by farfattou; 02-05-2013 at 05:28 AM.
 
Old 02-05-2013, 06:30 AM   #2
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi,problem solved
thkx
 
Old 02-05-2013, 07:08 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 1
Quote:
invalid command name "Agent/GPSR"
Looks like no gpsr was compiled.
Intended objects : ns-2.34/gpsr/ gpsr.o gpsr_sinklist.o gpsr_neighbor.o
... May be you forgot to edit the Makefile.in ?

Anyway, it has been done before: gpsr-KeLiu-patched-ns234.tar.gz (14.4 MB)
Download link https://docs.google.com/file/d/0B7S2...it?usp=sharing
.. The patch origins from a huge "gpsr-KeLiu-ns234.tar.gz", 51.6 MB
by @ VanetG, post # 80 here ..
http://www.linuxquestions.org/questi...526/page6.html

Install :
1) cd ns-allinone-2.34/ && tar xvf gpsr-KeLiu-patched-ns234.tar.gz
2) export CC=gcc41 CXX=g++41 && ./install


"Ready-to-install" Ubuntu packages : a) gpsr-keliu-ns-2.34-ubuntu10_i386.deb,
post # 89 http://www.linuxquestions.org/questi...526/page6.html

b) gpsr-hls-2.33-ubuntu10_i386.deb
https://docs.google.com/file/d/0B7S2...it?usp=sharing

GPSR info : LQ Search → Tag = gpsr-hls , gpsr-keliu , gpsr


Good luck !

EDIT : Buzy writing post # 3, while you posted #2.


-

Last edited by knudfl; 02-05-2013 at 07:11 AM.
 
1 members found this post helpful.
Old 02-06-2013, 07:37 AM   #4
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi,
I 'm switching to ns2.33 on my ubuntu 11.04 and I did install the ns and olsr patch. when i try with hls patch
this error is provided:

configure: error: in `/home/../ns-allinone-2.33/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.


any suggestions
 
Old 02-06-2013, 08:15 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 4

Which compiler ? ( For tcl8.4.18/unix/ it is gcc** ).

.. And didn't you use this compiler with tcl8* before ?

? May be you typed a wrong "export CC=gcc41 .." command ? ?

-

Last edited by knudfl; 02-06-2013 at 12:49 PM.
 
Old 02-06-2013, 08:41 AM   #6
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi
I did the following steps:
1) cd ns-allinone-2.33/ns-2.33 && tar xvf hls-files-ns233.tar.gz
2) patch -p1 < ns2-hls-patch/ns-2.33-hls.patch
3) export CC=gcc41 CXX=g++41 && ./install

I get this message:
common/packet.h: In static member function ‘static void p_info::initName()’:
common/packet.h:398: erreur: ‘PT_LOCS’ was not declared in this scope
common/packet.h:401: erreur: ‘PT_HLS’ was not declared in this scope
common/packet.h:404: erreur: ‘PT_GPSR’ was not declared in this scope
make: *** [common/scheduler.o] Erreur 1
Ns make failed!

PS: O.S ubuntu 11.04
what's missing, plz?
 
Old 02-06-2013, 12:43 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
#6 . May be the changes for the Makefile was forgotten ?
The patch is : ns-2.33-hls.Makefile.patch.

Or even better : Edit the patch to make the changes to 'Makefile.in'.
Or use the attached Makefile.in .

EDIT : Sorry, the Makefile.in changes are included in "ns-2.33-hls.patch".
( Line 19356 ).

-
Attached Files
File Type: txt hls-Makefile.in.txt (19.4 KB, 21 views)

Last edited by knudfl; 02-06-2013 at 01:15 PM.
 
Old 02-06-2013, 01:39 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 6
Quote:
1) cd ns-allinone-2.33/ns-2.33 && tar xvf hls-files-ns233.tar.gz
2) patch -p1 < ns2-hls-patch/ns-2.33-hls.patch
The package hls-files-ns233.tar.gz was used to "repair"
a failed patching in Ubuntu 10.04 :
#23 http://www.linuxquestions.org/questi...526/page2.html
.. And must be used in the opposite order than your command :
patch -p1 < ns-2.33-hls.patch && tar xvf hls-files-ns233.tar.gz
... Probably not required for Ubuntu 11.04 .

-
 
Old 02-06-2013, 02:20 PM   #9
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi, my os is ubuntu 11.04 and I 'm working on ns2.33
i did install the um-olsr patch and it works fine
i just install the hls patch and it works fine too
but when i re-test the olsr i get error


num_nodes is set 5

(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
GPSR {
set ragent [$self create-gpsr-agent $node]
}
DSR {
$self at ..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $opt(nn)} {incr i} {
set node_($i) [$ns_ node]
}"
(file "olsr_example2.tcl" line 94)





any idea it's really frustrating
 
Old 02-06-2013, 02:32 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 8

One patch will add changes to some files, say
common/packet.h queue/priqueue.h queue/priqueue.cc
tcl/lib/ns-lib.tcl tcl/lib/ns-default.tcl tcl/lib/ns-packet.tcl .

And the next patch may undo those first changes,
and even add something that conflicts with
the functions intended in the first patch.

A few patches are meant to live together.
Or at least have no conflicts.
Most others not.
-
Attached Files
File Type: txt hls_changed.txt (779 Bytes, 25 views)

Last edited by knudfl; 02-06-2013 at 02:35 PM.
 
Old 02-06-2013, 02:59 PM   #11
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi knudfl,
thkx for your quick reply
are you suggesting that there is nothing to do?

ps: with ns-allinone-2.34 everything is ok(2 patches works) but I need the ns-allinone-2.33 because service location is already integreted with gpsr

on the other hand, can I have the same ns-allinone in 2 different emplacement in my OS (for example /home and /home/xx)

Last edited by farfattou; 02-06-2013 at 03:01 PM.
 
Old 02-06-2013, 04:36 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 11

You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do not add any of them to a *PATH.
Examples :
/home/<user/a/ns-allinone-2.34/
/home/<user/b/ns-allinone-2.34/
/home/<user/c/ns-allinone-2.34/
/home/<user/x/ns-allinone-2.33/
/home/<user/y/ns-allinone-2.33/

The binary **-ns** packages mentioned (#3) use another location
to be system wide. Like /usr/local/lib/gpsr-hls/ns-allinone**/(bin/)(lib/),
/usr/local/lib/gpsr-KeLiu/ns-allinone**/(bin/)(lib/).

Conclusion : Not limits for the number of installed ns2** versions.

-

Last edited by knudfl; 02-06-2013 at 04:39 PM.
 
Old 02-07-2013, 06:51 AM   #13
farfattou
Member
 
Registered: Oct 2011
Posts: 64

Original Poster
Rep: Reputation: Disabled
hi knudfl
thkx for your quick reply
just you always mention "do not dd to * PATH"
I'm not sure what do you mean? I don't know how to avoid such thing? is there a special command ?
 
Old 02-07-2013, 07:31 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 13
Quote:
do not add any of them to a *PATH.
It's a common thing that ns2 paths are added to the '.bash_profile'.
.. And please do not do so, when you have more than one ns2 install.

Besides that it is not required :
The executable 'ns' is hard coded to know the locations of its libraries.
All "ns" can just be copied to /usr/local/bin/ ,
with recognizable naming like /usr/local/bin/ns-hls, /usr/local/bin/ns-gpsr-keliu,
etc. etc.

-
 
Old 08-16-2013, 01:51 AM   #15
hemantnyadav
LQ Newbie
 
Registered: Aug 2013
Posts: 6

Rep: Reputation: Disabled
Please let me know the Congif

Hi,

I have configured GPSR as

http://www.cs.binghamton.edu/~kliu/r...ode/index.html

But at last when I make ns2 it Gives

$ make
Makefile:339: *** recipe commences before first target. Stop.


Please help me to solve it.
 
  


Reply

Tags
gpsr, gpsr-hls, gpsr-keliu


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
Code of GPSR for ns2.33 or ns2.35 monikagoyal Linux - Software 31 04-26-2013 12:13 PM
Error during GPSR installation in NS2 mrohini Linux - Networking 11 12-27-2012 03:50 AM
GPSR installation mrohini Linux - Networking 1 10-15-2012 04:33 AM


All times are GMT -5. The time now is 02:35 AM.

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