LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-26-2011, 04:52 AM   #1
raji27
LQ Newbie
 
Registered: Sep 2011
Posts: 13

Rep: Reputation: Disabled
NS2 error 139


i'm trying to add a new protocol with the help of http://elmurod.net/?p=157. then i did make, but i get the following error

g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
/bin/sh: line 1: 19172 Segmentation fault ./common/ptypes2tcl > gen/ptypes.cc
make: *** [gen/ptypes.cc] Error 139


can u say me how to rectify this.
 
Old 09-26-2011, 10:37 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You're running a makefile that runs a script that's building programs to generate more programs...

... and somewhere in all of this, the executable "./common/ptypes2tcl" is dumping core.

You need to debug ptypes2tcl to find the problem.

Or ask the author, or somebody in a relevant mail group or IRC channel.
 
1 members found this post helpful.
Old 10-14-2011, 12:41 AM   #3
raji27
LQ Newbie
 
Registered: Sep 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
thank u sir, i've corrected the errors but i'm getting errors while i run the trace file, the errors are like the changes i've done in files have not updated.
 
Old 05-09-2013, 03:16 AM   #4
nawel_nk
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Hi sir
My name's is nawel kortas , i'm from tunisia
i have those erros could you please help me

common/ptypes2tcl.cc:71: warning: deprecated conversion from string constant to ‘char*’
g++ -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
/bin/sh: line 1: 29973 Erreur de segmentation ./common/ptypes2tcl > gen/ptypes.cc
make: *** [gen/ptypes.cc] Erreur 139

thank you very much
 
Old 05-09-2013, 03:45 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,204

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
# 4 .
Quote:
g++ -o common/ptypes2tcl common/ptypes2tcl.o
You are using the wrong compiler. Should be g++-4.1, not g++.
Please read http://www.linuxquestions.org/questi...-4175451154/#6
> Post #6 : That's the answer you got a month ago.
And there is an unanswered question in that post #6 :
"Where did you get the information that the above will work ?"
I.e. you are trying to mix two patches, ns-229-nist-mob + pmip6-for-ns-229.
? The two patches may conflict ?

-
 
Old 05-09-2013, 04:02 AM   #6
nawel_nk
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Thank you sir for your replay
I still have the error

./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o common/ptypes2tcl.o common/ptypes2tcl.cc
g++-4.1 -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
/bin/sh: line 1: 26362 Erreur de segmentation ./common/ptypes2tcl > gen/ptypes.cc
make: *** [gen/ptypes.cc] Erreur 139
Ns make failed!


Do have another solution
thank you
 
Old 05-09-2013, 04:22 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,204

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
# 6 .

Well, then please tell what you are doing.
The error tells very little when all the beginning is mising.

Things to specify when you ask an ns2 question :
OS name, version, architecture. Like Ubuntu 10.04 - 32bits(i686).
Ns2 version. 'ns-allinone-2.29.3.tar.gz' ? ( If ns-2.29 : version 3 is a must.)
And if any changes were made to ns-2.xx : Please specify patch name(s).

-
 
Old 05-09-2013, 04:40 AM   #8
nawel_nk
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
i Use ubuntu 10.04 (32 bit) , I want to add wimax module to ns-allinone-2.29 from this link http://www.lrc.ic.unicamp.br/wimax_ns2/ (this is an old version but i want it to make comparison with my work )

i install my ns-allinone-2.29 correctly then i add the mac files , i change the makefile.in , i copy the modification in the packet.h and tcl/lib file then i try to make

so i get the last errors

Last edited by nawel_nk; 05-09-2013 at 04:41 AM.
 
Old 05-09-2013, 05:42 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,204

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
# 8 .

You are right. "WiMAX_module-1.02.zip" does not work in ns-2.29.
Is for ns-2.28 :
1) tar xvf ns-allinone-2.28.tar.gz
2) patch -p0 < ns228-gcc40.patch
3) patch -p0 < ns-2.28-gcc410.patch <Enter> <Enter> <Enter>
4) cd ns-allinone-2.28/
5) tar xvf wimax102-ns228-patch.tar.bz2
6) export CC=gcc41 CXX=g++41 && ./install

'wimax102-ns228-patch.tar.bz2' is the repacked WiMAX_module-1.02.zip + Makefile.in.
Download link https://docs.google.com/file/d/0B7S2...it?usp=sharing

Note 1: You can have as many versions of ns-allinone as you want,
installed at the same time. But do not add any path text to .bashrc.

Note 2: I don't remember any wimax examples.tcl that actually work.
See http://www.linuxquestions.org/questions/tags/wimax/

-
 
Old 05-09-2013, 07:02 AM   #10
nawel_nk
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Thank you very much , it's very sweet from you
 
Old 05-09-2013, 07:25 AM   #11
nawel_nk
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
I need you help again sir
when i configure then make the nam-1.11 folder i get those errors , do you have any idea about this


/usr/bin/ld: nam: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [nam] Erreur 1
 
Old 05-09-2013, 08:26 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,204

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
# 11 .

Nam is a separate application. Any nam can be used.

Suggest nam-1.14.i586.tar.gz
https://docs.google.com/uc?id=0B7S25...=CLPiyxo&hl=en
cd nam-1.14.i586/ && sudo cp nam /usr/local/bin/


? By the way : Why run './configure && make' in nam-1.11/ ?
Is handled by ./install.
And : There is no such thing as ./configure in any ns-2.28 application.
The command is $ export CC=gcc41 CXX=g++41 && ./configure .

-
 
Old 02-24-2014, 07:38 AM   #13
Chakraborty
Member
 
Registered: Jan 2014
Posts: 54

Rep: Reputation: Disabled
Getting Out of segmentation Fault

Quote:
Originally Posted by raji27 View Post
thank u sir, i've corrected the errors but i'm getting errors while i run the trace file, the errors are like the changes i've done in files have not updated.
Dear raji27,

Could you please help to solve the segmentation fault problem?

root@chakraborty-desktop:/home/chakraborty/ns/ns-allinone-2.33/ns-2.33# gdb ./common/ptypes2tcl
.....
.......
Reading symbols from /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl
static const char code[] = "\n\
global ptype pvals\n\
set ptype(error) -1\n\
set pvals(-1) error\n\
........
...........

set ptype(belllabstrace) 60\n\
set pvals(60) BellLabsTrace\n\

Program received signal SIGSEGV, Segmentation fault.
0x080489b5 in lcase(char const*) ()
(gdb) bt
#0 0x080489b5 in lcase(char const*) ()
#1 0x08048a6e in main ()


I am patching GPSR to NS-2.33 in Ubuntu-12.04

with thanks.
 
Old 02-24-2014, 08:23 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,204

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Post #13, @Chakraborty.

What is it you are trying to do ?
** Using "ptypes2tcl" :
$ cd ns-allinone-2.33/ns-2.33/common/ && ./ptypes2tcl

Quote:
# gdb ./common/ptypes2tcl
Two things are wrong. Do not use root for ns2 commands.
And : There are generally no debugging symbols in any ns2 executable.
Meaning you can't use gdb to debug those.

Quote:
I am patching GPSR to NS-2.33 in Ubuntu-12.04
Then please do not ask off-topic questions in a WIMAX thread.
As you can see from post #5, you can get segmentation fault,
when you are using a wrong compiler.

-
 
  


Reply

Tags
wimax


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ns2 error prashantpanse Linux - Newbie 0 09-26-2008 09:13 AM
NS2 Error ajkannan83 Linux - Software 1 02-10-2008 11:33 PM
error 139 Shreevant Programming 2 06-20-2006 12:20 AM
error connecting to 127.0.0.1:139 Adibe_Hamm Linux - Software 3 10-01-2003 01:23 AM


All times are GMT -5. The time now is 10:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration