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

Hi, Had Strawberry Perl and Gcc. Worked GREAT! Needed BASH shell to do ./configure. Installed cygwin. Nice to have Bash!

Now, I have NO CPAN: cpan install Image::ExifTool ... Checksum for \cygdrive\d\photog\home.bpb\.cpan\sources... Image-ExifTool-10.00.tar.gz ok ... The system cannot find the path specified. Couldn't untar Image-ExifTool-10.00.tar: c

Uninstalled cygwin from instructions on http://cygwin.wikia.com/wiki/Uninstalling_Cygwin. Destroyed myriad traces in windows 7 registry. Removed all cygwin dirs... Removed all cygwin environmental variables. No trace on system drive except for 1998, *.exe *nix tools and Git has a /cygwin dir. Removed all cygwin from startup programs.

Moved strawberry.perl dir. Reinstalled latest Strawberry Perl 5.22.01

cpan still re-creates '\cygdrive\d\photog\home.bpb\.cpan...' directory. Does not use new, empty E:\strawberry_perl\cpan\... directory. Using the new cpan.bat:

d:\pic>where cpan E:\strawberry_perl\perl\bin\cpan.bat

NOTE: Reinstalled ~20 harmless, classic 1998 vintage ls.exe, rm.exe, tar.exe, where.exe, cat.exe *nix tools.

Where is this cygwin infection coming from? How to exterminate it once and for all? Rebooted

Without CPAN, none of my scripts run. Ouch!

Replies are listed 'Best First'.
Re: cygwin ATE CPAN!!!
by atcroft (Abbot) on Dec 13, 2015 at 01:49 UTC

    I have used both Strawberry Perl and Cygwin on several machines, without experiencing the kind of issue you are describing. In my Strawberry Perl installation, there is a "Perl (command line)" item which opens a command window. I would suggest you open that, type in perl -MCPAN -e "shell;", then type in the command o conf and examine the values. My hunch is that the values have been "crossed" in some way. If that is the case, I believe you can use the command o conf variable value, followed by o conf commit to correct the appropriate values before retrying.

    Hope that helps.

      Atcroft,

      You were right on the $$ about the source of the config weirdness. cygwin had scattered many copies of /<drive_root>cygwin and home.brianp directories. I had missed one on an obscure, deeply buried location on one of my data drives.

      Got everything pointing to the new Strawberry Perl location. But a number of the builds are failing; Image(Perl)Magick and ExifTool. I am going to reinstall ImageMagick. Not sure about ExifTool.

      Trying to build imagemagick from source to link it into my C programs was what got me venturing into this quagmire in the first place. The (Open_Source) IM gang only supports the msvc compiler on windoz and my research suggests that you have to use the same (32bit) compiler and the same (i386??) optimizations to link to their binary distributions.

      The good news is that GD works like a charm and is a Speed Daemon with GCC/64 bit. Can hardly wait to try it out on Intel!

      Thanks 1E6

      B
      JCRISTY/PerlMagick-6.89-1.tar.gz E:\STRAWB~1\c\bin\dmake.exe -- OK Running make test "E:\strawberry_perl\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTe +st::Harnes s" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', ' +blib\arch' )" t/*.t t/bzlib/*.t t/jpeg/*.t t/png/*.t t/tiff/*.t t/wmf/*.t t/zlib/ +*.t t/blob.t .......... ok t/bzlib/read.t .... ok t/bzlib/write.t ... ok t/composite.t ..... ok t/filter.t ........ ok t/getattribute.t .. ok t/jpeg/read.t ..... ok t/jpeg/write.t .... ok t/montage.t ....... Failed 2/19 subtests t/ping.t .......... ok t/png/read-16.t ... ok t/png/read.t ...... ok t/png/write-16.t .. ok t/png/write.t ..... ok t/read.t .......... ok t/setattribute.t .. ok t/tiff/read.t ..... ok t/tiff/write.t .... ok t/wmf/read.t ...... Failed 2/2 subtests t/write.t ......... ok t/zlib/read.t ..... ok t/zlib/write.t .... ok Test Summary Report ------------------- t/montage.t (Wstat: 0 Tests: 19 Failed: 2) Failed tests: 12-13 t/wmf/read.t (Wstat: 0 Tests: 2 Failed: 2) Failed tests: 1-2 Files=22, Tests=333, 38 wallclock secs ( 0.16 usr + 0.06 sys = 0.22 +CPU) Result: FAIL Failed 2/22 test programs. 4/333 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic' JCRISTY/PerlMagick-6.89-1.tar.gz E:\STRAWB~1\c\bin\dmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports JCRISTY/PerlMagick-6.89-1.tar.gz Stopping: 'install' failed for 'Image::Magick'.
        The (Open_Source) IM gang only supports the msvc compiler on windoz and my research suggests that you have to use the same (32bit) compiler and the same (i386??) optimizations to link to their binary distributions.

        But doesn't your Strawberry build link to their binary distributions ?
        Mine used their dlls, though I (perhaps unnecessarily) rebuilt the import libs from those dlls using gendef and dlltool.

        I get the same test failures as you ... though, occasionally, the montage tests succeed.

        Do you know how siginificant those failures are ? (I don't.)
        They're not *obviously* of far-reaching siginificance:
        C:\sisyphusion\Image-Magick-6.89>perl t/montage.t 1..19 ..... Test 12, signatures do not match. Expected: bcd96dabb454c5d25091422763b1cdecb6a69a9b02b84a5b7fa0a70 +f150b957c Computed: f1ed563cf9a446dd4516945b475bc21692037d0c12a83405a837abc +bdf37bcf7 Depth: 16 not ok 12 Test 13, signatures do not match. Expected: 9209b2db884fa4730eeab6c410b90e094fa305635baab7ede17270c +13f6e80ad Computed: c09fb4e6033eb562b277dc2d8d5b61e4255b56ee9c666011d18e4fe +7fbee994b Depth: 16 not ok 13 ..... C:\sisyphusion\Image-Magick-6.89>perl t/wmf/read.t 1..2 mean-error=1.00003051827663, maximum-error=1 not ok 1 mean-error=1.00003051827663, maximum-error=1 not ok 2
        Even the slightest and most insignificant variation would result in a failed signature match.
        And 1.00003051827663 is only just outside the "maximum-error".

        Cheers,
        Rob
        The (Open_Source) IM gang only supports the msvc compiler on windoz and my research suggests that you have to use the same (32bit) compiler and the same (i386??) optimizations to link to their binary distributions.

        But doesn't your Strawberry build link to their binary distributions ?
        Mine used their dlls, though I (perhaps unnecessarily) rebuilt the import libs from those dlls using gendef and dlltool.

        I get the same test failures as you ... though, occasionally, the montage tests succeed.

        Do you know how siginificant those failures are ? (I don't.)
        They're not *obviously* of far-reaching siginificance:
        C:\sisyphusion\Image-Magick-6.89>perl t/montage.t 1..19 ..... Test 12, signatures do not match. Expected: bcd96dabb454c5d25091422763b1cdecb6a69a9b02b84a5b7fa0a70 +f150b957c Computed: f1ed563cf9a446dd4516945b475bc21692037d0c12a83405a837abc +bdf37bcf7 Depth: 16 not ok 12 Test 13, signatures do not match. Expected: 9209b2db884fa4730eeab6c410b90e094fa305635baab7ede17270c +13f6e80ad Computed: c09fb4e6033eb562b277dc2d8d5b61e4255b56ee9c666011d18e4fe +7fbee994b Depth: 16 not ok 13 ..... C:\sisyphusion\Image-Magick-6.89>perl t/wmf/read.t 1..2 mean-error=1.00003051827663, maximum-error=1 not ok 1 mean-error=1.00003051827663, maximum-error=1 not ok 2
        Even the slightest and most insignificant variation would result in a failed signature match.
        And 1.00003051827663 is only just outside the "maximum-error".

        Cheers,
        Rob
Re: cygwin ATE CPAN!!!
by syphilis (Archbishop) on Dec 13, 2015 at 04:47 UTC
    cpan still re-creates '\cygdrive\d\photog\home.bpb\.cpan...' directory.

    This is by running Strawberry's cpan.bat ??
    If so, then there must still be some remnant of Cygwin in your system environment variables.
    In a cmd.exe shell run
    set >set.txt
    Then search the generated set.txt for occurrences of "cygdrive".

    Does it really matter what the name of the cpan build directory is ?

    If you're going to have more than one perl on a machine I think it's a good idea to make sure that *none* of them are in the Windows system path.
    If there's no perl in the system path when you install Cygwin (or msys/msys2 - which was probably more suited to your needs) then you'll know that there will be only the one perl in the path that Cygwin's (or msys') bash shell sets up, and that perl will be the perl that ships with Cygwin (or msys).
    This also means that there is no perl in the cmd.exe shell's path when you open one up.
    This leaves you free to prefix/suffix the path with additional perls (to either a cmd or bash shell) as you want.

    Last time I tried it, the Strawberry Perl installer wanted to prepend Strawberry Perl (and gcc) to the system path.
    Therefore the 6 versions of Strawberry that I have are installations of a "Portable" Strawberry Perl distro - as installing the "Portable" disatro doesn't mess with the system path.

    If I want to run a particular Strawberry Perl I just have to doubleclick the portableshell.bat that shipped with that portable Strawberry Perl (in its top level directory).
    If I want to use Cygwin's perl I just need to start Cygwin's bash shell.
    If I want to use msys' perl (which is extremely rarely) then I just need to open up an msys' bash shell.
    And if I want to start up one of the other 20 or so Windows perls that I have then I just have to open a cmd.exe shell and then add that perl to the path (for the life of that shell).

    As far as I know:
    It's to be expected that, for Cygwin, cpan will select its $ENV{HOME} as the location of the .cpan directory, whereas Strawberry's cpan will select a different ($ENV{HOMEPATH}) location.
    (I'm not sure if msys or msys2 ship with perl - but it's $ENV{HOME} will be separate from both Cygwin's $ENV{$HOME} and Strawberry's $ENV{HOMEPATH}.)

    Cheers,
    Rob

      Rob, >> C:\sisyphusion\Image-Magick-6.89>perl t/montage.t ... >> Test 12, signatures do not match.

      I just copied IM over from my dead install and it works. The errors for ExifTool were for some other language I do not read so I just installed it by hand. All is well!

      When I Upgraded to the newer Strawberry, I did get the portable one. I think one user, one Perl, one GCC keeps things simple. If I need another GCC, I can use another user. But I like U65's idea even better, real Linux on a VM. When I dual boot to OpenSuse, the configure flies off the screen in a blur rather than crawling at umpteen seconds per line like with windoz on the same machine. The build is effortless. I may try a cross compile next time.

      The thought of having Real Linux running under windoz is a pipe dream. cyg was never more than a half-fast, pale imitation of Linux that has greatly disappointed me all 4 times I have tried it over the past decade. Once it's X thrashed my window manager and I had to reinstall the os. It always seems to prey on the rest of the system. I wonder if msys2 would be more considerate. When adope finally breaks photoshop with on OTA update to force all users onto their rent-a-cloud, I am going to throw winders out the window once and for all!

      Off to setup a VM...
      B

Re: cygwin ATE CPAN!!!
by karlgoethebier (Abbot) on Dec 13, 2015 at 17:52 UTC
Re: cygwin ATE CPAN!!!
by u65 (Chaplain) on Dec 13, 2015 at 11:32 UTC

    My 2 cents: I appreciate the hard work that goes into cygwin, but when needing a *nix environment in Win-centric shops I left it a long time ago for either dual boot or, better IMHO for needing both OS's full time, some VM running *nix. My preference in a smallish ops is VirtualBox with a Debian guest. Cygwin was extra pain for me to run because I was never happy with the terminals and command line use. Frankly I am surprised cygwin is still supported.