Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 25758
Status: new
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: danq [...] brtt.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: ptk [...] mailman.stanford.edu
Subject:
Date: Thu, 15 Mar 2007 16:31:17 -0600
To: slaven [...] rezic.de
From: Daniel Quinlan <danq [...] brtt.com>
I have been having trouble with Tk compiling with perl-5.8.8 on Solaris 8 or 9, with two different versions of Sun compilers. The problems are the same with both the release 804.027 version and the new potential release 804.027_050. The 804.027 version of Tk compiles and works with perl-5.8.0 (with the exception of a syntax problem in the ptk PNG code described at the bottom). Here's the summary result from "make test" for the new 804.027_050: Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/browseentry-subclassing.t 0 11 2 0 0.00% ?? t/browseentry.t 0 11 22 30 136.36% 8-22 t/create.t 0 10 573 1126 196.51% 11-573 t/cursor.t 0 10 7 14 200.00% 1-7 t/dialogbox.t 0 11 11 18 163.64% 3-11 t/entry.t 0 11 337 670 198.81% 3-337 t/fbox.t 0 11 13 4 30.77% 12-13 t/fork.t 0 10 1 2 200.00% 1 t/geomgr.t 0 11 19 36 189.47% 2-19 t/listbox.t 0 10 539 1078 200.00% 1-539 t/mega.t 0 10 8 14 175.00% 2-8 t/photo.t 0 11 102 202 198.04% 2-102 t/text.t 0 11 415 824 198.55% 4-415 t/trace1.t 0 11 17 30 176.47% 3-17 t/unicode.t 0 11 13 16 123.08% 6-13 t/widget.t 0 11 13 12 92.31% 8-13 t/wm-tcl.t 0 10 315 630 200.00% 1-315 t/wm-time.t 0 11 6 12 200.00% 1-6 t/wm.t 0 10 7 14 200.00% 1-7 t/zzHList.t 0 11 24 40 166.67% 5-24 t/zzScrolled.t 0 10 94 180 191.49% 5-94 t/zzText.t 0 11 22 28 127.27% 9-22 t/zzTixGrid.t 0 11 33 54 163.64% 7-33 2 tests skipped. Failed 23/55 test scripts, 58.18% okay. 2517/3182 subtests failed, 20.90% okay. *** Error code 255 make: Fatal error: Command failed for target `test_dynamic' If you install despite the bad news, most things work, but some very simple things fail. For example, this code dies during startup at the $MW->update() or if that is commented out, at $MW->Unbusy() : % cat ptk : # use perl eval 'exec perl -S $0 "$@"' if 0; use Tk ; $MW = MainWindow->new ; $MW->update() ; $MW->Busy() ; $MW->Unbusy() ; MainLoop ; % ./ptk Bus error If I look at the create.t test script, it is also failing on an update command at line 136. In the perl debugger, stepping over the eval { $mw->update ; } command seems to put one in an infinite loop, using up all the cpu -- truss shows it catching repeated SIGBUS errors, but never recovering. In a c debugger, I find the following stack: Functions main (no symbols) perl_run (no symbols) S_run_body (no symbols) Perl_runops_standard (no symbols) Perl_pp_entersub (no symbols) XStoTclCmd (no symbols) XSTkCommand (no symbols) Call_Tk (no symbols) Tk_UpdateObjCmd (no symbols) Tcl_DoOneEvent (no symbols) TclServiceIdle (no symbols) MapFrame (no symbols) Tk_MapWindow (no symbols) TkWmMapWindow (no symbols) UpdateWmProtocols (no symbols) Tk_InternAtom (no symbols) Tcl_CreateHashEntry (no symbols) AllocStringEntry (no symbols) calloc (no symbols) malloc (no symbols) _malloc_unlocked (no symbols) Show quoted text
-------- SIGBUS -------- In solaris, this often seems to be the result of a free on unmalloc'd space. On the newer machine with Solaris 9 and newer compilers, signal BUS (invalid address alignment) in _malloc_unlocked at 0xff146d14 0xff146d14: _malloc_unlocked+0x0184: ld [%l2], %o0 (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where =>[1] _malloc_unlocked(0x68, 0x754a8, 0x0, 0xff1bc000, 0x0, 0x0), at 0xff146d14 [2] malloc(0x68, 0x0, 0x20, 0xff1bc000, 0x0, 0xff19fed4), at 0xff146b74 [3] _XEnq(0x2df4b0, 0xffbff044, 0xffbff044, 0xffbfefdc, 0x4e444f57, 0xffc94d8c), at 0xfeea5ca0 [4] _XReply(0x2df4b0, 0xffbff044, 0x0, 0x1, 0x4325c400, 0xffbff064), at 0xfee9c878 [5] XInternAtom(0x2df4b0, 0xff049f40, 0x0, 0x90278, 0x0, 0x4266e8), at 0xfeea6ac4 [6] Tk_InternAtom(0x2e04b0, 0xff049f40, 0xffffffff, 0x1, 0x2, 0x3c9b29), at 0xfefd73f0 [7] UpdateWmProtocols(0x3c9b20, 0x32ac, 0xff21fbd8, 0x2c00, 0x2c14, 0xff204620), at 0xff030288 [8] TkWmMapWindow(0x2e04b0, 0x0, 0x0, 0x1267c, 0x0, 0x481a98), at 0xff029ef4 [9] Tk_MapWindow(0x2e04b0, 0xff21ef90, 0x3000, 0x16a608, 0x1, 0xb7c), at 0xff035f50 [10] MapFrame(0x37dd50, 0x0, 0x0, 0x0, 0x2c4, 0x0), at 0xfefecb50 [11] TclServiceIdle(0x0, 0x37c6c0, 0xff21ef90, 0x0, 0x3d11d0, 0x0), at 0xff20dfac [12] Tcl_DoOneEvent(0xffffffff, 0xff21ef90, 0xff21fbd8, 0x16a608, 0x1, 0x32ac), at 0xff20cac0 [13] Tk_UpdateObjCmd(0x2e04b0, 0x22fcac, 0x1, 0x22a684, 0x78c90, 0x13da40), at 0xfefe2374 [14] Call_Tk(0x13657c, 0x1, 0x22a684, 0x136d1c, 0x1364d0, 0x13689c), at 0xfefbaaf0 [15] XSTkCommand(0x2569d8, 0x1, 0xfefe22d0, 0x1, 0x22a684, 0x9db68), at 0xfefbd544 [16] XStoTclCmd(0x2569d8, 0x0, 0x4, 0x1, 0x136d1c, 0x4), at 0xfefbd5ec [17] Perl_pp_entersub(0x80, 0x1, 0x2569d8, 0x136c00, 0x22a684, 0x0), at 0x953e0 [18] Perl_runops_standard(0x0, 0x0, 0x0, 0x0, 0x0, 0x136c00), at 0x8bb64 [19] S_run_body(0x1, 0xffbff208, 0x21058, 0x136400, 0x48f0ffff, 0x980000), at 0x29084 [20] perl_run(0x1, 0x136400, 0x1, 0x136c00, 0x136800, 0x136c00), at 0x28d7c [21] main(0x2, 0xffbff86c, 0xffbff878, 0x129000, 0x0, 0x0), at 0x2539c However, using "setenv LD_PRELOAD watchmalloc.so.1" doesn't show any problems. % perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos crestone 5.8 generic_108528-22 sun4u sparc sunw,sun- blade-100 ' config_args='-Dprefix=/opt/antelope/perl5.8.8' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/opt/SUNWspro/bin/cc', ccflags =' -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='' ccversion='WorkShop Compilers 5.0 98/12/15 C 5.0', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/opt/SUNWspro/bin/cc', ldflags =' -L/usr/lib -L/usr/ccs/lib -L/ opt/SUNWspro/SC5.0/lib ' libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/SC5.0/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib -L/opt/ SUNWspro/SC5.0/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under solaris Compiled at Jun 30 2006 12:41:03 @INC: /opt/antelope/perl5.8.8/lib/5.8.8/sun4-solaris /opt/antelope/perl5.8.8/lib/5.8.8 /opt/antelope/perl5.8.8/lib/site_perl/5.8.8/sun4-solaris /opt/antelope/perl5.8.8/lib/site_perl/5.8.8 /opt/antelope/perl5.8.8/lib/site_perl . % uname -a SunOS crestone 5.8 Generic_108528-22 sun4u sparc SUNW,Sun-Blade-100 % cc -V cc: WorkShop Compilers 5.0 98/12/15 C 5.0 % uname -a SunOS ruper 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-2500 % cc -V cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15 I don't know what to try next. I believe that I demonstrated the same problem with the gcc compiler on solaris 8. But I have to use the solaris compiler in any case. The less significant problem is the following syntax in imgPNG.c: } else if ( png_get_gAMA ) { . . and if ( png_set_gAMA ) { . . where png_get_gAMA and png_set_gAMA are functions. While gcc seems to like this syntax, the Sun compilers don't, so I presume it's some extension from GNU. A previously solution which avoids the syntax error at least is to add "&& 1" following the function name. The solaris compiler error message is controlling expressions must have scalar type Thanks, -- danq