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

Morning,

I have recently installed Cygwin on my WinXP SP2 box, so i can do easy development on it. After getting perl onto it i began updating the modules that came with it to the latest CPAN versions. While doing these updates i often saw this message:
WARNING: Cannot schedule '/usr/lib/perl5/5.8/cygwin/auto/Cwd/Cwd.dll.A +AA' for deletion at reboot. Try installing Win32API::File to allow operations on locked files
Naturally i tried to follow these instructions, but came to an abrupt halt with this:
Running make test /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bli +b/lib', 'blib/arch')" t/*.t t/file....FAILED tests 2, 5-6, 13, 23-29, 31, 35 Failed 13/267 tests, 95.13% okay (less 1 skipped test: 253 oka +y, 94.76%) t/tie.....ok Failed Test Stat Wstat Total Fail List of Failed ---------------------------------------------------------------------- +--------- t/file.t 267 13 2 5-6 13 23-29 31 35 1 subtest skipped. Failed 1/2 test scripts. 13/277 subtests failed. Files=2, Tests=277, 1 wallclock secs ( 0.59 cusr + 0.15 csys = 0.74 + CPU) Failed 1/2 test programs. 13/277 subtests failed. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force Failed during this command: YVES/Win32API-File-0.1001.tar.gz : make_test NO
I've tried googling for it, but all i could find were two cpan testers reports.

Do any of you know wether there is a way to fix this? (If it makes a difference, i'm running cpan via the Cygwin bash shell.)

Replies are listed 'Best First'.
Re: Win32API under Cygwin not installing
by ysth (Canon) on Nov 12, 2006 at 21:16 UTC
    Install the perl-libwin32 cygwin package, using cygwin's setup program.
      Install the perl-libwin32 cygwin package, using cygwin's setup program

      Does that package include Win32::API ?
      Win32::API is not normally part of the libwin package ... though, faik, it could be part of the perl-libwin32 cygwin package.

      There are Win32::API packages for Cygwin (both source and compiled) at http://xarch.tu-graz.ac.at/publ/cygwin/contrib/perl-Win32-API/.

      Cheers,
      Rob
Re: Win32API under Cygwin not installing
by JSchmitz (Canon) on Nov 12, 2006 at 14:03 UTC
    Well first look at this and I would say did you try and installed using the -force option? That will install the module and ignore the failed tests. In many cases this will work.

    I have seen this error a lot and forced the install and the module has worked fine.

    I am confused? You put Cygwin on your box just to do Perl developement. If that is true is there a reason that you just didn't install Activestate Perl for Win32. Its very slick and the module updates flow like butter at a chik-fil-a store.

    ActiveState Perl

    Is there is some other reason you are using Cygwin?

    Cheers -

    Jeffery
      I usually don't use force options, unless i am fully aware of the implications. Will try this though and see what happens. My thanks. :)

      Also, yes, i did try ActiveState Perl, but got turned away from it for two reasons:
      1. I can't use CPAN::Mini with it, as it relies on the pre-compiled PPM packages. This is a distinct disadvantage, as i am often without internet.
      2. The development i do will be used on linux-based web-servers, as such i would rather execute the scripts in a similar environment, instead of having something bite me in the backside later on.
        The development i do will be used on linux-based web-servers, as such i would rather execute the scripts in a similar environment, instead of having something bite me in the backside later on.

        If you have the disk space to spare I would have thought you'd be better off installing Linux and dual-booting your PC or perhaps try a live distro like Knoppix to develop under.

        Just a thought.

        JohnGG

        I can't use CPAN::Mini with it, as it relies on the pre-compiled PPM packages

        With either a Microsoft compiler, or the freely available MinGW compiler (and the freely available dmake) you can build modules the same way on ActiveState perl as you do on Linux. Although PPM is the probably the more common route taken, it's not true that ActiveState perl is reliant upon PPM.

        Not saying you shouldn't use Cygwin's perl (though, generally, I wouldn't recommend it) ... just having a bit of a nitpick over that first reason you gave :-)

        Cheers,
        Rob