shadowsong has asked for the wisdom of the Perl Monks concerning the following question:
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 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. ...
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; }
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__
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
.
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by syphilis (Archbishop) on Mar 21, 2016 at 23:04 UTC | |
by shadowsong (Pilgrim) on Mar 22, 2016 at 15:45 UTC | |
by syphilis (Archbishop) on Mar 23, 2016 at 01:19 UTC | |
by shadowsong (Pilgrim) on Mar 26, 2016 at 21:51 UTC | |
by syphilis (Archbishop) on Mar 27, 2016 at 00:01 UTC | |
| |
|
Re: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by BrowserUk (Patriarch) on Mar 21, 2016 at 22:05 UTC | |
by shadowsong (Pilgrim) on Mar 22, 2016 at 15:17 UTC |