Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 39593
Status: open
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: please_dont_panic [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 804.026
  • 804.027
  • 804.028
Fixed in: (no value)



Subject: Mac OS X Leopard: Bus error
Hello, I'm running perl v5.10.0. I have tried installing 804.026, 804.027, 804.028 as well as the svn Tk. I have had the same results with each version. Compile completes but 'make test' returns: cd pTk && make DEFINE="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-O3" PREFIX="/usr/local" PASTHRU_DEFINE="" PASTHRU_INC="" cd zlib && make libz.a "CC=cc " RANLIB="/usr/bin/ar s" make[2]: `libz.a' is up to date. make all-am make[3]: Nothing to be done for `all-am'. make[2]: Nothing to be done for `all'. cd jpeg && make libjpeg.a make[2]: `libjpeg.a' is up to date. make[2]: Nothing to be done for `all'. /usr/local/bin/perl "-It" "-MTkTest" "-MExtUtils::Command::MM" "-e" "check_display_harness; test_harness(0, 'blib/lib', 'blib/arch')" t/00wmcheck.t t/JP.t t/KR.t t/Require.t t/Tkxs.t t/Trace.t t/X.t t/adjuster.t t/after.t t/async.t t/autoload.t t/balloon.t t/bind.t t/browseentry-grabtest.t t/browseentry-subclassing.t t/browseentry.t t/browseentry2.t t/button-tcl.t t/button.t t/canvas.t t/canvas2.t t/coloreditor.t t/create.t t/cursor.t t/dash.t t/dialogbox.t t/dirtree.t t/entry.t t/errordialog.t t/exefiles.t t/fbox.t t/fileevent.t t/fileevent2.t t/fileselect.t t/font.t t/fork.t t/geomgr.t t/iso8859-1.t t/leak.t t/list.t t/listbox.t t/listvar.t t/magic.t t/mega.t t/msgbox.t t/mwm.t t/optmenu.t t/photo.t t/pixmap.t t/progbar.t t/property.t t/regexp.t t/rotext.t t/slaves.t t/table.t t/text.t t/textundo.t t/trace1.t t/unicode.t t/widget.t t/wm-tcl.t t/wm-time.t t/wm.t t/zzHList.t t/zzPhoto.t t/zzScrolled.t t/zzText.t t/zzTixGrid.t make: *** [test_dynamic] Bus error
Subject: Re: [rt.cpan.org #39593] Mac OS X Leopard: Bus error
Date: 25 Sep 2008 01:09:03 +0200
To: bug-Tk [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"Tyson Koger via RT" <bug-Tk@rt.cpan.org> writes: Show quoted text
> Wed Sep 24 14:13:59 2008: Request 39593 was acted upon. > Transaction: Ticket created by tkoger > Queue: Tk > Subject: Mac OS X Leopard: Bus error > Broken in: 804.026, 804.027, 804.028 > Severity: Normal > Owner: Nobody > Requestors: please_dont_panic@yahoo.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39593 > > > > Hello, > > I'm running perl v5.10.0. I have tried installing 804.026, 804.027, > 804.028 as well as the svn Tk. I have had the same results with each > version. > > Compile completes but 'make test' returns: > > cd pTk && make DEFINE="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" > OPTIMIZE="-O3" PREFIX="/usr/local" PASTHRU_DEFINE="" PASTHRU_INC="" > cd zlib && make libz.a "CC=cc " RANLIB="/usr/bin/ar s" > make[2]: `libz.a' is up to date. > make all-am > make[3]: Nothing to be done for `all-am'. > make[2]: Nothing to be done for `all'. > cd jpeg && make libjpeg.a > make[2]: `libjpeg.a' is up to date. > make[2]: Nothing to be done for `all'. > /usr/local/bin/perl "-It" "-MTkTest" "-MExtUtils::Command::MM" "-e" > "check_display_harness; test_harness(0, 'blib/lib', 'blib/arch')" > t/00wmcheck.t t/JP.t t/KR.t t/Require.t t/Tkxs.t t/Trace.t t/X.t > t/adjuster.t t/after.t t/async.t t/autoload.t t/balloon.t t/bind.t > t/browseentry-grabtest.t t/browseentry-subclassing.t t/browseentry.t > t/browseentry2.t t/button-tcl.t t/button.t t/canvas.t t/canvas2.t > t/coloreditor.t t/create.t t/cursor.t t/dash.t t/dialogbox.t t/dirtree.t > t/entry.t t/errordialog.t t/exefiles.t t/fbox.t t/fileevent.t > t/fileevent2.t t/fileselect.t t/font.t t/fork.t t/geomgr.t t/iso8859-1.t > t/leak.t t/list.t t/listbox.t t/listvar.t t/magic.t t/mega.t t/msgbox.t > t/mwm.t t/optmenu.t t/photo.t t/pixmap.t t/progbar.t t/property.t > t/regexp.t t/rotext.t t/slaves.t t/table.t t/text.t t/textundo.t > t/trace1.t t/unicode.t t/widget.t t/wm-tcl.t t/wm-time.t t/wm.t > t/zzHList.t t/zzPhoto.t t/zzScrolled.t t/zzText.t t/zzTixGrid.t > make: *** [test_dynamic] Bus error >
Can you retry again, but first remove the "check_display_harness;" call from the Makefile (there should be two places). Do you have a core dump? If so, can you load the core dump into gdb or similar and show me the backtrace? Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tktimex - time recording tool http://sourceforge.net/projects/ptktools/
From: please_dont_panic [...] yahoo.com

Message body is not shown because it is too large.

From: anders.glans [...] gmail.com
Hello, Has there been any progress on this bug? I am running perl 5.8.9 and I see basically the same as tkoger when trying to install Tk 804.028. I get a make: *** [test_dynamic] Bus error when trying make test. Removing "check_display_harness;" from Makefile, PNG/Makefile and JPEG/Makefile results in the Bus error going away, but most of the tests fail. On Fri Sep 26 17:53:33 2008, tkoger wrote: Show quoted text
> Thank you. I removed the "check_display_harness;" call from the > Makefile in both places and I'm not getting the bus error any longer. > However "make test" is still failing with the following: >
Hello, I've tried a few more things. I updated perl to 5.10.0 and rebuilt all modules and reinstalled a couple of other things that looked vaguely perl-related. make test still results in a Bus error. p5-tk from macports installs, but any attempt to use the module results in Bus error. I made the file test.pl: {{{ #!/opt/local/bin/perl use Tk; print "Hello World/n"; }}} {{{ $ perl test.pl Bus error }}} Running in gdb results in: {{{ $ gdb perl GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done (gdb) set args test.pl (gdb) run Starting program: /opt/local/bin/perl test.pl Reading symbols for shared libraries +++. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000009 0x005bc68a in InitVtabs () (gdb) where #0 0x005bc68a in InitVtabs () #1 0x005bdfc9 in Boot_Glue () #2 0x005b294f in boot_Tk () #3 0x0009a3d4 in Perl_pp_entersub () #4 0x00090719 in Perl_runops_standard () #5 0x0008a1d5 in Perl_call_sv () #6 0x0008a5a4 in Perl_call_list () #7 0x0002fb25 in S_process_special_blocks () #8 0x00041ded in Perl_newATTRSUB () #9 0x000426b9 in Perl_utilize () #10 0x0002d41a in Perl_yyparse () #11 0x0008ed41 in S_parse_body () #12 0x00090623 in perl_parse () #13 0x00001ae7 in main () }}} I don't really know either perl nor gdb, so I am posting this information in the hopes that it is helpful in hunting down the reason for the Bus error. I'll happily supply more/other information if required. On Wed Feb 11 21:32:32 2009, AndersG wrote: Show quoted text
> Hello, > > Has there been any progress on this bug? I am running perl 5.8.9 and I > see basically the same as tkoger when trying to install Tk 804.028. I
get a Show quoted text
> > make: *** [test_dynamic] Bus error > > when trying make test. Removing "check_display_harness;" from Makefile, > PNG/Makefile and JPEG/Makefile results in the Bus error going away, but > most of the tests fail. > > > > > On Fri Sep 26 17:53:33 2008, tkoger wrote:
> > Thank you. I removed the "check_display_harness;" call from the > > Makefile in both places and I'm not getting the bus error any longer. > > However "make test" is still failing with the following: > >
>
The problem with initialisation is related to some odd code in Tk/MMutil.pm. For some reason I don't understand the module modifies the link line to force each bundle file to be linked against libperl. By default perl does not build a shareable library so in that case each bundle (Tk::Event, Tk etc) gets its own private libperl. When the perl binary dynamically loads the Tk bundles the perl state in the main binary does not map to the bundle so the module itself segvs because none of the perl infrastructure is initialised (the bundle can't see the parent perl state). Commenting out line 301 in Tk/MMutil.pm (I'm using the developer build) fixes most things for me. if ( -e "$Config{'archlib'}/CORE/$Config{'libperl'}" ) { # $self->{'LDDLFLAGS'} .= " -L\${PERL_ARCHLIB}/CORE -lperl "; } At least most tests now pass (using bleadperl compiled with 64-bit mode enabled). I have no idea why there is a need to link against libperl. Maybe Tiger or Panther behaved differently. As a final note, this works with /usr/bin/perl because the Apple perl is built using a shared library. So an alternate fix in the short term is for you to rebuild perl using a shared library. Hope this helps everyone.