> Line 185 in JVM.pm, BTW, looks like this: > > my $pid = open3($in, $out, $err, $cmd) ; > > But it's darn near impossible to look at the open3 code and know what > it's doing, it's chock full of TomC DWIM magic.
Really? I just had a look and it doesn't look too bad. Anyway: > open3: open(GLOB(0x1809d50), >&=8) failed: Bad file descriptor at ... is fairly clear; 8 is not a valid file descriptor. In JVM.pm, $err is always \*STDERR, $out and $in are \*STDOUT and \*STDIN respectively, unless they're 'new IO::File(">$dn")' where my $dn = Inline::Java::Portable::portable("DEV_NULL") ; So my guess would be that Inline::Java::Portable::portable("DEV_NULL") might not be quite as portable as it portends. Ben (who still doesn't have an OSX machine, thus can't try it out) > -Ken > > > On Jun 1, 2006, at 11:31 AM, Tim Bunce wrote: > >> I've just tried Inline::Java 0.51 on OSX. >> >> Without PERL_INLINE_JAVA_JNI set I get: >> >> Failed Test Stat Wstat Total Fail List of Failed >> ---------------------------------------------------------------------- >> --------- >> t/10_1_shared_alone.t 4 1024 4 8 1-4 >> t/10_2_shared_start.t 4 1024 3 6 1-3 >> t/10_3_shared_use.t 255 65280 3 6 1-3 >> t/10_4_shared_stop.t 4 1024 4 8 1-4 >> t/10_5_shared_fork.t 4 1024 8 16 1-8 >> t/10_6_shared_sim.t 4 1024 7 14 1-7 >> >> all failures look similar to: >> >> t/10_6_shared_sim......Can't exec JVM: open3: open(GLOB(0x1809d50), >> >&=8) failed: Bad file descriptor at /Users/timbo/.cpan/sources/ >> authors/id/P/PA/PATL/Inline-Java-0.51/blib/lib/Inline/Java/JVM.pm >> line 185 >> at /Users/timbo/.cpan/sources/authors/id/P/PA/PATL/Inline- >> Java-0.51/blib/lib/Inline/Java.pm line 484 >> JVM taking more than 15 seconds to start, or died before Perl could >> connect. Increase config STARTUP_DELAY if necessary. at /Users/ >> timbo/.cpan/sources/authors/id/P/PA/PATL/Inline-Java-0.51/blib/lib/ >> Inline/Java.pm line 484 >> >> (Same with STARTUP_DELAY set high.) >> >> I can't remember off-hand if non-JNI ever worked for me on OSX, so >> then I tried with JNI (which I know used to work). >> >> I set PERL_INLINE_JAVA_JNI true, and set DYLD_LIBRARY_PATH to the >> path reported by Makefile.PL: /System/Library/Frameworks/ >> JavaVM.framework/Versions/CurrentJDK/Libraries >> Then I get: >> >> t/01_init..............dyld: NSLinkModule() error >> dyld: Symbol not found: _JNI_GetCreatedJavaVMs >> Referenced from: /Users/timbo/.cpan/sources/authors/id/P/PA/PATL/ >> Inline-Java-0.51/blib/arch/auto/Inline/Java/JNI/JNI.bundle >> Expected in: dynamic lookup >> >> I won't have time to dig into this for a while (perhaps weeks) so I >> thought I'd report it an hope someone else can shed some light on it. >> >> Tim. > >