Post by Andreas J. Koeniglw> CPAN recompile -- is this supposed to update modules to the latest
lw> version or use the existing versions?
The CPAN.pm shipped with 5.8.[78] is very old.
---
Yes.
Post by Andreas J. KoenigYou should probably
upgrade CPAN.pm before you start using it extensively.
---
?Why? It's broken and you told me not to try such complex things
when things are broken, anyway... The "recompile" is an
attempted "predecessor" step to "upgrading CPAN.pm".
Let me "recap", since you are suggesting that I do steps I've
already done, that have already failed, and that I'm already
trying to work around. :-/
Originally, it was installing a module for Win32 functions that I
was told (by message in CPAN) that I had an "old" CPAN, and that
I should try upgrading it by installing Bundle::CPAN, and reloading it.
I followed that suggestion 1st. That started pulling in updated, required
pre-reqs (my pre-req-pol is set to 'follow').
While it was building the CPAN bundle and its pre-reqs, I saw scattered
messages about missing pre-reqs, on 1 or more mods; some mods said they
were incompatible with previous versions, and I was seeing regular
error/warning messages about undefined values being used (like $1 in
Util.pm, line 30) -- looking like "corrupted" (or wrongly versioned)
include files were being included.
At that point, I thought the installation might be corrupt, so decided
to reinstall and rebuild all. I did that first with 5.8.8, then back
to 5.8.7. Neither worked cleanly.
At this point, after I'd tried the CPAN bundle, tried rebuilding
and reinstalling out-of-date modules, and tried module rebuilding on top
of fresh 5.8.8 and 5.8.7 installations, that you responded, saying that
"even you" could not repair such an "installation" and that I should have
done "something else" other than trying to update my modules (which I
was trying on top of fresh 5.8.8 and then 5.8.7 cygwin packages). You
told me I'd have to start fresh and reinstall my perl, which was a bit
confusing, as that's what I had been doing and was trying to "upgrade"
the modules after installing the "distros" "downgraded" my core modules.
I.e. the steps you were suggesting were steps I'd already done multiple
times before posting.
One "nasty" problem in this particular "port" was the problem I ran
into trying to upgrade the Bundle::CPAN. One pre-requisite was the
Compress package. The 2.x version is somewhat structured differently from
how the 1.x version was organized. The problem happens when I build/test/install
the new version. By default, it goes into my local "site" library dir, "site_perl".
There, it shadows the "Core" version of Compress.
Unfortunately, the install of the new 2.x Compress fails part way through on
some pre-req (possibly Cwd.dll). This results in some 2.x headers
in the "site_dir", but not the complete set. This results in a
corrupted perl/cpan installation. The broken/incomplete 2.x Compress
shadows the base's 1.x Compress. Then cpan can't unpack distributions
because the "uncompress" part of "Compress" is one of the broken parts. So
the only easy way to continue is to either re-install the distribution (and,
manually remove the site_dir -- a perfectly sane and normal way to
reinstall perl on this platform). Maybe the build scripts on your platform
work, but the scripts porting perl to Win32 aren't as clean as they could
be under linux.
Part of this problem comes from Cwd.dll (PathTools et al) not using
Win32API to install the new library. There seem to be other problems,
but at this point, I'm getting too many overlapping incompatibilities
to make good sense of everything.
Part of the problem, is installing new DLL's over "inuse" DLL's as
demerphq mentioned to Reini. More than one module installed in
cygwin, on windows, fails due to not using demerphq's "Win32API::File".
He says if modules like "Cwd.dll" and "Storable.dll" used his API, they
would upgrade without error, but for whatever reason, they aren't
working under cygwin. Instead, they try to replace files the Unix way
(delete old file, install new one). As a result, they generate an
unhandled exception. This will cause anything that depends on "Cwd",
like Bundle CPAN, to fail when you try to upgrade it. "Fixing" it
requires manually moving the files out of the way and allowing the
install to continue (Storable failure and correction under cpan on cygwin
on winXP2)
...
/usr/bin/make test -- OK
Running make install
Cannot forceunlink /usr/lib/perl5/5.8/cygwin/auto/Storable/Storable.dll: Permision denied at /usr/lib/perl5/5.8/File/Find.pm line 918
Installing /usr/lib/perl5/5.8/cygwin/auto/Storable/libStorable.dll.a
make: *** [pure_perl_install] Error 13
/usr/bin/make install UNINST=1 -- NOT OK
# so the install fails; to work around users are to manually move files out of way and then
# reinstall...
cpan> look Storable #enter dir
Running look for module Storable
Trying to open a subshell in the build directory...
Working directory is /var/cache/CPAN/build/Storable-2.16
# (first try Unix way - delete file; should fail as we are on WinXP)
(2)/var/cache/CPAN/build/Storable-2.16> rm /usr/lib/perl5/5.8/cygwin/auto/Storable/Storable.dll
rm: cannot remove `/usr/lib/perl5/5.8/cygwin/auto/Storable/Storable.dll': Permission denied
# verified as locked, but using Win32API method posted by demerphq:
# a) rename the dll to something else
# b) install the correct dll with the correct name
# c) schedule the old dll for deletion at next boot [if necessary]
# first the move:
(2)/var/cache/CPAN/build/Storable-2.16> \
mv /usr/lib/perl5/5.8/cygwin/auto/Storable/Storable.dll \
/tmp/Storable.dll.to_delete
#
# rename works, now rerun make install...
(2)/var/cache/CPAN/build/Storable-2.16> make install UNINST=1
Installing /usr/lib/perl5/5.8/cygwin/auto/Storable/Storable.dll
# Done! I exit back into CPAN and continue ... slowly cranking
# through the various modules that don't rename or install files
# or that are not working for some other reason "this time around"
# on WinXP
Post by Andreas J. KoenigThen the
upgrade command does what you expect from the recompile command and
the recompile command has a better manpage entry.
---
The upgrade command has a better manpage entry? ...
home> man CPAN::recompile
No manual entry for CPAN::recompile
home> man CPAN::upgrade
No manual entry for CPAN::upgrade
home> man upgrade
No manual entry for upgrade
----
No mention of a "upgrade" function in the CPAN(3pm) man page either.
Do you use Perl on Cygwin on a Win-NT platform? Maybe that's
adding to the misunderstanding, though I am, sometimes, too
terse in my communications.