Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Dear Highly Esteemed Monks,

I would like some help in understanding why my Win32 VC2015 built perl fails at the Test Stage when attempting to install modules via cpan.

Specifically, I am currently receiving a Bad file descriptor error during the nmake test phase of the install. See below:

CPAN command excerpt

> cpan Path::Tiny Reading 'C:\Users\jndt\.cpan\Metadata' Database was generated on Mon, 21 Mar 2016 08:41:03 GMT Running install for module 'Path::Tiny' Checksum for C:\Users\jndt\.cpan\sources\authors\id\D\DA\DAGOLDEN\Path +-Tiny-0.084.tar.gz ok 'YAML' not installed, will not store persistent state Configuring D/DA/DAGOLDEN/Path-Tiny-0.084.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a nmake-style Makefile Writing Makefile for Path::Tiny Writing MYMETA.yml and MYMETA.json DAGOLDEN/Path-Tiny-0.084.tar.gz C:\perl-5.20.3\bin\perl.exe Makefile.PL -- OK Running make for D/DA/DAGOLDEN/Path-Tiny-0.084.tar.gz ---- Unsatisfied dependencies detected during ---- ---- DAGOLDEN/Path-Tiny-0.084.tar.gz ---- Unicode::UTF8 [requires,optional] Test::FailWarnings [build_requires,optional] Test::MockRandom [build_requires,optional] Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 Copyright (C) Microsoft Corporation. All rights reserved. cp lib/Path/Tiny.pm blib\lib\Path\Tiny.pm DAGOLDEN/Path-Tiny-0.084.tar.gz "C:\Program Files\Microsoft Visual Studio 14.0\VC\bin\nmake.EXE" -- +OK Running make test Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 Copyright (C) Microsoft Corporation. All rights reserved. C:\perl-5.20.3\bin\perl.exe "-MExtUtils::Command::MM" "-MTest: +:Harness" "-e" "undef *Test::Harness::Switches; test_harness(0 , 'blib\lib', 'blib\arch')" t/*.t t/00-report-prereqs.t ............. Can't dup STDOUT: Bad file descri +ptor at C:/perl-5.20.3/lib/Test/Builder.pm line 1948. Compilation failed in require at C:/perl-5.20.3/lib/Test/Builder/Modul +e.pm line 5. ...

Line 1948 of …Test/Builder.pm

My aim in asking this question is to solicit help in understanding why I'm encountering this particular error. Line 1948 of Builder.pm refers to the the first open call outlined below:

sub _open_testhandles { my $self = shift; return if $self->{Opened_Testhandles}; # We dup STDOUT and STDERR so people can change them in their # test suites while still getting normal test output. open( $Testout, ">&STDOUT" ) or die "Can't dup STDOUT: $!"; open( $Testerr, ">&STDERR" ) or die "Can't dup STDERR: $!"; $self->_copy_io_layers( \*STDOUT, $Testout ); $self->_copy_io_layers( \*STDERR, $Testerr ); $self->{Opened_Testhandles} = 1; return; }

Similar open statement that is ok

What I find baffling is that the following test code works okay:

use strict; use warnings; my $Testout; open( $Testout, ">&STDOUT" ) or die "Can't dup STDOUT: $!"; print $Testout "Hello Perl Monks!\n"; __END__

Additionally, see output of perl -V

Summary of my perl5 (revision 5 version 20 subversion 3) configuration:

  Platform:
    osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -O1  -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTD
C_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',

    optimize='-O1  -Zi -DNDEBUG -GL',
    cppflags='-DWIN32'
    ccversion='19.00.23506', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\perl-5.20.3\lib\CORE"  -machine:x86 "/manifes
tdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b6
4144ccf1df' language='*'"'
    libpth="C:\Program Files\Microsoft Visual Studio 14.0\VC\lib"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib libcmt.lib libvcruntime.lib lib
ucrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.l
ib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib libcmt.lib libvcruntime.lib
 libucrt.lib
    libc=libucrt.lib, so=dll, useshrplib=true, libperl=perl520.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\perl-5.20.3\lib\CORE"  -machine:x8
6 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyTo
ken='6595b64144ccf1df' language='*'"'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
                        PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  Built under MSWin32
  Compiled at Mar 18 2016 15:00:22
  @INC:
    C:/perl-5.20.3/site/lib
    C:/perl-5.20.3/lib
    .

Any Ideas?

Perl isn't happy with the open statement in Builder.pm, yet it's okay with an identical open statement in another test perl file??? Any help would be much appreciated.

Cheers,
Shadowsong


In reply to Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3 by shadowsong

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found