Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Testing Time::Piece on Windows/VC

by Corion (Patriarch)
on Jan 27, 2010 at 08:17 UTC ( [id://819868]=perlquestion: print w/replies, xml ) Need Help??

Corion has asked for the wisdom of the Perl Monks concerning the following question:

This is more a "Seekers of Perl Testers", but I figure giving the issue more exposure helps us to better determine whether it's a problem or just a testing fluke:

Matt Sergeant is looking for testers of Time::Piece on Windows. The failures on the CPAN testers are from people I don't know and who don't seem to be too eager to be contacted, so I'm putting out a call for more testers of Time::Piece on Windows. I've already contacted him, but for me, Time::Piece 1.16 passes its tests. This is with Strawberry Perl 5.10.0, gcc 3.4.5 and dmake.

So, if you want to, please do a test of Time::Piece, and if the tests fail for you (or don't), report your Perl+Compiler+OS configuration either here or to Matt directly. If you get the distribution to fail, that would be even better, because Matt thinks he has a fix for the failure, but first he wants to reproduce it.

Replies are listed 'Best First'.
Re: Testing Time::Piece on Windows/VC
by cdarke (Prior) on Jan 27, 2010 at 09:24 UTC
    Similar results for me (but fewer warnings):
    C:\Downloads\Time-Piece-1.16>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Time::Piece C:\Downloads\Time-Piece-1.16>nmake all Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. cp Seconds.pm blib\lib\Time\Seconds.pm cp Piece.pm blib\lib\Time\Piece.pm C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap C:\ +Perl\lib\E xtUtils\typemap Piece.xs > Piece.xsc && C:\Perl\bin\perl.exe -MExtUti +ls::Comman d -e "mv" -- Piece.xsc Piece.c cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSO +LE -DNO_ST RICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPER +L_IMPLICIT _CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Z +i -DNDEBUG -O1 -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" "-IC:\Perl\lib\CORE +" Piece. c Piece.c Running Mkbootstrap for Time::Piece () C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Pie +ce.bs C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('N +AME'=>\"Ti me::Piece\", 'DLBASE' => 'Piece', 'DL_FUNCS' => { }, 'FUNCLIST' => [] +, 'IMPORTS ' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Time\Piece\Piece.dll -dll -nologo -no +defaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 Piece. +obj C:\P erl\lib\CORE\perl510.lib oldnames.lib kernel32.lib user32.lib gdi32.li +b winspool .lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib ne +tapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp3 +2.lib msvc rt.lib -def:Piece.def Creating library blib\arch\auto\Time\Piece\Piece.lib and object bli +b\arch\aut o\Time\Piece\Piece.exp if exist blib\arch\auto\Time\Piece\Piece.dll.manifest mt -nolo +go -manife st blib\arch\auto\Time\Piece\Piece.dll.manifest -outputresource:blib\a +rch\auto\T ime\Piece\Piece.dll;2 if exist blib\arch\auto\Time\Piece\Piece.dll.manifest del blib +\arch\auto \Time\Piece\Piece.dll.manifest C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 bli +b\arch\aut o\Time\Piece\Piece.dll C:\Perl\bin\perl.exe -MExtUtils::Command -e "cp" -- Piece.bs b +lib\arch\a uto\Time\Piece\Piece.bs C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 bli +b\arch\aut o\Time\Piece\Piece.bs C:\Downloads\Time-Piece-1.16>nmake test Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'bl ib\lib', 'blib\arch')" t/*.t t/01base.t ...... ok t/02core.t ...... 1/95 # Failed test at t/02core.t line 60. # got: '0' # expected: '-18000' # Looks like you failed 1 test of 95. t/02core.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/95 subtests (less 5 skipped subtests: 89 okay) t/03compare.t ... ok t/04mjd.t ....... ok t/05overload.t .. ok t/06subclass.t .. ok t/07arith.t ..... ok Test Summary Report ------------------- t/02core.t (Wstat: 256 Tests: 95 Failed: 1) Failed test: 38 Non-zero exit status: 1 Files=7, Tests=156, 1 wallclock secs ( 0.03 usr + 0.06 sys = 0.09 C +PU) Result: FAIL Failed 1/7 test programs. 1/156 subtests failed. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop.
    Perl:
    C:\Downloads\Time-Piece-1.16>perl -v This is perl, v5.10.1 built for MSWin32-x86-multi-thread (with 2 registered patches, see perl -V for more detail) Copyright 1987-2009, Larry Wall Binary build 1006 [291086] provided by ActiveState http://www.ActiveSt +ate.com Built Aug 24 2009 13:48:26
    Compiler:
    C:\Downloads\Time-Piece-1.16>cl Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for +80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
    on Windows XP (32-bit) Version 2002 Service Pack 3.
Re: Testing Time::Piece on Windows/VC
by BrowserUk (Patriarch) on Jan 27, 2010 at 08:38 UTC

    I got the following test failures using:

    C:\Perl64\packages\Time-Piece-1.16>cl Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 Copyright (C) Microsoft Corporation. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ] C:\Perl64\packages\Time-Piece-1.16>perl -v This is perl, v5.10.1 built for MSWin32-x64-multi-thread (with 2 registered patches, see perl -V for more detail) Copyright 1987-2009, Larry Wall Binary build 1006 [291086] provided by ActiveState http://www.ActiveSt +ate.com Built Aug 24 2009 13:45:20 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.

    Console log from build:


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Using Visual C++ 2008 Express Edition like BrowserUk, I get some of the warnings he gets ("The POSIX name for this item is deprecated", and "This function or variable may be unsafe") but neither the "conversion from 'size_t' to 'int'" warnings nor the test failures.

      I have a newer build of the compiler (15.00.30729.01) but I suspect the problem is related in BrowserUk's 64-bit setup. I run WinXP on a 32-bit machine. If so, the conversion warnings probably point to the problem.

      ( Or maybe not. cdarke has the problem on a 32-bit setup )

      Visual C++ 2008 Express Edition:

      Visual Studio 6:

Re: Testing Time::Piece on Windows/VC
by bart (Canon) on Jan 27, 2010 at 10:34 UTC
    Using ActivePErl 5.8.9 (build 826) with MinGW C compiler 3.4.5 (mingw-vista special r3) (which comes with Strawberry Perl)

    I'm sorry to day, all tests pass. Running in CPAN:

    ... MSERGEANT/Time-Piece-1.16.tar.gz nmake -- OK Running make test Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\perl\ActivePerl5.8.9\bin\perl.exe "-IC:/perl/ActivePerl5.8. +9/lib" "-I C:/perl/ActivePerl5.8.9/lib" "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'bl ib\lib', 'blib\arch')" t/*.t t/01base........ok t/02core........ok 5/95 skipped: various reasons t/03compare.....ok t/04mjd.........ok t/05overload....ok t/06subclass....ok t/07arith.......ok All tests successful, 5 subtests skipped. Files=7, Tests=156, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 + CPU) MSERGEANT/Time-Piece-1.16.tar.gz nmake test -- OK
Re: Testing Time::Piece on Windows/VC
by Erez (Priest) on Jan 27, 2010 at 09:27 UTC
    1.16 works fine here, strawberryperl 5.10.1.0 with gcc 3.4.5

    "Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert..

Re: Testing Time::Piece on Windows/VC
by stefbv (Curate) on Jan 27, 2010 at 09:37 UTC

    Time::Piece 1.16 passes its tests on:

    Win32 strawberryperl 5.10.1.0 gcc version = 3.4.5 on Windows XP (32-bit) Version 2002 Service Pack 3
Re: Testing Time::Piece on Windows/VC
by marto (Cardinal) on Jan 27, 2010 at 10:36 UTC

    Installed with no problems on Windows XP sp 2, using Perl 5.10.1 and gcc 3.4.5.

    Cheers

    Martin

Re: Testing Time::Piece on Windows/VC
by syphilis (Archbishop) on Jan 27, 2010 at 13:06 UTC
    From the results so far, it looks as though it's only MS compilers that are producing the failures - yet I have no problem with either MSVC++ 7.0 or Platform SDK for Windows Server 2003 R2.

    However, I use each of those compilers only with a perl that was built by that compiler. Lots of people use an MS compiler that did *not* build the perl on which it's being run - eg using MSVC++ 7,8 or 9 with Active Perl (which was built for and by MSVC++ 6.0). IIRC, BrowserUk uses a compiler that's different from the compiler that built his perl ... not sure about cdarke's set up.
    Lots of times, this doesn't matter, but every now and then it does (because of the mixing of C runtimes that occurs) - and I speculate that this is one of those occasions where it *does* matter.

    That being so, there's nothing much that Craig can do about it. I guess he could put code in the Makefile.PL that checks that the MSVC++ 6.0 is being used (iff ActivePerl is being used && the compiler is 'cl') - and then abort the build if that's not the case. From memory, Steve Hay did something like that with Win32::SharedFileOpen.

    Update: In further support of my speculation that the problem comes from mixing MS compilers, I just built Time-Piece-1.16 on ActivePerl using MSVC++ 7.0, and indeed got the failure earlier reported by cdarke, plus one other failure:
    t/02core.t ...... 1/95 # Failed test at t/02core.t line 60. # got: '39600' # expected: '-18000' # Failed test at t/02core.t line 61. # got: '' # expected: 'EST' # Looks like you failed 2 tests of 95. t/02core.t ...... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/95 subtests (less 5 skipped subtests: 88 okay)
    Yet there's no test failure building Time::Piece with that MSVC++ 7.0 compiler on a perl that was built by MSVC++ 7.0.

    Cheers,
    Rob
      Are the commands/flags used the same?
        Are the commands/flags used the same?

        I don't think there's any significant difference between my build of perl (using MSVC++ 7.0) and ActivePerl. Here's my 'perl -V':
        Summary of my perl5 (revision 5 version 10 subversion 0) configuration +: Platform: osname=MSWin32, osvers=6.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D +_CONSOLE DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_ +SYS -DUSE PERLIO', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='13.00.9466', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeks ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -l +ibpath:"c \_32\perl_vc7\5.10.0\lib\CORE" -machine:x86' libpth=C:\vsnet\VC7\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg3 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui +d.lib ws2 32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.l +ib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib com lg32.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 msvc +rt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt: +ref,icf libpath:"c:\_32\perl_vc7\5.10.0\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO Built under MSWin32 Compiled at Nov 6 2008 22:28:28 @INC: C:/_32/perl_vc7/5.10.0/lib C:/_32/perl_vc7/site/5.10.0/lib .
        Cheers,
        Rob
      Just to confirm, I downloaded the ActiveState binary, I did not build it. I have built several XS modules successfully using this compiler version (13.10.6030 for 80x86) of cl.

      IIRC, BrowserUk uses a compiler that's different from the compiler that built his perl ...

      He's using an ActivePerl build, and they use a MS compiler. He was testing with a different version of MS's compiler than they use (I think), but I have never heard of any issues with doing that.

        He was testing with a different version of MS's compiler than they use (I think), but I have never heard of any issues with doing that.

        If the compiler he's using uses a C runtime other than msvcrt.dll then there can be "issues". And the fact that the MSVC++ 7.0 build of Time::Piece on ActivePerl fails (yet succeeds when perl has been built with MSVC++ 7.0) suggests to me that Time::Piece could be susceptible to such "issues".

        But this is, of course, no more than speculation on my part ... and I could be wrong.
        The simplest way to demonstrate that I am wrong would be for someone to come up with Time::Piece test failures when using the same compiler that built their perl. I think that would clearly demonstrate that there's something other than "runtime mixing" at play.

        UPDATE: One of the "issues" that can arise is touched on at http://cpansearch.perl.org/src/SHAY/Win32-SharedFileOpen-3.41/INSTALL. Specifically, it (correctly) states there:
        "In particular, this module will not work correctly if it loads a different C run-time DLL to that loaded by perl itself".

        Cheers,
        Rob
Re: Testing Time::Piece on Windows/VC
by quester (Vicar) on Jan 27, 2010 at 10:36 UTC
    I'm not sure if this is exactly what you meant by "under Windows", but for what it's worth, 1.16 passes its tests under Cygwin/Vista.
    CYGWIN_NT-6.0 hostname 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin gcc version 4.3.4 20090804 (release) 1 (GCC) This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int (wi +th 12 registered patches, see perl -V for more detail)
Re: Testing Time::Piece on Windows/VC
by cdarke (Prior) on Feb 08, 2010 at 08:39 UTC
    Using the ActiveState implementation with Visual Studio 2003 on 32-bit Windows XP (SP3), Time:Piece version 1.17 now works fine (used cpanp):
    C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'bl ib\lib', 'blib\arch')" t/*.t t/01base.t ...... ok t/02core.t ...... ok t/03compare.t ... ok t/04mjd.t ....... ok t/05overload.t .. ok t/06subclass.t .. ok t/07arith.t ..... ok All tests successful. Files=7, Tests=156, 2 wallclock secs ( 0.08 usr + 0.09 sys = 0.17 C +PU) Result: PASS *** Install log written to: C:\Documents and Settings\Clive Darke\Application Data\.cpanplus\ins +tall-logs\ Time-Piece-1.17-1265617991.log Module 'Time::Piece' installed successfully No errors installing all modules CPAN Terminal> q Exiting CPANPLUS shell C:\mycpan>cl Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for +80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ] C:\mycpan>perl -v This is perl, v5.10.1 built for MSWin32-x86-multi-thread (with 2 registered patches, see perl -V for more detail) Copyright 1987-2009, Larry Wall Binary build 1006 [291086] provided by ActiveState http://www.ActiveSt +ate.com Built Aug 24 2009 13:48:26 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
Re: Testing Time::Piece on Windows/VC
by molecules (Monk) on Jan 27, 2010 at 12:44 UTC
    I installed Time::Piece without error using CPAN.

    Strawberry Perl 5.10.0 (installed with Padre 0.41, Padre later upgraded to 0.45)

    gcc (GCC) 3.4.5 (mingw-vista special r3)

    Windows XP Service Pack 3

    dmake

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://819868]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found