LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2014, 12:44 PM   #1
ali12
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Rep: Reputation: Disabled
Ubuntu 12.04


hii there
I am new with the NS2 simulator and I have install Ubuntu 12.04 on vmwear and NS2.33


ali@ubuntu:~$ which ns
/usr/local/bin/ns


in order to implement the gpsr protocol and I have this error:

ali@ubuntu:~/ns-allinone-2.33/hls-utils$ ns-hls hls.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "hls.tcl" line 6)
and I am follow these steps that posts
#23
http://www.linuxquestions.org/questi...526/page2.html

and when I apply this comment
&& export CC=gcc-4.1 CXX=g++-4.1 && ./install

I get this error


============================================================
* Build tcl8.4.18
============================================================
autom4te: cannot open autom4te.cache/requests: Permission denied
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... gcc-4.1
checking whether the C compiler works... no
configure: error: in `/home/ali/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.

please if you can help and provide me the sequence of steps that I should follow to implement the protocol.
 
Old 03-20-2014, 02:22 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Welcome to LQ.

#23 http://www.linuxquestions.org/questi...526/page2.html #23
... says Ubuntu 10.04 : There is no gcc-4.1/g++-4.1 in Ubuntu 12.04 .

For 32bits (i686) Ubuntu 12.04 please use gcc41 / g++41, #18 here :
http://www.linuxquestions.org/questi...022/page2.html
$ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
.. Then reboot, and the new compiler can be used :

$ cd ns-allinone-2.33/ && export CC=gcc41 CXX=g++41 && ./install

-
 
1 members found this post helpful.
Old 03-21-2014, 03:09 PM   #3
ali12
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks Mr.knudfl for the quick response

actually I am new with NS2 and ubuntu and now I am interesting in this topic specially with ad hoc network and related protocols
so please if you can help me and show to me the best way to learn about this topic and how I can implement these protocols by using the NS2 and ubuntu

by the way sir if it is possible tell me the web site that i can use to download : ubuntu 12.04 32bits (i686)
and I plan to
install
1: ubuntu 12.04 32bits (i686)
2: install NS2.33 allinone
3: implement gpsr-hls protocol

this environment it is ok for this protocol

thanks and regards
 
Old 03-21-2014, 03:52 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 3 .
Quote:
web site that i can use to download : ubuntu 12.04 32bits (i686)
1) I thought you already had Ubuntu 12.04 ? Anyway, here it is ...
http://www.ubuntu.com/download/deskt...32&release=lts
>>> http://mirror.easyspeedy.com/ubuntu-...sktop-i386.iso
>> ubuntu-12.04.4-desktop-i386.iso


2 + 3) When you have installed the compilers, see post #2, it is :
Build ns-allinone-2.33 with GPSR-hls :
$ cd ns-allinone-2.33/ns-2.33/ && patch -p1 < ns-2.33-hls.patch
$ tar xvf hls-files-ns233.tar.gz && cd ../
$ export CC=gcc41 CXX=g++41 && ./install
**** EDIT : See post #5.

Install the executable 'ns(-hls)' :
$ cd ns-2.33/
$ sudo make install
... And to be sure that the 'ns' isn't confused with other "ns" please do :
$ cp ns ns-hls
$ sudo cp ns-hls /usr/local/bin/
... Important : All gpsr-hls simulations can be run with $ ns-hls file.tcl
That's it. Don't do anything more. (Like adding something to .bashrc ).

Simulation examples, gpsr-hls-examples-0113.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing

-

Last edited by knudfl; 03-21-2014 at 04:22 PM.
 
1 members found this post helpful.
Old 03-21-2014, 04:21 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
P.S. : There is actually a later set of "hls-files" for increased simplicity ,
gpsr-hls-ns233-patching.tar.bz2 , with everything included :
* https://drive.google.com/file/d/0B7S...it?usp=sharing

... Then the complete build is :

$ cd ns-allinone-2.33/
$ tar xvf gpsr-hls-ns233-patching.tar.bz2
$ export CC=gcc41 CXX=g++41 && ./install

-
 
1 members found this post helpful.
Old 03-25-2014, 11:22 AM   #6
ali12
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hii Mr.knudfl

I already did all the steps your mention the the posts # 2 and #5 and every thing completed
also I am already download the gpsr-hls-examples-0113.tar.gz and extract it inside ns-allinone-2.33
then I tried to execute an example

noor@ubuntu:~/ns-allinone-2.33$ cd hls-utils/
noor@ubuntu:~/ns-allinone-2.33/hls-utils$ ls

changjing1.tcl hls.tcl sc-x2000-y2000-n100-s30-t100-MRD
cp-n100-c400-15-98.tcl README_HLS sc-x2000-y2000-n40-s25-t40
cp-n40-a40-t40-c4-m0 README.txt ssoumayaa-0.tcl
evaluate.pl runfromdirectory.pl ssoumayaa.tcl
evFromdirectory.pl run_small.bat test_parameter.txt
gls_evaluate.pl run.tcl
noor@ubuntu:~/ns-allinone-2.33/hls-utils$ ns ssoumayaa-0.tcl
num_nodes is set 4

(_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]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(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 3)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set ID_($i) $i
set node_($i) [$ns_ node]
$node_($i) set id_ $ID_($i)
$node_($i) set address_ $ID_($i)
$node_..."
(file "ssoumayaa-0.tcl" line 121)
noor@ubuntu:~/ns-allinone-2.33/hls-utils$ ls
changjing1.tcl gls_evaluate.pl sc-x2000-y2000-n100-s30-t100-MRD
cp-n100-c400-15-98.tcl hls.tcl sc-x2000-y2000-n40-s25-t40
cp-n40-a40-t40-c4-m0 README_HLS ssoumayaa-0.tcl
evaluate.pl README.txt ssoumayaa.tcl
evFromdirectory.pl runfromdirectory.pl test_parameter.txt
fangzhen1.nam run_small.bat
fangzhen1.tr run.tcl
but when I tried to execute the nam file I got the following error
noor@ubuntu:~/ns-allinone-2.33/hls-utils$ nam fangzhen1.nam
*** !!! ***
nam cannot recognize the trace file fangzhen1.nam
Please make sure that the file is not empty and it is a nam trace
***********
noor@ubuntu:~/ns-allinone-2.33/hls-utils$

please if you can tell me what I should do to solve this problem

regards
 
Old 03-25-2014, 11:32 AM   #7
ali12
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
and also I got this error when I tried to execute the run.tcl file

noor@ubuntu:~/ns-allinone-2.33/hls-utils$ ns run.tcl
invalid command name "Agent/GPSR"
while executing
"Agent/GPSR set bdesync_ 0.5 "
(file "run.tcl" line 41)
noor@ubuntu:~/ns-allinone-2.33/hls-utils$

I hope you can help me to solve this problem

thanks and regards
 
Old 03-25-2014, 12:18 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 6 .
Quote:
$ ns ssoumayaa-0.tcl
Read post #4 :
Make a copy of the 'ns -gpsr' to a new name : $ cp ns ns-hls
And : $ sudo cp ns-hls /usr/local/bin/
... I.e. the simulation must be run with $ ns-hls ssoumayaa-0.tcl


# 7 .
Quote:
invalid command name "Agent/GPSR"
That's a typical error when the wrong 'ns' is used.
Use "ns-hls" or "ns-gpsr-hls" or whatever name you like.

("invalid command name "Agent/" can also be a failed build.)

Please read http://www.linuxquestions.org/questions/tags/gpsr/

-
 
Old 03-25-2014, 04:41 PM   #9
BabyElizabeth
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Rep: Reputation: Disabled
Thanks
 
  


Reply

Tags
gpsr, gpsr-hls, gpsr-hls#5, 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
How to Install Ubuntu 12.10 or Upgrade to Ubuntu 12.10 (Quantal Quetzal) from Ubuntu allu john sudhakar Linux - Newbie 1 10-26-2012 12:59 AM
LXer: Hereā??s Two Method That is Helping Ubuntu User to Upgrade Ubuntu 11.10/10.04 to Ubuntu 12.04 LT LXer Syndicated Linux News 0 05-12-2012 07:50 PM
LXer: Ubuntu live CD will let you upgrade to newer Ubuntu versions Ubuntu 11.04 Development LXer Syndicated Linux News 0 03-01-2011 04:20 PM
LXer: Ubuntu Restricted Extras - Lets Ubuntu Play Everything [Ubuntu for Beginners Sc LXer Syndicated Linux News 0 04-20-2010 01:10 AM


All times are GMT -5. The time now is 04:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration