LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-24-2014, 04:59 AM   #31
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

← #30 .

Always make at least one backup of ns to ns-protocol-name.
* All simulations (except a few that are using a shell script)
.. will work with $ ns-name file.tcl
* Copy your backup to e.g. /home/<user>/binaries-ns/.
( I have ~130 different 'ns' executables in the backup folder,
.. and the same in /usr/local/bin/ ).
* Backups : Make a backup to cdrom or DVD.


No backup (that works) : $ cd ns-allinone/
And rerun ./install : $ export CC=gcc-4.4 CXX=g++-4.4 && ./install

Editing Makefile.vc : Not required. Is a Windows© file.
.. And I assume that you are still using Ubuntu 12.04 ?

-
 
Old 11-24-2014, 06:29 AM   #32
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← #28 .


$ sudo cp ns-backup /usr/local/bin/

-
Thank you knudfl; my program ran. but there is a warning "warning: no class variable Agent/MyPing:ff_myping_"--what does it mean?
 
Old 11-24-2014, 07:27 AM   #33
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
← #32 .
Quote:
"warning: no class variable Agent/MyPing : off_myping_"
Don't know.
But : Warnings are not errors, and can usually be ignored.
* Warnings are "informational text".



-

Last edited by knudfl; 11-24-2014 at 07:28 AM.
 
Old 11-24-2014, 10:41 AM   #34
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← #32 .

-
i am doing the same thing on my laptop. following are the things i have done. but here i am getting the error
Code:
partha@ubuntu:~/program/ns-allinone-2.34/ns-2.34$ cp ns ns-ping
partha@ubuntu:~/program/ns-allinone-2.34/ns-2.34$ sudo make install
[sudo] password for partha: 
for d in /usr/local/man/man1; do \
		if [ ! -d $d ]; then \
			mkdir -p $d ;\
		fi;\
	done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
partha@ubuntu:~/program/ns-allinone-2.34/ns-2.34$ sudo cp ns-ping /usr/local/bin
partha@ubuntu:~/program/ns-allinone-2.34/ns-2.34$ cd myping
partha@ubuntu:~/program/ns-allinone-2.34/ns-2.34/myping$ ns-ping myping.tcl
can't read "useasim_": no such variable
    while executing
"if { $useasim_ == 1 } {
set slink_($sid:$did) $self
}"
    (procedure "_o3" line 6)
    (Simulator simplex-link line 6)
    invoked from within
"_o3 simplex-link _o10 _o13 1Mb 10ms DropTail"
    ("eval" body line 1)
    invoked from within
"eval $self simplex-link $n1 $n2 $bw $delay $type $args"
    (procedure "_o3" line 8)
    (Simulator duplex-link line 8)
    invoked from within
"$ns duplex-link $n0 $n1 1Mb 10ms DropTail"
    (file "myping.tcl" line 23)
please suggest something
 
Old 03-17-2015, 04:53 AM   #35
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
friends, I am trying to install ns 2.27 on ubuntu 12.04 and getting error :

Last edited by banerjee; 03-19-2015 at 03:38 AM.
 
Old 03-17-2015, 06:17 AM   #36
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
problen in installation of ns 2.27 on ubuntu 12.04

============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... gcc41
checking whether the C compiler (gcc41 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** No targets specified and no makefile found. Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g -c -o ctangle.o ctangle.c
ctangle.w:75:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.c
common.w:1409:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
common.w: In function ‘fatal’:
common.w:1176:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o ctangle ctangle.o common.o
gcc -g -c -o cweave.o cweave.c
cweave.w:79:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
cweave.w: In function ‘print_cat’:
cweave.w:1739:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o cweave cweave.o common.o
ln: failed to create symbolic link `cweave': File exists
ln: failed to create symbolic link `ctangle': File exists
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
gcc41 -g -I/usr/local/sgb/include -DDATA_DIRECTORY=\"/usr/local/sgb/data/\" -c gb_io.c
make: gcc41: Command not found
make: *** [gb_io.o] Error 127
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.1.4 with gcc41.
Checking for unistd.h... No.
Checking for errno.h... No.
Checking for mmap support... No.
gcc41 -O -DNO_ERRNO_H -c -o example.o example.c
make: gcc41: Command not found
make: *** [example.o] Error 127
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.4.5
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... gcc41
checking whether the C compiler (gcc41 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
tcl8.3.2 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.
 
Old 03-18-2015, 02:59 PM   #37
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
<<< ref. #35 :
Quote:
I am trying to install ns 2.27 on ubuntu 12.04 and getting the following error :
checking whether the C compiler (gcc41 ) works... no
Well, then no reason to use two posts, and 150 lines for telling that.
Please edit posts #35 and #36 : Delete surplus text.
Editing : The 'Edit' button.

You will have to specify your Ubuntu OS ( By every question ) :
a) $ uname -m
b) version ( 12.04 ? )

-
 
1 members found this post helpful.
Old 03-19-2015, 03:40 AM   #38
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
<<< ref. #35 :

a) $ uname -m
b) version ( 12.04 ? )

-
i686
 
Old 03-19-2015, 06:30 AM   #39
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
<<< ref. #38, #36 : Code Tags for post #36, please.

Installing the compilers for Ubuntu 12.04 - i686 / ns-2.27 :
A) Download gcc41-compat-"1204" and g++41-compat :
. https://docs.google.com/open?id=0B7S...lNURldUenRyb3c
. https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4
B) Install the compilers :
sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
C)
cd /usr/bin/
sudo ln -s ../gcc41/bin/gcc41
sudo ln -s ../gcc41/bin/g++41


Building ns-2.27 :
Start from scratch in /home/name/<new-folder>/. (not ~/Desktop/, please)
tar xvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch ( outside ns-allinone-2.27/ ! )
https://drive.google.com/file/d/0B7S...ew?usp=sharing
cd ns-allinone-2.27/
export CC=gcc41 CXX=g++41 && ./install


-
 
Old 03-19-2015, 07:02 AM   #40
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
ref #39:

Thank you. I got it installed. thank you
 
Old 03-19-2015, 07:46 AM   #41
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
ref #39:

I need to incorporate the network coding file netcod_ns2.zip in ns 2.27. The implementation steps mentioned as follows:

STEP 1: Install NS2 2.27

STEP 2: Copy the file network-coding.tar.gz and INSTALL_NC in ./ns-allinone-2.27/ns-2.27

STEP 3: From ./ns-allinone-2.27/ns-2.27/ digit ./INSTALL_NC


BUT, when I am typing digit ./INSTALL_NC---it is not working....please help
 
Old 03-19-2015, 09:08 AM   #42
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
<<< ref. #41.

»» when I am typing digit ./INSTALL_NC---it is not working ««.
The command is : $ perl INSTALL_NC
... May have worked some years ago ? 2009 ?


The 2015 build method for Ubuntu 12.04-i686 / ns227 + NetworkCoding :
Start from scratch in /home/name/<another-new-folder>/.
tar xvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch
cd ns-allinone-2.27/
patch -p0 < NetworkCoding_ns227.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
export CC=gcc41 CXX=g++41 && ./install
cd ns-2.27/
sudo make install
cp ns ns-netw-cod ( This is your {NetworkCoding 'ns'} backup )
sudo cp ns-netw-cod /usr/local/bin/
... And simulations can be done with $ ns-netw-cod <file>.tcl


-
 
Old 03-20-2015, 02:50 AM   #43
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
ref. #42

Quote:
Originally Posted by knudfl View Post
export CC=gcc41 CXX=g++41 && ./install
cd ns-2.27/
sudo make install
cp ns ns-netw-cod ( This is your {NetworkCoding 'ns'} backup )
sudo cp ns-netw-cod /usr/local/bin/
... And simulations can be done with $ ns-netw-cod <file>.tcl
-
Thank you knudfl. now I have two questions:

1. Don't I need to validate the ns?

2. when I am using "ns-netw-cod randomnetNetF_802.tcl", I am getting the error: "could not open ./Trace/out.tr w"? why is it so?
 
Old 03-20-2015, 04:39 AM   #44
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
<<< ref. #43.

Add 1. About validate :
Not really required. Will just show the usual output.
And if anything unusual : Nothing you can do.
As long as the protocols you want to use are working fairly OK :
No reason to worry about some few protocols that you will never use.

Add 2. Missing directories / files : Please create those yourself.
I.e. create a folder "Trace", etc. etc. traffic files, movement files.


-
 
Old 03-23-2015, 02:08 PM   #45
banerjee
Member
 
Registered: Oct 2014
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
how to link matlab function with tcl programming?....
 
  


Reply

Tags
network-coding-ns2, 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
CentOS - Compile mutt error: configure: error: no curses library found SEI Linux - Newbie 2 01-28-2014 09:23 AM
configure error qt not found DeZern Linux - Software 2 05-15-2010 05:41 PM
Conmpile error wen compile php:configure: error: libpng.(a|so) not found tanveer Linux - Software 5 02-03-2009 06:13 AM
./configure fails with: libz... configure: error: not found. erpe Linux - Software 17 10-11-2006 05:56 PM
qt-mt not found error during configure Boomba Linux - Software 4 02-15-2005 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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