LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-19-2011, 05:09 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503

The patches are not that important. Any behavior of '1 hunk FAILED' is OK.
Patching is mostly concerning the separate application 'nam'.
Any nam from any ns-allinone-2.xx can be used.

'nam' should be installed to /usr/local/bin/.
You can use a binary nam : nam-1.14.i586.tar.gz
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US
Unpack, and : sudo cp nam /usr/local/bin/

..
 
Old 10-19-2011, 05:43 PM   #17
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Thanks a lot for your reply!

In a previous you have mentioned that,
// ( 10.10 : Requires manual install of the g++-3.3 / gcc-3.3 packages. From hardy-updates.)
Does it mean that I don't have to do install g++-3.3 / gcc-3.3 manually on 10.04 version?
To my knowledge, 10.04 version uses the newer version of gcc right?

Kindly clarify my doubt.

Thank you so much for your consistent support!
 
Old 10-19-2011, 06:27 PM   #18
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

Adding to my previous post..
when i try to install g++-3.3 package, i get the following
chithra@ubuntu:~/ns-allinone-2.27$ sudo apt-get install g++-3.3Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-3.3 is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
g++-3.3: Depends: gcc-3.3 (= 1:3.3.6-15ubuntu4) but it is not installable
Depends: gcc-3.3-base (= 1:3.3.6-15ubuntu4) but it is not installable
Depends: libstdc++5-3.3-dev (= 1:3.3.6-15ubuntu4) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


it says 'unmet dependencis'. may i know what does it mean? is g++-3.3 installed already?
Kindly let me know how can I resolve it..

Thank you!
 
Old 10-20-2011, 02:38 AM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 18. .... .... See post # 10.
http://packages.ubuntu.com/hardy-updates/g++-3.3

Manual install means :

sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu6_i386.deb gcc-3.3-base_3.3.6-15ubuntu6_i386.deb \
gcc-3.3_3.3.6-15ubuntu6_i386.deb g++-3.3_3.3.6-15ubuntu6_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu6_i386.deb libstdc++5_3.3.6-15ubuntu6_i386.deb


http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
http://se.archive.ubuntu.com/ubuntu/...untu6_i386.deb
..
 
Old 10-20-2011, 06:27 PM   #20
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hello,

With your guidance, I have installed ns2.27 on ubuntu10.04 successfully.

HOwever, I get the following message.
>Please compile your xgraph separately.
>Please compile your gt-itm & sgb2ns separately.

[1]How can i compile the xgraph, gt-itm & sgb2ns spearately?
[2]And my main aim is to patch the hcca on ns2.27
I follow this link for hcca patch: http://cng1.iet.unipi.it/wiki/index.php/Ns2hcca
But patching is not successful yet. I encountered the following message,

chithra@ubuntu:~/ns-allinone-2.27$ gzip -dc ns2hcca-2.27-060823.patch.gz | patch -Np1
patching file mac/Doxyfile
patching file mac/hccasched/mac-hccasched.cc
patching file mac/hccasched/mac-hccasched.h
patching file mac/hccasched/mac-hccasched_map.cc
patching file mac/hccasched/mac-hccasched_map.h
patching file mac/hccasched/mac-hccasched_map_ref.cc
patching file mac/hccasched/mac-hccasched_map_ref.h
patching file mac/hccasched/mac-hccasched_oneflow.cc
patching file mac/hccasched/mac-hccasched_oneflow.h
patching file mac/hccasched/mac-hccasched_par.cc
patching file mac/hccasched/mac-hccasched_par.h
patching file mac/hccasched/mac-hccasched_periodic.cc
patching file mac/hccasched/mac-hccasched_periodic.h
patching file mac/ll.cc
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 44.
Hunk #3 FAILED at 67.
Hunk #4 FAILED at 224.
Hunk #5 FAILED at 241.
5 out of 5 hunks FAILED -- saving rejects to file mac/ll.cc.rej
patching file mac/ll.h
Hunk #1 FAILED at 36.
Hunk #2 FAILED at 46.
Hunk #3 FAILED at 113.
3 out of 3 hunks FAILED -- saving rejects to file mac/ll.h.rej
patching file mac/mac-802_11.cc
Hunk #1 FAILED at 36.
Hunk #2 FAILED at 160.
Hunk #3 FAILED at 283.
Hunk #4 FAILED at 378.
Hunk #5 FAILED at 453.
Hunk #6 FAILED at 715.
Hunk #7 FAILED at 772.
Hunk #8 FAILED at 810.
Hunk #9 FAILED at 885.
Hunk #10 FAILED at 1066.
Hunk #11 FAILED at 1164.
Hunk #12 FAILED at 1436.
Hunk #13 FAILED at 1506.
Hunk #14 FAILED at 1612.
Hunk #15 FAILED at 1700.
Hunk #16 FAILED at 1728.
Hunk #17 FAILED at 2169.
Hunk #18 FAILED at 2188.
Hunk #19 FAILED at 2216.
Hunk #20 FAILED at 2228.
20 out of 20 hunks FAILED -- saving rejects to file mac/mac-802_11.cc.rej
patching file mac/mac-802_11.h
Hunk #1 FAILED at 37.
Hunk #2 FAILED at 46.
Hunk #3 FAILED at 63.
Hunk #4 FAILED at 88.
Hunk #5 FAILED at 152.
Hunk #6 FAILED at 212.
Hunk #7 FAILED at 232.
Hunk #8 FAILED at 244.
Hunk #9 FAILED at 261.
Hunk #10 FAILED at 341.
Hunk #11 FAILED at 351.
Hunk #12 FAILED at 363.
Hunk #13 FAILED at 399.
Hunk #14 FAILED at 450.
Hunk #15 FAILED at 512.
Hunk #16 FAILED at 568.
Hunk #17 FAILED at 578.
17 out of 17 hunks FAILED -- saving rejects to file mac/mac-802_11.h.rej
patching file mac/mac-802_11e.cc
patching file mac/mac-802_11e.h
patching file mac/mac-classifier.cc
patching file mac/mac-classifier.h
patching file mac/mac-timers.cc
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 46.
Hunk #3 FAILED at 68.
Hunk #4 FAILED at 85.
Hunk #5 FAILED at 123.
Hunk #6 FAILED at 219.
Hunk #7 FAILED at 249.
Hunk #8 FAILED at 299.
Hunk #9 FAILED at 324.
9 out of 9 hunks FAILED -- saving rejects to file mac/mac-timers.cc.rej
patching file mac/mac-timers.h
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 40.
Hunk #3 FAILED at 138.
3 out of 3 hunks FAILED -- saving rejects to file mac/mac-timers.h.rej
patching file common/packet.h
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 54.
Hunk #3 FAILED at 472.
Hunk #4 FAILED at 538.
4 out of 4 hunks FAILED -- saving rejects to file common/packet.h.rej
patching file common/simulator.cc
Hunk #1 FAILED at 21.
Hunk #2 FAILED at 33.
Hunk #3 FAILED at 65.
3 out of 3 hunks FAILED -- saving rejects to file common/simulator.cc.rej
patching file common/simulator.h
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 47.
Hunk #3 FAILED at 55.
3 out of 3 hunks FAILED -- saving rejects to file common/simulator.h.rej
patching file common/stat.cc
patching file common/stat.h
patching file common/statconf.h
patching file noah/noah.cc
patching file noah/noah.h
patching file tcl/ex/hcca/analyze.pl
patching file tcl/ex/hcca/example.tcl
patching file tcl/ex/hcca/header
patching file tcl/lib/ns-agent.tcl
Hunk #1 FAILED at 192.
1 out of 1 hunk FAILED -- saving rejects to file tcl/lib/ns-agent.tcl.rej
patching file tcl/lib/ns-lib.tcl
Hunk #1 FAILED at 193.
Hunk #2 FAILED at 604.
Hunk #3 FAILED at 766.
Hunk #4 FAILED at 2194.
4 out of 4 hunks FAILED -- saving rejects to file tcl/lib/ns-lib.tcl.rej
patching file tcl/lib/ns-mobilenode.tcl
Hunk #1 FAILED at 451.
Hunk #2 FAILED at 468.
Hunk #3 FAILED at 622.
3 out of 3 hunks FAILED -- saving rejects to file tcl/lib/ns-mobilenode.tcl.rej
patching file tcl/mobility/noah.tcl
patching file tools/e2em.h
patching file tools/e2em.cc
patching file tools/e2et.h
patching file tools/e2et.cc
patching file tools/timestamper.cc
patching file tools/rng.cc
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 68.
Hunk #3 FAILED at 258.
Hunk #4 FAILED at 278.
Hunk #5 FAILED at 461.
Hunk #6 FAILED at 801.
6 out of 6 hunks FAILED -- saving rejects to file tools/rng.cc.rej
patching file Makefile.in
Hunk #1 FAILED at 57.
Hunk #2 FAILED at 69.
Hunk #3 FAILED at 147.
Hunk #4 FAILED at 293.
Hunk #5 FAILED at 348.
5 out of 5 hunks FAILED -- saving rejects to file Makefile.in.rej
patching file tcl/lib/ns-default.tcl
Hunk #1 FAILED at 438.
Hunk #2 FAILED at 467.
Hunk #3 FAILED at 606.
Hunk #4 FAILED at 1270.
4 out of 4 hunks FAILED -- saving rejects to file tcl/lib/ns-default.tcl.rej

Can you please kindly help me out how to resolve this issue??
KIndly let me know your suggestion.

Thanks for your consistent support!
 
Old 10-21-2011, 04:33 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Xgraph : sudo apt-get install xgraph

'gt-itm' and 'sgb2ns' : Never seen anybody use those.


HCCA : Probably use ns-allinone-2.29.3.tar.gz :
cd ns-allinone-2.29/ns-2.29/ &&
wget http://cng1.iet.unipi.it/archive/ns2...60823.patch.gz
&& zcat ns2hcca-2.29-060823.patch.gz | patch -p1
→ → No errors.

( You can have as many versions of ns-allinone-2.xx as you want
installed at the same time. Preferably in /home/<name>/ns2*,
not /usr/local/ ! )

.

Last edited by knudfl; 10-21-2011 at 04:36 AM.
 
Old 10-22-2011, 03:29 PM   #22
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

I am trying to install ns2.29 as per your advice. I use,
CC = gcc-3.3
CXX = g++-3.3
in the makefile.

when i run "./install" at the terminal i get the following error(excerpt),

/ns-allinone-2.29/otcl-1.11 -I/home/chithra/ns-allinone-2.29/include -I/home/chithra/ns-allinone-2.29/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o common/ptypes2tcl.o common/ptypes2tcl.cc
gcc-3.3 -E -o common/ptypes2tcl common/ptypes2tcl.o
gcc-3.3: common/ptypes2tcl.o: linker input file unused because linking not done
./common/ptypes2tcl > gen/ptypes.cc
/bin/sh: ./common/ptypes2tcl: not found
make: *** [gen/ptypes.cc] Error 127
Ns make failed!

is it due to the problem with gcc compiler version?? KIndly tell me how can i resolve it??

Thanks.
 
Old 10-23-2011, 02:44 PM   #23
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Smile

Hello,

With your constant support, I able to install ns2.29 (especially for hcca patch) on ubuntu 10.04 successfully.
I encountered numerous errors while installing. But i able to debug it with the help of following link:
http://sertel.upc.es/~maguilar/fiche...eNS2_David.txt

after the debugging, installation was smooth. NOw am trying to understand the hcca architecture & its code.
I hope this would help someone who is working on the same.

Thanks!
 
Old 10-25-2011, 10:00 PM   #24
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

After installing hcca patch, i was trying to run the simple.tcl (to verify if everything works fine) from ns-allinone-2.29/ns-2.29/tcl/ex/simple.tcl

chithra@ubuntu:~/ns-allinone-2.29/ns-2.29/tcl/ex$ ns simple.tcl
210
0.0037499999999999999
running nam...
chithra@ubuntu:~/ns-allinone-2.29/ns-2.29/tcl/ex$ nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[string equal [tk windowingsystem] "classic"]
|| [string equal [tk windowingsystem] "aqua"]} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {..."

I am getting the above error. Does it mean nam is not installed properly?? Kindly please let me know how can I rectify this issue..

THanks for your time!

Last edited by stud17; 10-25-2011 at 10:01 PM. Reason: missed the word
 
Old 10-26-2011, 05:04 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 24.

Use a binary nam. See post # 16.

( And delete the corrupt nam that causes the errors.)
 
Old 10-26-2011, 11:57 AM   #26
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hi thanks for your reply!

May I know what gcc version should I use ?
 
Old 10-26-2011, 06:57 PM   #27
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
hi,

now i can compile the nam and patched the hcca patch also. but when i run the example.tcl file, i get the following message,

chithra@ubuntu:~/ns-allinone-2.29/ns-2.29/tcl/ex/hcca$ ns example.tcl
Wed Oct 26 16:53:53 PDT 2011 trace descr: file3

(_o4 cmd line 1)
invoked from within
"_o4 cmd run-identifier 1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o4" line 2)
(SplitObject unknown line 2)
invoked from within
"$ns run-identifier $opt(run)"
(procedure "open_traces" line 13)
invoked from within
"open_traces"
(procedure "init" line 7)
invoked from within
"init"
(file "example.tcl" line 87)

i couldn't make it out what the error is.. How can I resolve this issue?
kindly let me know..

thanks
 
Old 10-26-2011, 07:27 PM   #28
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
./ns example.tcl : The "ns" from "ns-2.29 HCCA" must be used.
The result you get, looks like ns version 2.34 is used.

I get this
Code:
Thu Oct 27 02:24:33 CDT 2011 trace descr: file3
Thu Oct 27 02:24:33 CDT 2011 topography created
num_nodes is set 3
Thu Oct 27 02:24:33 CDT 2011 god created
Thu Oct 27 02:24:33 CDT 2011 wireless channel created
INITIALIZE THE LIST xListHead
Thu Oct 27 02:24:33 CDT 2011 QAP node 0 created
Thu Oct 27 02:24:33 CDT 2011 non-QAP QSTA node 1 created
Thu Oct 27 02:24:33 CDT 2011 non-QAP QSTA node 2 created
ref_vbr_MaxMSDU off
Thu Oct 27 02:24:33 CDT 2011 simulation started
0.000000000 number of map elements = 2
number of TXOPs = 2
SI              = 0.020000 s
CAP duration    = 0.002163 s
CAP/SI          = 0.108155
start time      = 0.000000
ref_vbr_MaxMSDU = 0
        TID                     = 1
        QSTA                    = 1
        Direction               = downlink
        Mean Data Rate          = 64000.000000 bit/s
        Maximum SI              = 0.020000 s
        Nominal SDU Size        = 160 bytes
        Maximum SDU Size        = 160 bytes
        Poll overhead           = 0.000000 s
        Nominal size SDU txtime = 0.000835 s
        Maximum size SDU txtime = 0.000835 s
        TXOP                    = 0.000837 s
        TID                     = 1
        QSTA                    = 1
        Direction               = uplink
        Mean Data Rate          = 64000.000000 bit/s
        Maximum SI              = 0.040000 s
        Nominal SDU Size        = 160 bytes
        Maximum SDU Size        = 160 bytes
        Poll overhead           = 0.000490 s
        Nominal size SDU txtime = 0.000835 s
        Maximum size SDU txtime = 0.000835 s
        TXOP                    = 0.001327 s
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
Thu Oct 27 02:24:33 CDT 2011 10
Thu Oct 27 02:24:33 CDT 2011 20
Thu Oct 27 02:24:33 CDT 2011 30
Thu Oct 27 02:24:34 CDT 2011 40
Thu Oct 27 02:24:34 CDT 2011 50
Thu Oct 27 02:24:34 CDT 2011 60
Thu Oct 27 02:24:34 CDT 2011 70
Thu Oct 27 02:24:34 CDT 2011 80
Thu Oct 27 02:24:34 CDT 2011 90
Thu Oct 27 02:24:34 CDT 2011 simulation ended
 
1 members found this post helpful.
Old 10-30-2011, 08:21 PM   #29
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

Yeah, as you said i was trying to run it using ns2.34 version. Now its working fine.
My actual work is to increase the no. of stations and modify certain parameters and simulate the NAM and xgraph (to calculate the throughput and delay characteristics)for the same..

in the current example.tcl (hcca folder), it doesn't have anything like NAM/ Xgraph.. So how and where can I introduce those functions??
PLease let me know how can i proceed...

I appreciate your constant support!
THanks
 
Old 11-03-2011, 07:03 PM   #30
stud17
Member
 
Registered: Dec 2010
Posts: 32

Original Poster
Rep: Reputation: 0
Hello,

May I know how can I analyze example.trc using the perl script called analyze.pl?
What is the exact purpose of the analyze.pl script??

I tried executing it on the terminal. It says permission denied!
chithra@ubuntu:~/ns-allinone-2.29/ns-2.29/tcl/ex/hcca$ ./analyze.pl < example.trc
bash: ./analyze.pl: Permission denied

PLease let me know what am missing here and how can i analyze the trace.. I really need your help.
Kindly let me know... Looking forward for your reply

Thank you.
 
  


Reply

Tags
hcca


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
how to install leach patch in ns2.34 in ubuntu 9.10 anjon.sunny Linux - Newbie 9 04-30-2014 04:05 AM
need 802.11e patch for ns2 stud17 Linux - Software 1 03-09-2011 06:54 AM
ns2-802.11e patch - error: stream.h, iostream.h not found shojaru Linux - Newbie 3 06-12-2009 11:11 PM
any information ns-2 802.11e code ??????? asd309 Linux - Software 0 11-01-2006 06:08 PM
802.11e hardware kannerke Linux - Wireless Networking 0 08-10-2006 03:35 AM


All times are GMT -5. The time now is 08:25 AM.

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