LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ns2 problem (https://www.linuxquestions.org/questions/linux-newbie-8/ns2-problem-4175549709/)

mohawad 08-03-2015 08:22 AM

ns2 problem
 
I try to install ns2 2.35 in redhat 5. It show the followinf error. How to clear it.
gcc -c -O2 -pipe -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../bitmaps -I/home/manikandan/ns2/ns-allinone-2.32/tcl8.4.15/generic -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DSTATIC_BUILD=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DSTDC_HEADERS=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c
In file included from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tkInt.h:21:0,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.h:18,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c:16:
/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk.h:83:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.4.15 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

knudfl 08-03-2015 09:33 AM

Welcome to LQ.

Before you can build any ns2, the prerequisites must be installed :
# yum install gcc-c++ gcc44-c++ autoconf libtool libXmu-devel


The build command for ns-allinone-2.35/ is :
$ export CC=gcc44 CXX=g++44 && ./install


-

mohawad 08-04-2015 12:54 AM

order has no member named objRefCount
make: *** [tk3d.o] Error 1
tk8.5.10 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

mohawad 08-04-2015 12:55 AM

i use red hat by vmware is this a problem

knudfl 08-04-2015 05:08 AM

Quote:

I try to install ns2 2.35
Doesn't look to be ns-2.35 . Looks more like ns-allinone-2.32 .

Then the build command is $ ./install

I.e. plain './install' will use the default gcc/g++ version 4.1.2,
.. which is the right one for ns-allinone-2.32

-

mohawad 08-12-2015 04:55 PM

i install ns2 in upinto 14.4.3 and it gives this mistake after i test ihe program
some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./test-all-testReno-full ./test-all-testReno-bayfull ./test-all-sack-full ./test-all-tcp-init-win ./test-all-tcpVariants ./test-all-LimTransmit ./test-all-aimd ./test-all-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./test-all-red ./test-all-adaptive-red ./test-all-red-pd ./test-all-rio ./test-all-vq ./test-all-rem ./test-all-gk ./test-all-pi ./test-all-cbq ./test-all-schedule ./test-all-links ./test-all-oddBehaviors


whatis the solution???

---------- Post added 08-12-15 at 04:56 PM ----------

32 bit

knudfl 08-12-2015 05:17 PM

Re post #6.

Validate shows in post #6 that 35 of the 108 group tests are failing.
The 108 group tests in ns-2.32/tcl/test/ are running the 1,245 individual tests.
The "tests failed" : At least 35 of the 1245 tests have failed.

... But : Failed tests can usually be ignored.
* I have never seen a simulation.tcl fail, even if "validate" showed many failed tests.


-

mohawad 08-14-2015 01:17 PM

i install ns2 in upuntu 14.4.3 successfully and the nam paket now i went to implement the blackhole by aodv protocol can you help my to find a clear blackole.tcl to run in nam


thanx

knudfl 08-14-2015 03:23 PM

? Why did you build ns-allinone-2.32 ? ?

'ns-allinone-2.32' is not the choice for "blackholeaodv".


Blackholeaodv INFO, post #3 here ....
http://www.linuxquestions.org/questi...-4175547650/#3

Blackholeaodv build example, post #38 here
http://www.linuxquestions.org/questi...163/page3.html

Simulation examples
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

mohawad 08-24-2015 06:05 AM

tnx
i run the blackhole sucssfuly
now i went to run idsAODV i implement the step and it come error
mohamed@ubuntu:~/Desktop$ ns-idsaodv idsaodv2.tcl
num_nodes is set 20
Creating nodes...

(_o15 cmd line 1)
invoked from within
"_o15 cmd addr"
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 "_o15" line 2)
(SplitObject unknown line 2)
invoked from within
"_o15 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nnaodv)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;#disable random motion
}"
(file "idsaodv2.tcl" line 54)


pleeees help

knudfl 08-24-2015 06:41 AM

Re #10.

Please read http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html
I.e. the ns2 version must be specified. And the OS.


HOWTO idsAODV :
Two patches are required 1) blackholeaodv2013-ns235_1.patch
2) idsAODV-2-for-blackhole2013-patched_ns235.patch
Code:

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.35/
$ patch -p0 < blackholeaodv2013-ns235_1.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ patch -p0 < idsAODV-2-for-blackhole2013-patched_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ sudo make install
$ cp ns ns235-blackhole-idsaodv
$ sudo cp ns235-blackhole-idsaodv /usr/local/bin/
.. Simulation : $ ns235-blackhole-idsaodv idsaodv2.tcl

Your errors : You are using an executable 'ns' with no blackholeaodv, no idsAODV !
! Do not use plain 'ns' in a command. Please use like 'ns235-blackhole-idsaodv'.


-

mohawad 08-25-2015 04:05 AM

ns2.35
i use ubinto 14.4.3 for 32bit by vmware

mohawad 08-25-2015 06:07 AM

i follw the steps it doesnt work yet it gives the same error
i instaled ns2.35 more than one is that a proplem

knudfl 08-25-2015 06:54 AM

Re #13.

You can have as many 'ns-allinone-2.xx' as you want, installed at the same time.
But : Do never add any *PATH text to .bashrc . Not required.


And : Do not use plain 'ns' in a command !
See post #11 : $ ns235-blackhole-idsaodv idsaodv2.tcl
I.e. you are supposed to have /usr/local/bin/ns235-blackhole-idsaodv


-

mohawad 08-25-2015 08:40 AM

i found these


mohamed@ubuntu:/usr/local/bin$ ls
calcdest -- nam -- ns235-blackhole-idsaodv --- ns-idsaodv
dec-tr-stat --- nlanr-tr-stat --- ns235-blackhole+idsaodv --- setdest
epa-tr-stat ---ns --- ns-blackhole --- ucb-tr-stat


All times are GMT -5. The time now is 07:31 PM.