in reply to Re^2: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
in thread Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3

Maybe the Test Harness is cocking up my STDOUT file descriptor?

I've never managed to understand anything about problems that arise only when Test::Harness is invoked.
(Best news would have been for you to report "Nope - makes no difference" ;-)

perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t\00-report-prereqs.t


A shot in the dark - does it make any difference if you remove undef *Test::Harness::Switches; from that command ?

You mention another build of perl on another system where this problem does not arise.
Do both systems run the same command when 'make test' is run ? (Obviously, they'll invoke different perls.)
Do both systems run the same version of Test::Harness:
perl -MTest::Harness -e "print $Test::Harness::VERSION"

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by shadowsong (Pilgrim) on Mar 26, 2016 at 21:51 UTC

    Rob - apologies for the late reply.

    A shot in the dark - does it make any difference if you remove undef *Test::Harness::Switches; from that command ?

    Removing undef *Test::Harness::Switches; from the command results in much the same - see error below:

    System 2 - where the problem isn't evident

    • Yes - both systems run the same command when make test is run
    • Yes - both systems run the same version of Test::Harness

    Test::Harness Version info on both systems

    It's quite bizarre and I'm out of ideas as to why my STDOUT file descriptor is evidently corrupt on the Win7 machine.

      I'm out of ideas as to why my STDOUT file descriptor is evidently corrupt on the Win7 machine

      Same here.

      It would be interesting to know whether the same problem exists when perl-5.20.3 is built with gcc.
      If you think that's worth investigating you could install 32-bit and/or 64-bit StrawberryPerl portable builds of 5.20.3 and see how they handle the installation of Path::Tiny.
      You could also try a more recent version of perl.
      But whether any of that would lead to enlightenment is anyone's guess ;-)

      On my Windows7 machine, I have 64-bit perl-5.18.0 built with "Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for AMD64" - which is a different version of perl built using a different Microsoft Compiler.
      FWIW (not much) Path::Tiny builds fine on that build of perl.

      Cheers,
      Rob

        Rob,

        Thanks for all your help. The idea was to go with perl-5.20.x as that was the latest version of perl that works with mod_perl v2.0.9.

        The problem I was having wasn't just limited to Path::Tiny, but any module I attempted to install via cpan would fail with that Bad File Descriptor error. After much grief I got fed up and compiled it using VC2010. It now works as expected and I can install modules hassle free.

        If I had to put money on it - I would say it was down the patches applied to perlio.c et al; in order to get it to compile with VC2015...

        Cheers,
        Shadowsong