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

I am trying to install the perl module Date::Calc version 6. It is part of gnuCalc and failed when installed with it. I chose to manually download Date::Calc and install it but it gave exactly the same errors which are shown below. Since Date::Calc is not limited to gnuCalc, I was hoping someone could point me in a direction to solve this.

I am on Windows 7 64bit. Perl is strawberry Perl ver 5.18.2002. Thanks in advance.

E:\Downloads\Date-Calc-6.3>perl Makefile.PL ************************************************************* ****** BEWARE: Use "make install UNINST=1" to install! ****** ************************************************************* Checking if your kit is complete... Looks good Generating a dmake-style Makefile Writing Makefile for Date::Calc Writing MYMETA.yml and MYMETA.json E:\Downloads\Date-Calc-6.3>C:\strawberry\c\bin\dmake.exe cp lib/Date/Calc/Object.pod blib\lib\Date\Calc\Object.pod cp lib/Date/Calc.pm blib\lib\Date\Calc.pm cp lib/Date/Calendar/Profiles.pod blib\lib\Date\Calendar\Profiles.pod cp lib/Date/Calendar.pm blib\lib\Date\Calendar.pm cp lib/Date/Calendar.pod blib\lib\Date\Calendar.pod cp lib/Date/Calc/Object.pm blib\lib\Date\Calc\Object.pm cp lib/Date/Calc/PP.pm blib\lib\Date\Calc\PP.pm cp lib/Date/Calendar/Profiles.pm blib\lib\Date\Calendar\Profiles.pm cp lib/Date/Calc/PP.pod blib\lib\Date\Calc\PP.pod cp lib/Date/Calendar/Year.pod blib\lib\Date\Calendar\Year.pod cp lib/Date/Calendar/Year.pm blib\lib\Date\Calendar\Year.pm cp lib/Date/Calc.pod blib\lib\Date\Calc.pod E:\Downloads\Date-Calc-6.3>C:\strawberry\c\bin\dmake.exe test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Har +ness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\ar +ch')" t/*. t t/f000.t .. ok t/f001.t .. ok t/f002.t .. ok t/f003.t .. ok t/f004.t .. ok t/f005.t .. ok t/f006.t .. ok t/f007.t .. ok t/f008.t .. ok t/f009.t .. ok t/f010.t .. ok t/f011.t .. ok t/f012.t .. ok t/f013.t .. ok t/f014.t .. ok t/f015.t .. ok t/f016.t .. Failed 16/25 subtests t/f017.t .. ok t/f018.t .. ok t/f019.t .. ok t/f020.t .. ok t/f021.t .. ok t/f022.t .. ok t/f023.t .. ok t/f024.t .. ok t/f025.t .. ok t/f026.t .. ok t/f027.t .. Failed 22/46 subtests t/f028.t .. Failed 22/46 subtests t/f029.t .. ok t/f030.t .. ok t/f031.t .. ok t/f032.t .. ok t/f033.t .. ok t/f034.t .. ok t/f035.t .. ok t/f036.t .. ok t/f037.t .. ok t/m001.t .. ok t/m002.t .. ok t/m003.t .. ok t/m004.t .. ok t/m005.t .. ok t/m006.t .. ok t/m007.t .. ok t/m008.t .. ok t/m009.t .. ok t/m010.t .. ok t/m011.t .. ok t/m012.t .. ok t/m013.t .. ok Test Summary Report ------------------- t/f016.t (Wstat: 0 Tests: 25 Failed: 16) Failed tests: 1-4, 6-7, 9-12, 15-17, 21-23 t/f027.t (Wstat: 0 Tests: 46 Failed: 22) Failed tests: 7-15, 22, 24-27, 30-35, 44-45 t/f028.t (Wstat: 0 Tests: 46 Failed: 22) Failed tests: 7-15, 22, 24-27, 30, 32, 34-37, 44-45 Files=51, Tests=3381, 3 wallclock secs ( 0.20 usr + 0.01 sys = 0.22 + CPU) Result: FAIL Failed 3/51 test programs. 60/3381 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic'

Replies are listed 'Best First'.
Re: Date::Calc Install Fails
by pme (Monsignor) on Jan 11, 2015 at 08:32 UTC
      Yes, I finally found the bug reports as well (I'm new to perl). It looks like the patch only changes the 3 test files which generate errors. Seems like force install would be appropriate in this case.
        As you're not using cpan to install the module, there is nothing to force :) that is cpan client command which you're not using :) just dmake install
Re: Date::Calc Install Fails (doesn't)
by Anonymous Monk on Jan 11, 2015 at 07:53 UTC

    I was hoping someone could point me in a direction to solve this.

    Solve what?

    What needs solving?

    Bugs in Date::Calc ? Or the test suite?

    You shows some failing tests, but you don't show an attempt to install the module ...

    go ahead and install the module, don't worry about the failing tests

Re: Date::Calc Install Fails
by locked_user sundialsvc4 (Abbot) on Jan 12, 2015 at 18:31 UTC

    Well, the installer did, actually, try to tell you:

    Failed 3/51 test programs. 60/3381 subtests failed.
    dmake.exe: Error code 255, while making 'test_dynamic'

    ... but it’s not too obvious, sometimes, and it’s not always 100% reliable.   Sometimes, I find, you must download the actual package installation and/or test scripts and l-o-o-k at them.   Also, to guess that the underlying implementation might involve XS (that is to say, “C” code that is being called-upon by Perl to do the actual work ...), and especially if an interface to some .DLL or .so library might be involved.   If that is the case, then the CPAN module, and therefore its installation and its testing scripts, will be doing a lot of hand-waving ... and a lot of very- environment-specific things might be going wrong, which might be very particular to your environment.

    Another useful thing to check out at cpan.org are the open-bug reports and the “CPANTS = CPAN Testing Service” results.   Most CPAN packages are actually automatically-tested on a variety of production environments, and one of them is quite likely to resemble yours.   It might be a bit hard-to-find the necessary hyperlinks on the CPAN site, but they are there.   If “environment-specific things” might go-wrong, there’s a very good chance that The Pants™ knows about it already.