I consistently get segmenation faults while using the Tcl library. Is there a way to fix this?
On Tue, Aug 11, 2009 at 7:25 PM, Vadim Konovalov <[email protected]> wrote: > (copying to the mailing list) > > 在 Tuesday 11 August 2009 18:03:53,Robert Starr 写道: > > On Tue, Aug 11, 2009 at 11:49 PM, Vadim Konovalov <[email protected]> > wrote: > > > 在 Monday 10 August 2009 17:13:35,Robert Starr 写道: > > > > > Didn't you turned off the so-called "stubs"? > > > > > > perl Makefile.PL --nousestubs > > > > That seems to have fixed it. Thanks. > > Now I've tried - I've downloaded most recent ActiveTCL and ActivePerl and > found out that indeed "--nousestubs" do not segmentation fault, while > default "usestubs" does segfault. > > I suspect that ActiveState distribution do not face this problem because it > ships Tcl/Tk within ActivePerl differently - it is "tkkit.dll" on Windows > and > I guess something similar on other OSes. > > I use yet another distribution technique. > > > > > > I agee, but it's unusual to have a module pass all tests and then fail > > immediately on loading. > > Test runs with environment variable PERL_DL_NONLAZY=1, which makes Perl to > perform all bindings at once. > > p100 Tcl-0.97 # ap perl -Mblib -we 'use Tcl;' > /Personal/bin/ap: line 3: 27341 Segmentation fault ${1+"$@"} > p100 Tcl-0.97 # PERL_DL_NONLAZY=1 ap perl -Mblib -we 'use Tcl;' > p100 Tcl-0.97 # > > I suspect the Tcl.xs code should do some more action to avoid the segfault? > Some additional initialization after stub is dl-opened? > > Also, after I've installed ActiveTCL I see in the /opt/ActiveTcl-8.5/lib/ > directory two files - libtkstub8.5.a and libttkstub.a, both are different > sizes and one has executable flag. > > I wonder why this is so? When tkstubs is needed? what is the difference > between libtkstub8.5.a and libttkstub.a ? > > Obviously, the fresh release of Tcl module is needed - I see updated > "stubs" > file at > http://tcltkce.cvs.sourceforge.net/viewvc/tcltkce/Tcl/ChangeLog?view=log > , but IMO that file is not relevant to the current problem. > A bit more touches in Tcl.xs also desireable. > > I will be grateful if anyone will share their knowledge on the questions > I'm > wondering. > > Regards, > Vadim. >
