LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Install ns2.29 on Ubunto 11.04(NIST Mobility Patch) (http://www.linuxquestions.org/questions/programming-9/install-ns2-29-on-ubunto-11-04-nist-mobility-patch-898571/)

fahimeh_ak 08-21-2011 01:58 AM

Install ns2.29 on Ubunto 11.04(NIST Mobility Patch)
 
Hi

I want to install ns2.29-nist-mobility on ubunto11.04

according to your last guides I do so:
Code:

Add 'hardy' to /etc/apt/sources.list ( sudo gedit /etc/apt/sources.list )

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

And : sudo apt-get update && sudo apt-get install g++-3.4
I guess, you already have the other prerequisites ?
They are : sudo apt-get install g++ make autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev xgraph

cd ns-allinone-2.29/tk8.4.11/ &&
patch -p0 < tk-8.4-lastevent.patch && cd ../ &&
export CC=gcc-3.4 CXX=g++-3.4 && ./install

but the installationstops withthis error:

Code:

============================================================
* Build tcl8.4.11
============================================================
loading cache ./config.cache
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... gcc3.4
checking whether the C compiler (gcc3.4  ) 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.

Then I used from the guide below:
Code:

ns-2.29 installation problem #10:

1) Download and extract the original ns.
http://sourceforge.net/projects/nsna...ar.gz/download

2)download and extract the mobility package (ns-2.29-nist-mob-022707.tgz.) inside the ns-allinone directory

3)Follow the Instructions here:
http://www.linuxquestions.org/questi...4/#post4007465

4)Apply this patch:
http://all-time-ns-2.blogspot.com/20...m-in-ns-2.html

5)Apply the patch attached:

6)./install in the ns-allinone directory.

but still I have this error:
Code:

============================================================
* Build tcl8.4.11
============================================================
loading cache ./config.cache
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... gcc4.1
checking whether the C compiler (gcc4.1  ) 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.

what I must do now?

please help me!

knudfl 08-21-2011 03:43 AM

Quote:

checking whether the C compiler (gcc3.4 ) works... no
Only the native Ubuntu 11.04 compilers will work out of the box :
gcc-4.5, gcc-4.4.
Ubuntu 11.04 has a "hideaway location" for the libgcc_s.so.1,
that is required for gcc(-3.4) to work : /lib/i386-linux-gnu/libgcc_s.so.1

If you have a 32bits Ubuntu, either do a temporary workaround :
sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /usr/local/lib/

Or use a "special compat gcc34/g++34" that comes with its own libgcc_s.so.1 :
gcc34-compat-3.4.6_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US

g++34-compat-3.4.6_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US

→ export CC=gcc34 CXX=g++34 ( Different naming from the gcc-3.4/g++-3.4 ).

A 64bits Ubuntu 11.04 will not work with some or all ns2.

..

fahimeh_ak 08-22-2011 01:30 AM

how install gcc
 
hi
for solving my problem I go back to Ubunto 10.04 and used from your helps to install it.
but now, when I ./install it, I have this error
Code:

`.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' referenced in section `.rodata' of bluetooth/lmp.o: defined in discarded section `.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' of bluetooth/lmp.o
`.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' referenced in section `.rodata' of bluetooth/lmp-link.o: defined in discarded section `.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' of bluetooth/lmp-link.o
`.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' referenced in section `.rodata' of bluetooth/sco-agent.o: defined in discarded section `.gnu.linkonce.t._ZN6hdr_bt11packet_sizeENS_11packet_typeEi' of bluetooth/sco-agent.o
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


knudfl 08-22-2011 05:00 AM

Well, Ubuntu isn't the most reliable for any ns2.

Ubuntu 10.04 : First choice compiler g++-3.4 didn't work here either.
I tried these other three compilers for ns-2.29, editing the Makefile to
1) CPP = g++-3.3
2) CPP = g++34 ( That's the g++34-compat-3.4.6_i386.deb (for Ubuntu 11*)).
3) CPP = gcc-4.1
cd ns-allinone-2.29/ns-2.29/ && make clean && make :
Same error with g++-3.3, g++34. Different errors with g++-4.1.

OS : The safe choice is Cent OS 5.6 or 6.0.
( All ns was originally created on RH→ CentOS.)
Or if you prefer an rpm based OS, that use apt / Synaptic : PCLinuxOS.

..

maryemwood 06-03-2012 07:28 PM

Ns2-29
 
How did u get to install NS2-29
because i got error during installatio
thx

knudfl 06-04-2012 03:19 AM

Post #5, @maryemwood : Welcome to LQ.


Which Linux OS are you using ? ? Name and version, please.
Like Ubuntu 10.10, Fedora 17, etc.

maryemwood 06-04-2012 08:37 AM

OS
 
i use fedora 16,and i want to simulate a network mobile like UMTS.
who can i do it??
it's urgent

knudfl 06-04-2012 08:59 AM

# 7.
The UMTS, that I know is "EURANE" http://eurane.ti-wmc.nl/eurane/
http://www.linuxquestions.org/questi...ta-etc-869957/

Eurane is for ns-allinone-2.30. But then again :
You can have as may versions of ns-allinone-2.xx as you want,
installed at the same time. But do add any of them to a *PATH.

.

maryemwood 06-04-2012 02:07 PM

can u give me the step to follow to install ns-allinone-2.30. because i had many problems , i tested ns-allinone-2.35 its work so can i add the patch to this version, if is possible how can i add it
thx

knudfl 06-04-2012 03:59 PM

# 9.

Sorry, the patch will work in ns-2.30 only.

General for all Fedora : # yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel

The install :
cd ns-allinone-2.30/ns-2.30 && zcat ns-2.30_eurane-1.12.diff.gz | patch -p1
&& cd ../ && export CC=gcc34 CXX=g++34 && ./install

.

maryemwood 06-04-2012 04:20 PM

and i have to change in the file /etc/bashrc right? to add the path of NS

knudfl 06-04-2012 05:05 PM

# 11.
Quote:

I have to change in the file /etc/bashrc
Not required. Also impossible to set any *PATH,
if you have more than one version of ns-allinone-2.xx.
See post # 8, please.

This will do : cd ns-allinone-2.30/ns-2.30/ ; su ; make install
( 'make install' will copy the binary 'ns' to /usr/local/bin/ ).
( By more than one 'ns', just use a copy with a different name,
e.g. ns230, ns230-eurane, etc. etc.
( I'd usually have at least ten different 'ns2xx' ).
And : 'ns' is hard coded to know, where its libraries are located.
And : One 'nam' in /usr/local/bin/ can be used for all ns2 versions.

.

maryemwood 06-04-2012 05:28 PM

i got this :
Nam has been installed successfully.
Please compile your xgraph separately.
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.13: /home/maryem/ns-allinone-2.30/{bin,include,lib}
tk8.4.13: /home/maryem/ns-allinone-2.30/{bin,include,lib}
otcl: /home/maryem/ns-allinone-2.30/otcl-1.12
tclcl: /home/maryem/ns-allinone-2.30/tclcl-1.18
ns: /home/maryem/ns-allinone-2.30/ns-2.30/ns
nam: /home/maryem/ns-allinone-2.30/nam-1.12/nam
gt-itm: /home/maryem/ns-allinone-2.30/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------

Please put /home/maryem/ns-allinone-2.30/bin:/home/maryem/ns-allinone-2.30/tcl8.4.13/unix:/home/maryem/ns-allinone-2.30/tk8.4.13/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/maryem/ns-allinone-2.30/otcl-1.12, /home/maryem/ns-allinone-2.30/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /home/maryem/ns-allinone-2.30/tcl8.4.13/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.13
and tk8.4.13. They are now installed under /home/maryem/ns-allinone-2.30/{bin,include,lib}

After these steps, you can now run the ns validation suite with
cd ns-2.30; ./validate

For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
[/COLOR]
so i soulg change in the file bashrc to add this path???

knudfl 06-04-2012 05:52 PM

# 13.

Xgraph for Fedora, post #2 here ...
http://www.linuxquestions.org/questi...34-a-862233/#2


Quote:

Please put ....
(1) You MUST put ...
etc. etc.
Just ignore the text.
Quote:

So I should change in the file bashrc to add this path ?
No, please don't.

.

maryemwood 06-04-2012 05:58 PM

it works now i get
% when i write ns
now can u hepl me for example to simulate a umts network?


All times are GMT -5. The time now is 06:05 AM.