-   Linux - Newbie (
-   -   seeking advice to install 802.11e patch in ns2 (

stud17 03-08-2011 03:04 PM

seeking advice to install 802.11e patch in ns2

This is Chithra. My research is based on 802.11e protocol. I use ns2.34 on ubuntu 10.04 (gcc-4.3) version. I am looking for 802.11e patch. I couldn't find any patch file for ns2.34.

so i tried installing the patch from he following links.
that also went in vain. either tcl or tclcl make getting failed. is this problem due to gcc version or ubuntu? What should i do now? I have been searching for solution since long time. Kindly help me friends. your help is highly appreciated.. Thanks in advance.

knudfl 03-09-2011 09:30 AM

Welcome to LQ.

Your first link is about ns-2.28 : No problems having more than one
version of ns-allinone-2.xx present in /home/<user-name>/<ns2-dir>/
More info, LQ Search → Keyword = ns-allinone
> > Posts #10 #11.

The second link is a patch for ns-allinone-2.1b9a, also used for some
other patches. The version ns-allinone-2.1b9a-gcc32.tar.gz will work.
The possible issues are with the very old patch.


stud17 03-10-2011 03:37 PM

Hello, Thanks for you quick reply..

I tried to execute the command from the root as mentioned. i have got the following message..

root@ubuntu:~/ns-allinone-2.28# yum install compat-gcc-34-c++ libX11-devel libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel gcc-c++ make automake autoconf libtool
Setting up Install Process
No package compat-gcc-34-c++ available.
No package libX11-devel available.
No package libXext-devel available.
No package libXau-devel available.
No package libXmu-devel available.
No package xorg-x11-proto-devel available.
No package gcc-c++ available.
No package make available.
No package automake available.
No package autoconf available.
No package libtool available.
Nothing to do

>>Kindly help me how to resolve this issue. Am i missing something?
Do let me know.. Thanks in Advance..

knudfl 03-11-2011 05:01 AM

# 15

Am i missing something ?
Yes, definitely. You are using Ubuntu ? Or ? The install command is not yum.
And the Fedora package names cannot be used.

If you had followed the link
... then you will see, it points to
sudo apt-get install g++ automake autoconf libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev

Adding 'hardy' to /etc/apt/sources.list, post #5 here
Then you can do : sudo apt-get install g++-3.4 : required for ns-2.28.

The install command : 'export CC=gcc-3.4 CXX=g++-3.4 && ./install'
... should work on Ubuntu.


Please do not build ns-allinone-2.28 as root. Unless you want trouble.
The build location is /home/<name>/<ns2-folder>/ns-allinone-2.28/
... So all commands can be done as 'unpriviliged user'.


stud17 03-14-2011 10:35 PM


Thank you very much for your clarification. I have made the required changes as u mentioned, except the following:

Add 'hardy' to /etc/apt/sources.list
deb hardy-updates main
deb hardy universe
deb hardy-security main
deb hardy-security universe

I don't know in which place i have to add this.. because i couldn't find the path "/etc/apt/sources.list" anywhere..
Kindly guide me..

knudfl 03-15-2011 05:49 AM

Adding 'hardy' to /etc/apt/sources.list : sources.list is a text file.

In a terminal window do : sudo gedit /etc/apt/sou<TAB> <ENTER>
.. and bash completion will bring you to sources.list and display it in gedit.

Then you can copy / paste the four lines to be added ..

stud17 03-17-2011 07:19 PM

Thanks for your patience for clarifying my doubts.
After performing the above mentioned steps, it throws the following error when i try to install:

checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see
to see if they have a fix for your platform.

KIndly let me know how can i resolve this issue.
Thank you..

knudfl 03-17-2011 07:44 PM

OK, then to the build instructions for ns-allinone-2.28 on Ubuntu :
> > post # 10

And like Fedora, you may get a slightly better result with 'ns228-gcc40.patch'.
That's post # 11. But I don't remember.


stud17 10-16-2011 01:05 AM

facing problem in installing gcc++-3.3 on ns2.27 (Ubuntu 9.10)

I have been trying to use ns2.27 (on ubuntu 9.10) to work on hcca patch for my research. I am following post#4 for the installation. and am encountering problem when i try to install the gcc++-3.3 package.

Firstly, i tried : sudo apt-get install g++-3.3
i got the following msg,
chithra@ubuntu:~/ns-allinone-2.27$ sudo apt-get install g++-3.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package g++-3.3

Secondly, i executed the following command in the terminal
sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \

i got the following error,
chithra@ubuntu:~/ns-allinone-2.27$ sudo dpkg -i \ cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \ gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \ libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.debdpkg: error processing cpp-3.3_3.3.6-15ubuntu4_i386.deb (--install):
cannot access archive: No such file or directory
(Reading database ... 119314 files and directories currently installed.)
Preparing to replace g++-3.3 1:3.3.6-15ubuntu4 (using g++-3.3_3.3.6-15ubuntu4_i386.deb) ...
Unpacking replacement g++-3.3 ...
dpkg: error processing gcc-3.3_3.3.6-15ubuntu4_i386.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing gcc-3.3-base_3.3.6-15ubuntu4_i386.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb (--install):
cannot access archive: No such file or directory
dpkg: dependency problems prevent configuration of g++-3.3:
g++-3.3 depends on gcc-3.3 (= 1:3.3.6-15ubuntu4); however:
Package gcc-3.3 is not installed.
g++-3.3 depends on gcc-3.3-base (= 1:3.3.6-15ubuntu4); however:
Package gcc-3.3-base is not installed.
g++-3.3 depends on libstdc++5-3.3-dev (= 1:3.3.6-15ubuntu4); however:
Package libstdc++5-3.3-dev is not installed.
dpkg: error processing g++-3.3 (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:

Either way I couldn't install the g++-3.3 package. Can you please tell me where am going wrong?? Kindly assist me to rectify this. Looking forward for your inputs.


knudfl 10-16-2011 04:37 AM

Ubuntu 9.10 Karmic has been unsupported for some time.
Some repositories can still be used.
But to be sure, you can change the URL in /etc/apt/sources.list
to the "old archive" ( All 'karmic' lines ) :

About gcc-3.3, g++-3.3 : Probably remove what's installed,
and then use packages from hardy-updates only: All 5 packages.
( )


stud17 10-16-2011 05:49 PM


Thank you so much for your timely reply!
Now I have completed till this step,
ln -s ../tcl8.4.18/generic/tclInt.h
ln -s ../tcl8.4.18/generic/tclIntDecls.h
(followed post#3 in this

And I have downloaded the following patches "tk-8.4-lastevent.patch" & "" in ns-allinone-2.27 folder for now.You have mentioned "Apply the tk-8.4-lastevent.patch in tk8.4.14." in that post, but i couldn't locate tk8.4.14 anywhere in the ns-allinone-2.27 folder.

And also I just wanna make sure whether following are the only steps left out before i run ./install??
for tk => cp tk-8.4-lastevent.patch ns-allinone-2.27/tk8.4.18/
cd ns-allinone-2.27/tk8.4.18/
patch -p0 < tk-8.4-lastevent.patch

for otcl =>patch -p1 <

If am missing something, please assist me.. LOoking forward for your reply!
Once again thanks for your time and consideration :)

Thank you!

knudfl 10-16-2011 06:32 PM


but I couldn't locate tk8.4.14 anywhere in the ns-allinone-2.27 folder.
May be you forgot a link to tcl8.4.14 like described in

And by the way, Ubuntu 9.10 is not required.
Ubuntu 10.04 (10.10) will also make a perfect result.


stud17 10-17-2011 02:36 AM

Thanks for your support!

So do you mean that, I can install ns2.27 on ubuntu 10.04 / 10.10 would go well? And if yes, should i follow the same instructions in this link ?

also, can i do the hcca patch on ubuntu 10.04 version? will there be any compatibility issues?
Kindly let me know your suggestions!

Thanks :)

knudfl 10-17-2011 05:17 AM


follow the same instructions in this link
AFAIK there is no difference, if using 10.04 or 10.10
( 10.10 : Requires manual install of the g++-3.3 / gcc-3.3 packages. From hardy-updates.)
Remark : Should be a 32bitsOS for best result.
Ns2 is not made to work fully on a 64bits OS.

( Ubuntu 11.04 : Difficult to use. 11.10 : Not usable.)


stud17 10-18-2011 11:38 PM


As you mentioned in the previous post, I tried installing ns2.27 on ubuntu10.04 version. I followed the same instructions ( In that link, I presume that I have installed g++-3.3 and the other steps correctly.

Am trying to apply the below patches. Following are the response at the terminal:

>Apply the tk-8.4-lastevent.patch in tk8.4.14.
>Apply the in otcl-1.13. (it says HUNK failed at this point)

chithra@ubuntu:~/ns-allinone-2.27/tk8.4.18$ patch -p0 < tk-8.4-lastevent.patch.txt
The program 'patch' is currently not installed. You can install it by typing:
sudo apt-get install patch
chithra@ubuntu:~/ns-allinone-2.27/tk8.4.18$ sudo apt-get install patch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.32-33-generic linux-headers-2.6.32-33
Use 'apt-get autoremove' to remove them.
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 123kB of archives.
After this operation, 254kB of additional disk space will be used.
Get:1 lucid/main patch 2.6-2ubuntu1 [123kB]
Fetched 123kB in 1s (70.7kB/s)
Selecting previously deselected package patch.
(Reading database ... 149021 files and directories currently installed.)
Unpacking patch (from .../patch_2.6-2ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Setting up patch (2.6-2ubuntu1) ...
chithra@ubuntu:~/ns-allinone-2.27/tk8.4.18$ cd ..

chithra@ubuntu:~/ns-allinone-2.27$ patch -p1 <
bash: No such file or directory
chithra@ubuntu:~/ns-allinone-2.27$ cd ..
chithra@ubuntu:~$ patch -p1 <
patching file
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file

I couldn't make it out from the response i get. Can you please tell me how to resolve this issue?
Thanks for your constant support and patience.


All times are GMT -5. The time now is 02:57 PM.