LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-03-2014, 02:27 PM   #16
ss1990
LQ Newbie
 
Registered: Jan 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled

it worked with following commands..
Quote:
$ cd ns-allinone-2.33/ns-2.33/
$ patch -p1 < dir-antenna.patch
$ patch -p1 < multi-if.patch
$ cd ../ && ./install
 
Old 04-03-2014, 04:14 PM   #17
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
#15, #16 : Ubuntu 12.04 - 64bits.

OK, that's a surprise. Times two.
That a 64bits OS works better with a patch than a 32bits OS.
And that ns-allinone-2.33 can be built with gcc-4.4 / g++-4.4 .
It's usually the opposite with most other patches / simulations.
( tclcl fails with gcc-4.4 in the 32bits Ubuntu 12.04 ).

#16 : ""$ cd ../ && ./install"" : No export ..gcc-4.4...? Are you sure ?
That would be gcc-4.6/g++-4.6 .
And ns-2.33/ fails here with g++-4.6 . g++-4.4 works.

#15 : ""$ cd ../ && export CC=gcc41 CXX=g++41 && ./install"".
I guess that's a typo : You have no gcc41/g++41. Please edit.


I got a perfect simulation in the 64bits Ubuntu 12.04 .
( The 32bits `12.04' showed "Floating point exception" one time.)

Conclusion : The "Direct Antenna" files will work best in Ubuntu 12.04 - 64.
... And you were lucky that you didn't have one of the many other OS choices.

-
 
Old 04-05-2014, 07:08 AM   #18
ss1990
LQ Newbie
 
Registered: Jan 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
#9 : I wrote the changes together and I used follwing commands to recompile the ns2 but it doesn't work. i got an error.
Quote:
cd../ && ./install
this is the error I got

Quote:
.......
-I./satellite -I./wpan -o tools/ranvar.o 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!
what should I do??
 
Old 04-05-2014, 07:48 AM   #19
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
# 18 .

""cd../ && ./install"" : Please try :

$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
 
Old 04-05-2014, 11:45 AM   #20
ss1990
LQ Newbie
 
Registered: Jan 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
when I execute it it didn't give any errors, but after when I tried to run some simulations, I got these errors.

for olsr simulation:
PHP Code:
num_nodes is set 5
can
't read "numifs": no such variable
    while executing
"subst $[subst $var]"
    (procedure "_o3" line 5)
    (SplitObject set line 5)
    invoked from within
"$ns set numifs"
    (procedure "_o14" line 6)
    (Node/MobileNode add-interface line 6)
    invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_  $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_  $inerrProc_ $outerrProc_ $FECProc_"
    (procedure "_o3" line 77)
    (Simulator create-wireless-node line 77)
    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.tcl" line 94) 
for Dir-antenna-test:
PHP Code:
num_nodes is set 6
INITIALIZE THE 
LIST xListHead

    
(_o18 cmd line 1)
    
invoked from within
"_o18 cmd dir-antenna _o36"
    
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 "_o18" line 2)
    (
SplitObject unknown line 2)
    
invoked from within
"[$node_(0) set netif_(0)] dir-antenna $a"
    
(file "Dir-antenna-test.tcl" line 281
can you please help me...
 
  


Reply

Tags
directional-antenna, ns2, tens



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
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 12:09 AM
how to install both ns2.28 and ns2.34 versions on ubuntu 10.04? popoaung Linux - Software 3 06-10-2013 04:52 PM
install NS2.31 saif_ict Programming 18 03-04-2012 09:33 AM
How can I install NS2 ? hoang_it Linux - Software 19 10-14-2009 06:02 AM
could not install ns2 salady86 Linux - Software 1 03-16-2008 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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