LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-25-2012, 11:07 AM   #16
lucky89
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Rep: Reputation: Disabled

hi
thanks
i used the olsr_exemple.tcl from http://masimum.inf.um.es/fjrm/wp-upl...sr_example.tcl
it is an exemple simulation of OLSR
 
Old 09-17-2012, 02:37 PM   #17
nirvruti
LQ Newbie
 
Registered: Sep 2012
Posts: 14

Rep: Reputation: Disabled
ns2.33 on ubanto 12.04

Error
ggetting otcl failed error Existing when trying to install ns2.33 on uantu 12.04
 
Old 09-17-2012, 03:30 PM   #18
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 # 17, @nirvruti.

Suggest : Use gcc / g++ version 4.1.2 :

gcc41-compat "1204" https://docs.google.com/open?id=0B7S...lNURldUenRyb3c
g++41-compat https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4

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 09-17-2012, 09:35 PM   #19
John VV
Guru
 
Registered: Aug 2005
Posts: 12,799

Rep: Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704
knudfl
you look like a bit of an expert on NS2 ( and the various versions )

do you have an idea WHY so many are using 2.29 and older versions other than 2.34
(and not patching it to work with gcc41)
and why ns2 and on NEW os's ( the new os part is easy )

a "guess" is some 10 year old textbooks
and unqualified ( in Linux)teachers
 
Old 09-18-2012, 01:52 PM   #20
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
# 19

Hi John.

Most of the available extra patches / protocols are written for ns2
versions 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 ( 2.34 ).
The source code files are c++ files.

Thus the easy way is to use the ns2 version that the patch was meant for.
In very rare occasions, an LQ member will modify the code to a later ns2.

About the protocols that teachers will suggest : Don't know.
But may be the teachers will assign an ns2 protocol,
that they used 10 years ago, when they were students.

.
 
Old 06-02-2014, 01:53 AM   #21
hd_uni_pro
Member
 
Registered: Mar 2014
Posts: 31

Rep: Reputation: Disabled
confiused-install-ubontu

Installation of ns-2.34 in Ubuntu (preferably 12.04)

1.Download ns-allinone-2.34.tar.gz file from
http://sourceforge.net/projects/nsnam/files/

2.Copy the ns-allinone-2.34.tar.gz file in to the desktop directory.
Note: All the commands listed from here assumes the ns2 to be in desktop; you can put the extracted file anywhere and change the address in the commands correspondingly.

3.open terminal type:
sudo apt-get update (to get list of update packages/libraries in OS)

3.Install required libraries for ns2 using terminal:
sudo apt-get install build-essential autoconf automake libxmu-dev
sudo apt-get install xorg-dev g++ xgraph

4.Extract the ns-allinone-2.34.tar.gz file by typing following commands in terminal:
cd Desktop <Enter>
tar zxvf ns-allinone-2.34.tar.gz <Enter>
(A new folder named ns-allinone-2.34 will be generated.)

5.To avoid installation errors modify the specified files in ns-allinone-2.34 folder as specified below:

i.In ns-allinone-2.34/otcl-1.13/configure
change into
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"

ii.ns-allinone-2.34/ns-2.34/tools/ranvar.cc line:219 change
return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

iii.Change the lines 183 % and 185 in file ns-allinone-2.34/ns-2.34/mobile/nakagami.cc to
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
respectively.

iv.Next add a bellow line after line 64 in ns-allinone-2.34/ns-2.34/mac/mac-802_11Ext.h
#include <stddef.h>

6. Installation. in terminal goto Desktop/ns-allinone-2.34 and type:
./install
This takes about 5min and note down the instructions you get for setting path.

7. Setting Path;According to instructions you get on the terminal after installation change the following path

i.In terminal sudo gedit ~/.bash_aliases

ii.Then copy the following path into .bash_aliases and modify according to your instructions:

# LD_LIBRARY_PATH
OTCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/anurag/Desktop/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/anurag/Desktop/ns-allinone-2.34/bin:/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/unix:/home/anurag/Desktop/ns-allinone-2.34/tk8.4.18/unix
NS=/home/anurag/Desktop/ns-allinone-2.34/ns-2.34/
NAM=/home/anurag/Desktop/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

iii.Then it takes effect immediately you should give below mentioned using terminal.
source ~/.bashrc

8. Now move to Desktop/ns-allinone-2.34/ns-2.34 and type:
./validate
Validations tests are performed for about 10-15 min.

9.If you type ns in your terminal % should be displayed.

-----------------------------------------This Completes the installation----------------------------------------

Last edited by hd_uni_pro; 06-02-2014 at 05:25 AM.
 
Old 06-02-2014, 05:35 AM   #22
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
# 21 .

Copy the two packages into an empty <new-folder> , and type ..
$ sudo dpkg -i *
... Then you can avoid your typos.

Or just click the packages, and the "Package Installer" will do the job.


Generally about typos when typing a command :
Use the completion in your dash/bash terminal →
Type in the two first letters, and <TAB> : The possible choices will be shown.
Examples : 1) $ sudo dpkg - i gc<TAB> 2) $ sudo dpkg - i g+<TAB>

Or use copy / paste , when its a long command.
Also :
Why not use copy / paste for your short error outputs instead of image.png ?
Show your error messages in 'Code Tags' : Much nicer.

-
 
Old 07-14-2014, 11:52 AM   #23
must
LQ Newbie
 
Registered: Jan 2014
Posts: 16

Rep: Reputation: Disabled
invalid command name "Phy/WirelessPhy/OFDM"

hi everyone, I work with Wimax but when i execute TCL i got this error:

invalid command name "Phy/WirelessPhy/OFDM"
while executing
"Phy/WirelessPhy/OFDM create _o18 "
 
  


Reply

Tags
g++41-compat, g++41-compat-1204, 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
ns2.34 installation help in Ubuntu 10.10 xptional Ubuntu 37 02-05-2014 05:01 AM
how to install ns2 in ubuntu 11.10 miu Linux - Networking 20 10-31-2013 02:50 PM
ns2.29 installation in ubuntu bolmeteus Ubuntu 4 02-08-2011 01:46 PM
NS2 2.34 Ubuntu abc Linux - Networking 14 09-16-2010 05:58 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 01:47 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