LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   installing ns-2.35 on ubuntu 12.10 (https://www.linuxquestions.org/questions/linux-software-2/installing-ns-2-35-on-ubuntu-12-10-a-4175436928/)

MounaRM 11-13-2012 07:03 AM

installing ns-2.35 on ubuntu 12.10
 
Hello my friends ,
am trying to install ns-2.35 on ubuntu 12.10 , but I keep having this problem :
Code:


Makefile:1601: attention : écrasement des commandes pour la cible « /home/mouna/Network »
Makefile:1514: attention : anciennes commandes ignorées pour la cible « /home/mouna/Network »
Makefile:1603: attention : écrasement des commandes pour la cible « /home/mouna/Network »
Makefile:1601: attention : anciennes commandes ignorées pour la cible « /home/mouna/Network »
Makefile:1605: attention : écrasement des commandes pour la cible « /home/mouna/Network »
Makefile:1603: attention : anciennes commandes ignorées pour la cible « /home/mouna/Network »
make: Dépendance circulaire /home/mouna/Network <- /home/mouna/Network abandonnée.
make: Dépendance circulaire Simulators/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure <- /home/mouna/Network abandonnée.
make: *** Pas de règle pour fabriquer la cible « Simulators/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure.ac », nécessaire pour « Simulators/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure ». Arrêt.
tcl8.5.10 make failed! Exiting ...

I hope you can help me .
Thanks in advance .

knudfl 11-13-2012 12:46 PM

Probably same procedure as for Ubuntu 12.04 :

sudo apt-get install g++-4.4


cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install

.

MounaRM 11-13-2012 12:53 PM

Quote:

Originally Posted by knudfl (Post 4828576)
Probably same procedure as for Ubuntu 12.04 :

sudo apt-get install g++-4.4


cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install

.

I already did that , but still having the same problem !!

knudfl 11-14-2012 06:38 AM

# 1
Quote:

make: *** Pas de règle pour fabriquer la cible «
Simulators/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure.ac
No "macosx" should be used, when you are using Ubuntu.
I copy / pasted the "make output text" to a file make.txt.
And : $ grep macosx make.txt : Nothing.
I have no issues on the 32bits (i686) Ubuntu 12.04, like post #2.

May be you have a corrupt ns-allinone-2.35 source ?
? Or that your setup / location is wrong ?
Please try again in /home/mouna/tmp/ns-allinone-2.35/ ,
with a new download of ns-allinone-2.35.tar.gz :
http://jaist.dl.sourceforge.net/proj...ne-2.35.tar.gz
Or http://garr.dl.sourceforge.net/proje...ne-2.35.tar.gz

.

knudfl 11-14-2012 10:07 AM

Ubuntu 12.10 .. .. ns-allinone-2.35
 
1) cd ns-allinone-2.35/
2) export CC=gcc-4.4 CXX=g++-4.4 && ./install : No errors Ubuntu 12.10, i686.


"A wrong location" can be a space in a folder name.
Then the "./install command" my be confused.

.

MounaRM 11-18-2012 04:36 AM

Ns-allinone package has been installed successfully.
 
Hi my friends ,
Finally, I installed ns-2.35 on ubuntu 12.10. here the steps for the installation:
[Step 1] install some essential softwares:
sudo apt-get install tcl8.5-dev tk8.5-dev
sudo apt-get install gcc-4.4 g++-4.4
sudo apt-get install build-essential autoconf automake
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev
[Step 2]
download ns-2.35 from http://sourceforge.net/projects/nsna...ar.gz/download
unpack ns2 to your home directory tar -zxvf ns-allinone-2.35.tar.gz -C /home/mouna
[Step 3] modify the OTcl makefile
open /home/mouna/ns-allinone-2.35/otcl-1.14/Makefile.in
change CC = @CC@ to CC=gcc-4.4
save the file
[Step 4]install ns2
cd /home/mouna/ns-allinone-2.35
./install
[Step 5]modify ~/.bashrc
Once the installation is successful (without any errors), we need to add the path information to the file ~/.bashrc
gedit ~/.bashrc
add these lines in the end of the file
Code:

#LD_LIBRARY_PATH
OTCL_LIB=/home/mouna/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/mouna/ns-allinone-2.35/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/mouna/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/mouna/ns-allinone-2.35/bin:/home/mouna/ns-allinone-2.35/tcl8.5.10/unix:/home/mouna/ns-allinone-2.35/tk8.5.10/unix
# Note: the above two lines starting from XGRAPH should come in the same line
NS=/home/mouna/ns-allinone-2.35/ns-2.35/
NAM=/home/mouna/ns-allinone-2.34/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM

save the modification
source ~/.bashrc
that's all , now type ns to see % and type nam to show the nam startup window , this shows the installation has been successful :D
:tisk: you should replace /home/mouna with the path to your home folder.

amani1 11-25-2012 05:17 AM

linkstat\ls.o
 
hello all

first special thanks for u muona i followed your steps ,but have the following error:

linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map<int, LsIdSeq, std::less<int>, std::allocator<std::pair<const int, LsIdSeq> > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!

i have Ubuntu 12.10 and install ns v 2.35 followed mouna steps
search a lot through net but nothing help any suggestions plz
thanks

MounaRM 11-26-2012 04:24 AM

Quote:

Originally Posted by amani1 (Post 4836464)
hello all

first special thanks for u muona i followed your steps ,but have the following error:

linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map<int, LsIdSeq, std::less<int>, std::allocator<std::pair<const int, LsIdSeq> > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!

i have Ubuntu 12.10 and install ns v 2.35 followed mouna steps
search a lot through net but nothing help any suggestions plz
thanks

have you tried this :
Code:

export CC=gcc-4.4 CXX=g++-4.4 && ./install
??

amani1 11-26-2012 11:20 PM

done
 
thanks for your response but actually i have finished :D the installation while searching i found that it is something related to library and change the code in the linkstate/ls.h according to
#include <vector>

template class A: public std::vector {
public:
void del() {
// The right syntax is:
// this->erase(std::vector::begin());
erase(std::vector::begin());
}

};
then the installation was successful but now i will begin the coding i want to make ideo streaming over ad hoc network & test the video quality while changing the protocol type hope every thing run smoothly :confused:

MounaRM 11-27-2012 05:12 AM

Quote:

Originally Posted by amani1 (Post 4837677)
now i will begin the coding i want to make ideo streaming over ad hoc network & test the video quality while changing the protocol type hope every thing run smoothly :confused:

good luck :)

Nwe Nwe 12-21-2012 03:20 AM

to run C++ in NS 2, is it suitable to install allinone or getting piece?
 
Quote:

Originally Posted by amani1 (Post 4837677)
thanks for your response but actually i have finished :D the installation while searching i found that it is something related to library and change the code in the linkstate/ls.h according to
#include <vector>

template class A: public std::vector {
public:
void del() {
// The right syntax is:
// this->erase(std::vector::begin());
erase(std::vector::begin());
}

};
then the installation was successful but now i will begin the coding i want to make ideo streaming over ad hoc network & test the video quality while changing the protocol type hope every thing run smoothly :confused:

Hello,
I'm trying to install NS 2 on Ubuntu 12.10 alongside with Window 7. But now I'm confused which one is suitable to write code, I am a research student on ad hoc network. So, which one is better in allinone or getting piece instllation? I hope you can give some suggestion. All of things are new for me, my first experience.So, Hope any suggestion.

knudfl 12-21-2012 03:53 AM

Post #11, @Nwe Nwe : Welcome to LQ.

You can choose any version, ns-allinone 2.26 .. 2.35 .
And 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.

Version 2.35 can be compiled with g++-4.4. See post #2 and #5.

All other versions can use gcc41-compat, g++41-compat :
gcc41-compat-4.1.2.ubu1204_i386.deb
https://docs.google.com/open?id=0B7S...lNURldUenRyb3c
g++41-compat-4.1.2_i386.deb
https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4

.

Nwe Nwe 12-21-2012 09:04 PM

Thx to knudfl
 
Thx for your suggestion. I will try it and if i have a problem, hope you for further suggestion.

Nwe Nwe 12-21-2012 11:37 PM

Hello Mouna,
 
Quote:

Originally Posted by MounaRM (Post 4831877)
Hi my friends ,
Finally, I installed ns-2.35 on ubuntu 12.10. here the steps for the installation:
[Step 1] install some essential softwares:
sudo apt-get install tcl8.5-dev tk8.5-dev
sudo apt-get install gcc-4.4 g++-4.4
sudo apt-get install build-essential autoconf automake
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev
[Step 2]
download ns-2.35 from http://sourceforge.net/projects/nsna...ar.gz/download
unpack ns2 to your home directory tar -zxvf ns-allinone-2.35.tar.gz -C /home/mouna
[Step 3] modify the OTcl makefile
open /home/mouna/ns-allinone-2.35/otcl-1.14/Makefile.in
change CC = @CC@ to CC=gcc-4.4
save the file
[Step 4]install ns2
cd /home/mouna/ns-allinone-2.35
./install
[Step 5]modify ~/.bashrc
Once the installation is successful (without any errors), we need to add the path information to the file ~/.bashrc
gedit ~/.bashrc
add these lines in the end of the file
Code:

#LD_LIBRARY_PATH
OTCL_LIB=/home/mouna/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/mouna/ns-allinone-2.35/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/mouna/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/mouna/ns-allinone-2.35/bin:/home/mouna/ns-allinone-2.35/tcl8.5.10/unix:/home/mouna/ns-allinone-2.35/tk8.5.10/unix
# Note: the above two lines starting from XGRAPH should come in the same line
NS=/home/mouna/ns-allinone-2.35/ns-2.35/
NAM=/home/mouna/ns-allinone-2.34/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM

save the modification
source ~/.bashrc
that's all , now type ns to see % and type nam to show the nam startup window , this shows the installation has been successful :D
:tisk: you should replace /home/mouna with the path to your home folder.

Thx for your post, It's very helpful. I finish installation successfully, But, wehn I type ns, this message appears "The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2" And also It does not work when I type nam in terminal. So, what steps do I need do more. Please let me know, Hope any help from anyone.

Nwe Nwe 12-22-2012 02:22 AM

Now, it works well.Thx to all.


All times are GMT -5. The time now is 05:50 PM.