[SOLVED] installed Mannasim Path on Ns2.34 . Now got error
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492
Rep:
Fedora : tar xvf ns-allinone-2.34.tar.gz
patch -p1 < ns2.34-mannasim-gcc4.3.patch
cd ns-allinone-2.34/
export CC=gcc34 CXX=g++34 && ./install
cd ns-2.34/ ; cp ns ns-mannasim
./ns-mannasim mannasim-rede-plana.tcl
Code:
[knudfl@localhost ns-2.34]$ ./ns-mannasim mannasim-rede-plana.tcl
num_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Starting Simulation...
Node 06 - Temperature Data 24.639770 - Time 9.024851
Node 05 - Temperature Data 25.358195 - Time 9.117242
Node 04 - Temperature Data 25.972416 - Time 9.418831
Node 03 - Temperature Data 25.568187 - Time 9.449172
Node 08 - Temperature Data 24.570268 - Time 9.471067
Node 09 - Temperature Data 25.984111 - Time 9.506826
Node 10 - Temperature Data 25.546025 - Time 9.657766
Node 11 - Temperature Data 26.607362 - Time 9.667427
Node 02 - Temperature Data 23.825474 - Time 9.838219
Node 07 - Temperature Data 24.613930 - Time 9.958714
Common Node 6 - Disseminating data - Time 11.025 - Destination node 1
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 129.1
SORTING LISTS ...DONE!
Access point - Received a message with 1 elements
Message received from node 6 with 2.005267 delay ::: 9.024851 11.030118
Common Node 5 - Disseminating data - Time 11.117 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 5 with 2.004708 delay ::: 9.117242 11.121950
Common Node 4 - Disseminating data - Time 11.419 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 4 with 2.004527 delay ::: 9.418831 11.423358
Common Node 3 - Disseminating data - Time 11.449 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 3 with 2.004587 delay ::: 9.449172 11.453759
Common Node 8 - Disseminating data - Time 11.471 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 8 with 2.004847 delay ::: 9.471067 11.475914
Common Node 9 - Disseminating data - Time 11.507 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 9 with 2.004887 delay ::: 9.506826 11.511713
Common Node 10 - Disseminating data - Time 11.658 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 10 with 2.004447 delay ::: 9.657766 11.662214
Common Node 11 - Disseminating data - Time 11.667 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 11 with 2.004567 delay ::: 9.667427 11.671994
Common Node 2 - Disseminating data - Time 11.838 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 2 with 2.004847 delay ::: 9.838219 11.843067
Common Node 7 - Disseminating data - Time 11.959 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 7 with 2.004708 delay ::: 9.958714 11.963422
Node 06 - Temperature Data 25.057664 - Time 12.024851
Node 05 - Temperature Data 23.748813 - Time 12.117242
Node 04 - Temperature Data 25.048678 - Time 12.418831
Node 03 - Temperature Data 25.109206 - Time 12.449172
Node 08 - Temperature Data 25.973313 - Time 12.471067
Node 09 - Temperature Data 25.435457 - Time 12.506826
Node 10 - Temperature Data 23.609995 - Time 12.657766
Node 11 - Temperature Data 25.495822 - Time 12.667427
Node 02 - Temperature Data 23.845454 - Time 12.838219
Node 07 - Temperature Data 23.949219 - Time 12.958714
NS EXITING...
.. If you do something different, the result will be different.
I.e. do not use "% ns file.tcl", but plain $ ns file.tcl
-
[QUOTE=knudfl;4927338]Fedora : tar xvf ns-allinone-2.34.tar.gz
patch -p1 < ns2.34-mannasim-gcc4.3.patch
cd ns-allinone-2.34/
export CC=gcc34 CXX=g++34 && ./install
cd ns-2.34/ ; cp ns ns-mannasim
./ns-mannasim mannasim-rede-plana.tcl
dear knudfl
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34$ patch -p1 < ns2.34-mannasim-gcc4.3.patch
patching file ns-2.34/apps/udp.cc
Hunk #1 FAILED at 93.
Hunk #2 FAILED at 108.
patch: **** Failed to set the timestamps of file ns-2.34/apps/udp.cc.orig : Operation not permitted
I got this error while patching up the mannasim in ns-allinone-2.34 folder
I got mannasim-patch-ns2.29.tar.gz zip file with me ......
Can you please guide what is to be done for making mannasim work for me
Wrong. It's :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
.. I.e. do not "cd ns-allinone-2.34/" until you have done the patch command. See #2.
Solution : Delete ns-allinone-2.34/ , and start from scratch with :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
About "Hunk #Xx FAILED : Please check if the patch really did the editing.
The patch command will sometimes report an error, though everything is OK.
You can see the "failed" code text in "udp.cc.rej".
Quote:
patch: ***Failed to set the timestamps of file ns-2.34/apps/udp.cc.orig: Operation not permitted
Don't know. Did you do "tar xvf ns-allinone-2.34.tar.gz" as root ?
I.e. all ns2 command are to be done as unprivileged user.
About "Failed to set the timestamps" :
Things may work OK when you do the patching from the right location :
Outside of ns-allinone-2.34/ .
I got ns-allinone-2.34.tar.gz and mannasim-patch-ns2.29.tar.gz with me.. First question is whether to keep these two files n home folder or somewhere else.
Second question is whether extraction of mannasim-patch-ns2.29.tar.gz is to be done before applying the commands as you mentioned above....
Third qs is whether ns-2.34 and mannasim patch available with me is 2.29 compatible with each other....
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
What do you mean by unprivileged user??? Is there any difference between root login and unprivileged user login
Although at my prompt it is showing $ not #
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
when I used the command as you mentioned above, after some time it asked me to provide the name of the file to patch.
and when I provided the name of the patch file it is showing me below given error again and again.
File to patch: patch -p2 < ns2.34-mannasim-gcc4.3.patch
patch -p2 < ns2.34-mannasim-gcc4.3.patch: No such file or directory
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 86
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -rupN ns-allinone-2.34-orig/ns-2.34/common/packet.h ns-allinone-2.34/ns-2.34/common/packet.h
|--- ns-allinone-2.34-orig/ns-2.34/common/packet.h 2009-06-14 19:35:44.000000000 +0200
|+++ ns-allinone-2.34/ns-2.34/common/packet.h 2009-11-12 15:43:11.000000000 +0100
--------------------------
do you have any idea about this
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492
Rep:
# 10 : Do not quote entire posts. And certainly not twice.
Please edit posts #8, #9. A "one word" reference will do.
The command $ patch -p1 < ns2.34-mannasim-gcc4.3.patch
.. means that the file ns2.34-mannasim-gcc4.3.patch
.. must be present in the current directory.
Hence these chained commands :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
# 8 : No. Patches are not compatible with anything.
Can be used in the ns2 version they are meant for only.
May be you meant something else ?
* ns-2.29 and ns-2.34 are very different.
Se ns-allinone-2.xx/ns-2.xx/CHANGES.html .
# 8 : Using "mannasim-patch-ns2.29.tar.gz" Unpack to mannasim.patch.diff.
`mannasim.patch.diff' is the patch / the text file (which you can read.)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492
Rep:
# 12 .
First : Build ns-allinone-2.34/ + mannasim.
When the file 'ns' is present in ns-2.34/,
you can use it, copy to <name>, etc.
But : If the build fails, there might not be any 'ns'.
dear
by build are we talking about installation of ns-allinone-2.34 and mannasim or something else
can you please provide the detailed description of this build word......
also I do have number of files/folders in ns2.34 but dont know which one to copy.....
my ms2 is working as well as my nam is working properly for tcl files
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.