LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem installing ns-2.33 in ubuntu 12.04 (http://www.linuxquestions.org/questions/linux-general-1/problem-installing-ns-2-33-in-ubuntu-12-04-a-4175459670/)

soumyabansal 04-26-2013 07:16 AM

Problem installing ns-2.33 in ubuntu 12.04
 
I am facing problem while installing ns-2.33 in ubuntu 12.04 make failed error is coming

locservices/hdr_locs.h:99:1: warning: ‘typedef’ was ignored in this declaration [enabled by default]
In file included from locservices/locservice.h:22:0,
from locservices/ls_queued_timer.cc:23:
./mobile/god.h: In member function ‘void DHeap::copy(DHeap*)’:
./mobile/god.h:196:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
locservices/ls_queued_timer.cc: In member function ‘void QueuedTimer::printQueue()’:
locservices/ls_queued_timer.cc:307:86: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive]
locservices/ls_queued_timer.cc: In member function ‘void TimerHeap::removeElem(int)’:
locservices/ls_queued_timer.cc:373:12: warning: statement has no effect [-Wunused-value]
locservices/ls_queued_timer.cc: In member function ‘void TimerHeap::printTable()’:
locservices/ls_queued_timer.cc:472:69: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive]
make: *** [locservices/ls_queued_timer.o] Error 1
Ns make failed!


this is the error which is coming. plz help i want to patch gpsr code in ns-2.33

knudfl 04-26-2013 12:05 PM

Welcome to LQ.

Ns2 is for a 32bits OS. However the most functions will work on 64bits.
Install for gpsr-hls, post # 23 here :
http://www.linuxquestions.org/questi...526/page2.html
Install, Ubuntu 12.04, example : export CC=gcc34 CXX=g++34 && ./install

compat-gcc34 64bits https://docs.google.com/file/d/0B7S2...it?usp=sharing

compat-gcc-34-c++ 64bits https://docs.google.com/file/d/0B7S2...it?usp=sharing

-

soumyabansal 04-26-2013 12:18 PM

sorry for posting the same question repeatedly.
Please allow me to access this link compat-gcc-34-c++ 64bits https://docs.google.com/file/d/0B7S2...it?usp=sharing

knudfl 04-26-2013 12:26 PM

Should be OK now.

https://docs.google.com/file/d/0B7S2...it?usp=sharing

soumyabansal 04-26-2013 12:32 PM

I have downloaded and unpacked but how to install it
sudo apt-get install g++34 ?? please help

soumyabansal 04-26-2013 01:17 PM

Thanks a lot!! I have successfully applied the gpsr patch with ns-2.33 sample example is giving desired output.
Now please tell me how i can visualise the output in nam

knudfl 04-26-2013 04:34 PM

# 6 .

Usable simulation examples : 1) $ ns hls.tcl : No nam output.
2) $ ns ssoumayaa.tcl : Not a good nam file, but created is 'fangzhen.nam'.
... Note : ssoumayaa*.tcl depends on changjing1.tcl .
2a) $ nam fangzhen.nam
3) $ ssoumayaa-1.tcl >> fangzhen.nam ( Should be edited to a different out name.)
4) The shell script command : ./run_small.bat

Please read the "gpsr-hls" threads ..
http://www.linuxquestions.org/questions/tags/gpsr-hls/
Examples : gpsr-hls-examples-0113.tar.gz
https://docs.google.com/file/d/0B7S2...it?usp=sharing

( Other GPSR : gpsr-keliu http://www.linuxquestions.org/questi...gs/gpsr-keliu/ )

-

soumyabansal 04-26-2013 09:51 PM

When I am trying to make changes according to gpsr-keliu I am getting this error please help Should I have to do this or I can just copy soumyaa.tcl file in ns2.33/tcl/ and run it ???

soumyabansal 04-26-2013 09:55 PM

trace/cmu-trace.cc: In member function `void CMUTrace::format_locs(Packet*, int)':
trace/cmu-trace.cc:958: error: `HDR_LOCS' was not declared in this scope
trace/cmu-trace.cc: In member function `void CMUTrace::format_gpsr(Packet*, int)':
trace/cmu-trace.cc:1008: error: `HDR_LOCS' was not declared in this scope
trace/cmu-trace.cc:1035: error: 'struct hdr_gpsr' has no member named 'mode_'
trace/cmu-trace.cc:1042: error: 'struct hdr_gpsr' has no member named 'mode_'
trace/cmu-trace.cc:1056: error: 'struct hdr_gpsr' has no member named 'mode_'
trace/cmu-trace.cc:1065: error: 'struct hdr_gpsr' has no member named 'mode_'
trace/cmu-trace.cc:1073: error: 'struct hdr_gpsr' has no member named 'mode_'
trace/cmu-trace.cc: In member function `void CMUTrace::format(Packet*, const char*)':
trace/cmu-trace.cc:1547: error: `PT_HLS' was not declared in this scope
trace/cmu-trace.cc:1550: error: `PT_LOCS' was not declared in this scope
make: *** [trace/cmu-trace.o] Error 1

this is the error which I am getting. Please help

soumyabansal 04-26-2013 11:37 PM

ssoumayaa.tcl works absolutely fine and nam is also working fine but while executing ./run_small.bat command m getting error

soumya@ubuntu:~/ns-allinone-2.33/ns-2.33/hls/utils/hls-utils$ ./run_small.bat
Run Configuration: -n 100 -s 30 -t 100 -x 2000 -y 2000 -mrd 1 -c 400
Can't open perl script "./namable.pl": No such file or directory
./run_small.bat: line 56: ./ns233-gpsr: No such file or directory

soumyabansal 04-26-2013 11:46 PM

And please tell me how to run wireless-gpsr.tcl of KeLiu. please give me the link for the required package for ns-2.33 on 64 bit ubuntu 12.04.

And should I just download it and save it by other name in the same ns-2.33 folder which has been patched with hls patch or install another ns-allinone-2.33

Is there any need to make changes for patching keliu-gpsr with ns-2.33 which is required for running wireless-gpsr.tcl??

please help and thank you so much for ur quick replies.

knudfl 04-27-2013 01:46 AM

# 10.
Quote:

./run_small.bat: line 56: ./ns233-gpsr: No such file or directory
Sorry. Please use the original script, that you have in ns-2.33/hls/utils/.

# 11 : Have you tried installing the KeLiu files ?
#3 here http://www.linuxquestions.org/questi...-4175448663/#3
This is for a 64bits Ubuntu 11.04 .. 12.04 :
1) cd ns-allinone-2.34/ && tar xvf gpsr-KeLiu-patched-ns234.tar.gz
2) export CC=gcc34 CXX=g++34 && ./install

-

soumyabansal 04-27-2013 03:19 AM

should I first download ns-allinone-2.34 for it ?

soumyabansal 04-27-2013 03:35 AM

I downloaded ns-allinone-2.34 and untar it and downloaded gpsr-KeLiu-patched-ns234.tar.gz and executed commands which u told me in the last post but m getting this make failed err

e-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm
/usr/bin/ld: i386 architecture of input file `common/main-monolithic.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


please help

knudfl 04-27-2013 05:27 AM

# 14 .

OK. That's an error in the gpsr-KeLiu-patched-ns234.tar.gz :
Not all objects were cleaned out at 'make clean'.
And regretfully new objects are not created (to 64bits),
when an object <name>.o is already present.
(Nobody else found that error: They used a 32bits OS.)

cd ns-allinone-2.34/ns-2.34/ && find . -name "*.o"
./common/main-monolithic.o
./indep-utils/cmu-scen-gen/setdest/calcdest.o
./indep-utils/cmu-scen-gen/setdest/rng.o
./indep-utils/cmu-scen-gen/setdest/setdest.o
./indep-utils/webtrace-conv/dec/formsquid.o
./indep-utils/webtrace-conv/dec/formtxt.o
./indep-utils/webtrace-conv/dec/my-endian.o
./indep-utils/webtrace-conv/dec/proxytrace.o
./indep-utils/webtrace-conv/dec/proxytrace2any.o
./indep-utils/webtrace-conv/dec/tr-stat.o
./indep-utils/webtrace-conv/epa/tr-stat.o
./indep-utils/webtrace-conv/nlanr/logparse.o
./indep-utils/webtrace-conv/nlanr/tr-stat.o
./indep-utils/webtrace-conv/ucb/logparse.o

You can do :
1) rm common/main-monolithic.o
2) Do a 'make clean' in indep-utils/cmu-scen-gen/setdest/,
indep-utils/webtrace-conv/ dec/, epa/, nlanr/, ucb/
.. and then run 'make' in ns-2.34.
Or rerun './install' in the top directory.

-


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