LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Segmentation Fault with GPSR-HLS (hls.tcl) (https://www.linuxquestions.org/questions/linux-newbie-8/segmentation-fault-with-gpsr-hls-hls-tcl-4175457996/)

devanthakur 04-13-2013 07:08 AM

Segmentation Fault with GPSR-HLS (hls.tcl)
 
I patched NS 2.33 for GPSR using http://www.cn.uni-duesseldorf.de/alu.../hls-ns2-patch When I run hls.tcl in hls/utils/

it gives me
Sorting lists done ...
Segmentation Fault (core dumped)

When I run the nam file it runs only for 1 second whereas I set the time to 200 secs.

Any help is highly appreciated.

knudfl 04-14-2013 05:11 AM

Welcome to LQ.

Segmentation Fault : Looks like a failed build of ns-2.33 / GPSR-hls ?
Which OS are you using ? 1) $ cat /etc/*release* ; 2) uname -m

Or may be you edited the file 'hls.tcl' ?
There is no "out.nam" from the original 'hls.tcl'.

All hls examples : gpsr-hls-examples-0113.tar.gz
https://docs.google.com/file/d/0B7S2...it?usp=sharing

All LQ GPSR-hls http://www.linuxquestions.org/questions/tags/gpsr-hls/
GPSR-KeLiu http://www.linuxquestions.org/questi...gs/gpsr-keliu/

-

devanthakur 04-14-2013 06:48 AM

#2

I am using
Ubuntu 12.10
i686

I tried running ssoumayaa.tcl but same error
"Starting Simulation"
Segmentation fault core dumped

knudfl 04-14-2013 07:48 AM

#3 : GPSR-hls can be built on Ubuntu 12.10 .

a) cd ns-allinone-2.33/ns-2.33/
b) patch -p1 < ns-2.33-hls.patch
c) tar xvf hls-files-ns233.tar.gz
d) cd ../
e) export CC=gcc41 CXX=g++41 && ./install

f) cd ns-2.33/ ; ./ns : OK.
sudo cp ns /usr/local/bin/
cd hls-utils/ ; ns hls.tcl : OK.
ns ssoumayaa.tcl : OK.
bash run_small.bat : OK.

-

devanthakur 04-14-2013 10:55 AM

#4

I have made the patch and it worked fine without any errors.
I also install greedy routing protocol
http://www.cse.ohio-state.edu/~sakai...s2_greedy.html

but scripts for this protocol give the same error as well.

I guess there might be some problem with my ns-2.33 installation. I had one more ns-2.33 installation in other directory that got corrupt. No sure what is causing the problem. I will test with AODV, DSDV and let you know.

knudfl 04-14-2013 11:47 AM

# 5 .

You will have to be very careful when you add more than one patch/extra protocol.
Some patches will make conflicting changes to the files.

devanthakur 04-14-2013 11:56 AM

#4
Did export CC=gcc41 CXX=g++41 && ./install

but got the following error

Code:

* Build tcl8.4.18
============================================================
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/devan/Documents/ns-allinone-2.33/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 configuration failed! Exiting ...


devanthakur 04-14-2013 12:07 PM

Fixed #7

export CC=/usr/bin/gcc-4.7 CXX=g++-4.7

devanthakur 04-14-2013 12:34 PM

I don't know how but after the last step

Quote:

export CC=/usr/bin/gcc-4.7 CXX=g++-4.7
I did ./install

and now everthing works fine. No segmentation fault.
Thanks Knudfl for your support. I appreciate that.


All times are GMT -5. The time now is 09:00 AM.