Linux - NewbieThis 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
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.
@kshitiz, post #29.
Easier to manage, when you have the files in your /home/<name>/.
Fedora / CentOS 5.x :
cd /home/kshitiz/tmp/ && tar xvf ns-allinone-2.28.tar.gz &&
patch -p0 < ns228-gcc40.patch ( See post #11 )
&& cd ns-allinone-2.28/tk8.4.5/ &&
wget ftp://gentoo.inode.at/portage/dev-la...astevent.patch
&& patch -p0 < tk-8.4-lastevent.patch && cd ../ &&
export CC=gcc34 CXX=g++34 && ./install
( Required : # yum install compat-gcc-34-c++ ).
..
Hi, im very noob to this form. Im installing ns2.28 on fedora 12 with gcc 4.4.4. I did exactly what u suggested.
patch -p1 < ns228-gcc40.patch under ns-allinone2.28/ && patch -p0 < tk-8.4-lastevent.patch under tk-8.4.5/ Also modified makein file. But still got errors.
tclcl-1.16 make failed! Exiting ... No difference. Help pls.
The "install command" is : 'export CC=gcc34 CXX=g++34 && ./install'.
Is that what you did ? ?
The export command is temporary. Will reset to default, when you exit the terminal.
..
Thank you for ur reply. Actually i didnt 'export CC=gcc34 CXX=g++34 && ./install'. So here is what i tried today.
1.cd ns-allinone-2.28/patch -p1 < ns228-gcc40.patch(somehow patch -p0 < ns228-gcc40.patch command didnt work. dont know why. so changed it to p1 instead of p0)
So installation worked. But i got error with validation as following:
alidate overall report: some tests failed:
./test-all-newreno ./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.
So i manually validate cd/tcl/test/ ./test-all-newreno and ./test-all-red. after this, i tried to validate whole ns2 and got same error above. thanks
individual validation prompts for permission after every test and thus runs many test & opens a lot of xgraph window. I just pressed ENTER key until its finished
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517
Rep:
# 37, @jommas
I'd just remembered this :
In Fedora 7 you should be able to use only the patch ns228-gcc40.patch,
and omit the complicated (Ubuntu / Debian) method in post #10.
Hi knudfl >>> i did this in my fedora 7 to install ns-2.28
From post #10:
Code:
[root@dhcppc0 ~]# sh script_228.txt
patching file ns-allinone-2.28/nam-1.11/agent.h
patching file ns-allinone-2.28/ns-2.28/diffusion3/filter_core/filter_core.hh
patching file ns-allinone-2.28/ns-2.28/diffusion3/lib/nr/nr.hh
patching file ns-allinone-2.28/ns-2.28/queue/cbq.cc
patching file ns-allinone-2.28/ns-2.28/tora/tora_neighbor.h
patching file ns-allinone-2.28/ns-2.28/xcp/xcpq.cc
patching file ns-allinone-2.28/ns-2.28/xcp/xcpq.h
mv: cannot stat `nam-1.10/': No such file or directory
ln: creating symbolic link `./nam-1.14': File exists
ln: creating symbolic link `nam-1.11/nam-1.14': File exists
patching file generic/tk.h
Hunk #1 FAILED at 635.
1 out of 1 hunk FAILED -- saving rejects to file generic/tk.h.rej
THin installed the ns2 and i get this in the end of the installation:
Code:
make: *** No rule to make target `VERSION', needed by `gen/version.c'. Stop.
Nam make failed! Continue ...
See http://www.isi.edu/nsnam/ns-problems.html for problems
Please compile your nam separately.
Please compile your gt-itm & sgb2ns separately.
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.5: /root/ns-allinone-2.28/{bin,include,lib}
tk8.4.5: /root/ns-allinone-2.28/{bin,include,lib}
otcl: /root/ns-allinone-2.28/otcl-1.9
tclcl: /root/ns-allinone-2.28/tclcl-1.16
ns: /root/ns-allinone-2.28/ns-2.28/ns
xgraph: /root/ns-allinone-2.28/xgraph-12.1
----------------------------------------------------------------------------------
Please put /root/ns-allinone-2.28/bin:/root/ns-allinone-2.28/tcl8.4.5/unix:/root/ns-allinone-2.28/tk8.4.5/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /root/ns-allinone-2.28/otcl-1.9, /root/ns-allinone-2.28/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 /root/ns-allinone-2.28/tcl8.4.5/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.5
and tk8.4.5. They are now installed under /root/ns-allinone-2.28/{bin,include,lib}
After these steps, you can now run the ns validation suite with
cd ns-2.28; ./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.
[root@dhcppc0 ~]# cd ns-allinone-2.28/
[root@dhcppc0 ns-allinone-2.28]# patch -p0 < ns228-gcc40.patch.txt
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/nam-1.11/agent.h ns-allinone-2.28/nam-1.11/agent.h
|--- ns-allinone-2.28.orig/nam-1.11/agent.h 2001-06-15 21:53:10.000000000 -0400
|+++ ns-allinone-2.28/nam-1.11/agent.h 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/diffusion3/filter_core/filter_core.hh ns-allinone-2.28/ns-2.28/diffusion3/filter_core/filter_core.hh
|--- ns-allinone-2.28.orig/ns-2.28/diffusion3/filter_core/filter_core.hh 2005-01-19 13:23:21.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/diffusion3/filter_core/filter_core.hh 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 27
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/diffusion3/lib/nr/nr.hh ns-allinone-2.28/ns-2.28/diffusion3/lib/nr/nr.hh
|--- ns-allinone-2.28.orig/ns-2.28/diffusion3/lib/nr/nr.hh 2005-01-19 13:23:21.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/diffusion3/lib/nr/nr.hh 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 40
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/queue/cbq.cc ns-allinone-2.28/ns-2.28/queue/cbq.cc
|--- ns-allinone-2.28.orig/ns-2.28/queue/cbq.cc 2005-01-25 17:38:47.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/queue/cbq.cc 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/tora/tora_neighbor.h ns-allinone-2.28/ns-2.28/tora/tora_neighbor.h
|--- ns-allinone-2.28.orig/ns-2.28/tora/tora_neighbor.h 2005-01-19 13:23:53.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/tora/tora_neighbor.h 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 65
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/xcp/xcpq.cc ns-allinone-2.28/ns-2.28/xcp/xcpq.cc
|--- ns-allinone-2.28.orig/ns-2.28/xcp/xcpq.cc 2005-02-03 13:29:20.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/xcp/xcpq.cc 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 84
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ns-allinone-2.28.orig/ns-2.28/xcp/xcpq.h ns-allinone-2.28/ns-2.28/xcp/xcpq.h
|--- ns-allinone-2.28.orig/ns-2.28/xcp/xcpq.h 2005-02-03 13:29:20.000000000 -0500
|+++ ns-allinone-2.28/ns-2.28/xcp/xcpq.h 2005-10-07 21:51:57.000000000 -0400
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
[root@dhcppc0 ns-allinone-2.28]#
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517
Rep:
#43
Quote:
[root@dhcppc0 ~]# cd ns-allinone-2.28/
[root@dhcppc0 ns-allinone-2.28]# patch -p0 < ns228-gcc40.patch.txt
Wrong. The text in #42 says : cd <folder-with ns-allinone-2.28/,
i.e. the parent directory for ns-allinone-2.28/ .
That's where you must do the patch command.
And : root should not be used. Please log in as unprivileged user,
and use like /home/<user-name>/ns2/ for your ns-allinone build.
And do all commands as <user>, not root.
i did the patch o.k and ns-2, in the end of installation i get:
Code:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.5: /home/shifa/simu/ns-allinone-2.28/{bin,include,lib}
tk8.4.5: /home/shifa/simu/ns-allinone-2.28/{bin,include,lib}
otcl: /home/shifa/simu/ns-allinone-2.28/otcl-1.9
tclcl: /home/shifa/simu/ns-allinone-2.28/tclcl-1.16
ns: /home/shifa/simu/ns-allinone-2.28/ns-2.28/ns
nam: /home/shifa/simu/ns-allinone-2.28/nam-1.11/nam
xgraph: /home/shifa/simu/ns-allinone-2.28/xgraph-12.1
The validate process :
Code:
validate overall report: some tests failed:
./test-all-newreno ./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.