in reply to Re^2: help fixing module paths after upgrading perl in cygwin
in thread help fixing module paths after upgrading perl in cygwin

"I see that you have multiple versions of perl installed via Cygwin."

No, that's not what you're seeing. I'd guess you're making some incorrect assumptions; although, I don't know exactly what they might be. Let me be specific about what I have.

Five versions of Perl installed via Perlbrew.

$ perlbrew list * perl-5.36.0 perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0

One version of Perl installed via Cygwin. This exists under three filenames which are hard copies; note the identical inode numbers. All are Perl v5.32.1.

$ ls -ali /usr/bin/perl /usr/bin/perl* 1125899907799520 -rwxr-xr-x 2 ken None 12800 Aug 14 2021 /usr/bin/per +l 1125899907799520 -rwxr-xr-x 2 ken None 12800 Aug 14 2021 /usr/bin/per +l.exe 1125899907799520 -rwxr-xr-x 2 ken None 12800 Aug 14 2021 /usr/bin/per +l5.32.1.exe ... $ /usr/bin/perl -v | head -3 | tail -2 This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-cy +gwin-threads-multi (with 7 registered patches, see perl -V for more detail) $ /usr/bin/perl.exe -v | head -3 | tail -2 This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-cy +gwin-threads-multi (with 7 registered patches, see perl -V for more detail) $ /usr/bin/perl5.32.1.exe -v | head -3 | tail -2 This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-cy +gwin-threads-multi (with 7 registered patches, see perl -V for more detail)
"Did my perl5.30.3.exe modules really get uninstalled when I installed 5.32?"

That would be my guess; but it is only a guess. When I run setup-x86_64.exe to do updates, I'm presented with a list of what will be uninstalled and what will be installed, and the option to proceed or not. I used to be very diligent and checked that list every time; over the years, as I've never had any problems, that diligence has somewhat fallen by the wayside. I assume you're not checking that list either.

There are two logfiles: /var/log/setup.log & /var/log/setup.log.full. I haven't spent any time in the past looking at those, so this is as much discovery for me as it will presumably be for you. As far as I can tell, these are overwritten with each update, so you may want to make backup copies before doing anything else. Also note that these are likely to be huge files. Here's what I have (and bear in mind that I'm updating weekly). If you're updating less frequently, yours may be substantially larger.

$ ls -l /var/log/setup.log /var/log/setup.log.full -rw-r--r-- 1 ken Administrators 10998164 Oct 21 16:19 /var/log/setup.l +og -rw-r--r-- 1 ken Administrators 1797726 Oct 21 16:19 /var/log/setup.l +og.full

By the way, I've no idea why setup.log.full is so much smaller than setup.log. I'll leave you to research that and report back. :-)

There were not many "perl" updates since I ran setup-x86_64.exe last week, so I find:

$ grep 'Uninstalling perl' /var/log/setup.log.full 2022/10/21 16:10:37 Uninstalling perl-DateTime-TimeZone 2022/10/21 16:10:37 Uninstalling perl-Exporter-Tiny 2022/10/21 16:10:37 Uninstalling perl-HTML-Parser-debuginfo 2022/10/21 16:10:37 Uninstalling perl-Mojolicious 2022/10/21 16:10:38 Uninstalling perl-URI 2022/10/21 16:10:38 Uninstalling perl-HTTP-Message 2022/10/21 16:10:39 Uninstalling perl-HTML-Parser

You may have some or all of those; you may have a lot more. If you open the logfile and search for those lines, you'll find a lot more information regarding individual components of those packages. There's also information about what was installed (which I didn't actually spend any time studying).

"If you go to the /usr/share/perl5/<version>/ directories, does each one have a separate copy of each built-in module?"

I don't have multiples of those directories. I just have this one:

$ ls -ld /usr/share/perl5/5* drwxr-xr-x 1 ken None 0 Aug 13 10:48 /usr/share/perl5/5.32

As I indicated earlier, I'm surprised you have both a v5.30.3 and a v5.32.1. Perhaps you (inadvertently) selected "keep" (for the program but not the modules) when doing the update. If you're prepared to spend the time to trawl through the logs, I suspect you'll find the answer there — they seem to be very thorough and detailed.

So, there's a lot of work just to find out what went wrong. I think taking a pragmatic approach, putting the current problems behind you, installing Perlbrew, and not having these issues again, may be the best way to go.

— Ken

Replies are listed 'Best First'.
Re^4: help fixing module paths after upgrading perl in cygwin
by Special_K (Pilgrim) on Oct 24, 2022 at 21:38 UTC
    Thanks for letting me know about /var/log/setup.log & /var/log/setup.log.full. I spent a few minutes looking through them and found this:
    2021/04/19 19:30:44 19 install perl_base + 5.32.1-1 2021/04/19 19:30:44 20 erase perl_base + 5.30.3-1

    and this:
    2021/04/19 19:30:44 150 install perl + 5.32.1-1 2021/04/19 19:30:44 151 erase perl + 5.30.3-1

    and several other similar pairs of messages. So it appears cygwin deleted 5.30.3-1 when it installed 5.32.1-1, I just didn't read the cygwin setup page closely enough before clicking "Next". It appears all of the modules I installed while using 5.30 are still located at /usr/local/share/perl5/site_perl/5.30/, it's just that some core components of perl 5.30 appear to have been deleted.

    I will use Perlbrew to manage multiple Perl versions from now on.