Quote:
Originally Posted by knudfl
|
when i was patching it showed.
sunny@sunny-laptop:~/simulator/ns-allinone-2.27/tk8.4.18$ patch -p0 < tk-8.4-lastevent.patch
patching file generic/tk.h
Hunk #1 FAILED at 635.
1 out of 1 hunk FAILED -- saving rejects to file generic/tk.h.rej
the otcl was patched without prblm.
I installed ns2.27 without any problem.
Then i set the environment variable in ~/.bashrc
I add the variables after the environment variables of ns2.34
Then i became confused.
Should I use
the mit.tar.gz or
Tarik_ben__1_9__USTHB_leach_for_NS2.34
in ns2.27 ?
Then will do the next steps starting from step3 as here:
http://cypress.tistory.com/entry/ns2-227-ubuntu
But again i am saying that should i use
mit.tar.gz or
Tarik_ben__1_9__USTHB_leach_for_NS2.34 ??
Then at step 6 i will do only :
make -f 1-LEACH-Makefile-modified
Then i will
# make clean
# make
Then ./test or ./leach_test
Pls tell me if i am wright or wrong ?
Another question, how i will do this as said following and when :
"the leach modified to run under NS-2.34
create a shortcut of leach.tcl, leach-c.tcl ... and put them on ..\tcl\mobility\"
waiting for you reply eagerly
but in the meantime i am including mit.tar.gz as said in ns2leach.pdf(i think u saw it).
after "make clean" i put the Makefile from
http://www.internetworkflow.com/downloads/ns2leach/
in ns2.27 dir and then make, but it showed me an error like this:
sunny@sunny-laptop:~/simulator/ns-allinone-2.27/ns-2.27$ make
g++ -c -g -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -fsigned-char -fno-inline -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I/usr/X11R6/include -I/home/Administrator/ns-allinone-2.27/tclcl-1.15 -I/home/Administrator/ns-allinone-2.27/otcl-1.8 -I/home/Administrator/ns-allinone-2.27/include -I/home/Administrator/ns-allinone-2.27/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./mit/rca -I./mit/uAMPS -o tools/random.o tools/random.cc
In file included from tools/random.cc:40:
./config.h:60:19: error: tclcl.h: No such file or directory
In file included from tools/random.h:42,
from tools/random.cc:41:
tools/rng.h:103: error: expected class-name before ‘{’ token
tools/rng.h:342: error: ‘FILE’ has not been declared
tools/random.cc: In function ‘long int random()’:
tools/random.cc:53: error: ‘printf’ was not declared in this scope
make: *** [tools/random.o] Error 1
sunny@sunny-laptop:~/simulator/ns-allinone-2.27/ns-2.27$
I alse tried as u said :
make -f 1-LEACH-Makefile-modified
It also showed error like this :
sunny@sunny-laptop:~/simulator/ns-allinone-2.27/ns-2.27$ make -f 1-LEACH-Makefile-modified
g++33 -c -g -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -fsigned-char -fno-inline -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I/usr/X11R6/include -I/home/Administrator/ns-allinone-2.27/tclcl-1.15 -I/home/Administrator/ns-allinone-2.27/otcl-1.8 -I/home/Administrator/ns-allinone-2.27/include -I/home/Administrator/ns-allinone-2.27/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./mit/rca -I./mit/uAMPS -o tools/random.o tools/random.cc
make: g++33: Command not found
make: *** [tools/random.o] Error 127
sunny@sunny-laptop:~/simulator/ns-allinone-2.27/ns-2.27$
What can i do now ?