On Tue, 28 Aug 2007, James Keenan via RT wrote: > On Tue Aug 28 10:00:38 2007, doughera wrote: > > On Solaris, I'm getting the following failure in both 107- > > inter_progs.01.t > > and .02 .t. I suspect it has to do with the use of callbacks in the > > Solaris hints file. I don't know offhand what's trying to OPEN what, > > but > > the TIEHANDLE emulation in Parrot::IO::Capture::Mini is incomplete. > > > > It may very well be, but (a) I didn't get any negative feedback on it > when I put it up for review and (b) it's worked for me in testing > situations on Win32, Darwin and Linux in the years since I first > submitted to CPAN. I don't have access to Solaris.
Oh, I fully appreciate the problem of not getting any feedback. I can only plead being busy and not having much time. A full Configure, make, make test cycle takes about an hour and 15 minutes on my system (and brings it to its knees!) so it's not something I can do every day. > This module is meant to be very simple, but perhaps now we encounter a > situation where it's too simple. As its author, I may be too close to > it to see clearly. This problem is not really Solaris-specific at all. It's simply that the emulation is missing a bunch of methods. From perldoc -f tie: A class implementing a file handle should have the following methods: TIEHANDLE classname, LIST READ this, scalar, length, offset READLINE this GETC this WRITE this, scalar, length, offset PRINT this, LIST PRINTF this, format, LIST BINMODE this EOF this FILENO this SEEK this, position, whence TELL this OPEN this, mode, LIST CLOSE this DESTROY this UNTIE this As I said, I think this shows up here due to the use of callbacks in the hints file. You should be able to reproduce this on Linux (or any other operating system) by using callbacks there. Here's a simple (untested) patch for hints/linux.pm that will probably trigger the same problem. --- parrot-current/config/init/hints/linux.pm Tue Aug 14 16:06:54 2007 +++ parrot-andy/config/init/hints/linux.pm Wed Aug 29 09:09:00 2007 @@ -69,6 +69,34 @@ $cc_flags .= ' -D_GNU_SOURCE'; } + ### XXX This is a dummy callback to test callbacks + # Run the gcc version test to see if $cc is really gcc. + my $linux_link_cb = sub { + use Parrot::Configure::Step qw(cc_gen cc_run); + use Carp; + my ( $key, $cc ) = @_; + my %gnuc; + my $link = $conf->data->get('link'); + cc_gen("config/auto/gcc/test_c.in"); + + # Can't call cc_build since we haven't set all the flags yet. + # This should suffice for this test. + my $cc_inc = $conf->data->get('cc_inc'); + Parrot::Configure::Step::_run_command( "$cc -o test test.c $cc_inc", 'test.cco', 'test.cco' ) + and confess "C compiler failed (see test.cco)"; + %gnuc = eval cc_run() or die "Can't run the test program: $!"; + if ( defined $gnuc{__GNUC__} ) { + # $link = 'g++'; # don't actually set it in this test function. + $conf->data->set( link => $link ); + } + else { + # Don't know what compiler we have, so don't touch $link. + } + $conf->data->deltrigger( "cc", "linux_link" ); + }; + $conf->data->settrigger( "cc", "linux_link", $linux_link_cb ); + ### XXX End of dummy callback to test callbacks + $conf->data->set( ccflags => $cc_flags, libs => $libs, > As the other Andy would say, patches welcome. Hey, that's my line too! -- Andy Dougherty [EMAIL PROTECTED] Dept. of Physics Lafayette College, Easton PA 18042