* missing perl directories @ 2021-01-21 16:09 Anthony Heading 2021-01-21 16:22 ` Marco Atzeri ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Anthony Heading @ 2021-01-21 16:09 UTC (permalink / raw) To: cygwin Hi, Whenever I have a new cygwin setup, I get an error/warning when trying to install perl modules: % cpan install Win32::Symlink Loading internal logger. Log::Log4perl recommended for better logging [...] Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.30/App/Cpan.pm line 679, <STDIN> line 1. Warning: You do not have write permission for Perl library directories. I think it is just because the site_perl directories do not exist. % perl -V Summary of my perl5 (revision 5 version 30 subversion 3) configuration: [...] @INC: /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-threads /usr/share/perl5/5.30 ls: cannot access '/usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads': No such file or directory ls: cannot access '/usr/local/share/perl5/site_perl/5.30': No such file or directory If I simply create these empty directories the problem goes away. Could the perl package just include these empty directories? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-21 16:09 missing perl directories Anthony Heading @ 2021-01-21 16:22 ` Marco Atzeri 2021-01-22 7:33 ` Brian Inglis 2021-01-22 19:35 ` Achim Gratz 2 siblings, 0 replies; 12+ messages in thread From: Marco Atzeri @ 2021-01-21 16:22 UTC (permalink / raw) To: cygwin On 21.01.2021 17:09, Anthony Heading wrote: > Hi, > > Whenever I have a new cygwin setup, I get an error/warning when trying to install perl modules: > > > ls: cannot access '/usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads': No such file or directory > ls: cannot access '/usr/local/share/perl5/site_perl/5.30': No such file or directory > > If I simply create these empty directories the problem goes away. > > Could the perl package just include these empty directories? /usr/local/* are "local" no package should touch them Marco ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-21 16:09 missing perl directories Anthony Heading 2021-01-21 16:22 ` Marco Atzeri @ 2021-01-22 7:33 ` Brian Inglis 2021-01-22 16:15 ` Anthony Heading 2021-01-22 19:35 ` Achim Gratz 2 siblings, 1 reply; 12+ messages in thread From: Brian Inglis @ 2021-01-22 7:33 UTC (permalink / raw) To: cygwin On 2021-01-21 09:09, Anthony Heading wrote: > Whenever I have a new cygwin setup, I get an error/warning when trying to install perl modules: > > % cpan install Win32::Symlink > Loading internal logger. Log::Log4perl recommended for better logging > [...] > Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.30/App/Cpan.pm line 679, <STDIN> line 1. > Warning: You do not have write permission for Perl library directories. > > I think it is just because the site_perl directories do not exist. > > % perl -V > Summary of my perl5 (revision 5 version 30 subversion 3) configuration: > [...] > @INC: > /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads > /usr/local/share/perl5/site_perl/5.30 > /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads > /usr/share/perl5/vendor_perl/5.30 > /usr/lib/perl5/5.30/x86_64-cygwin-threads > /usr/share/perl5/5.30 > > ls: cannot access '/usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads': No such file or directory > ls: cannot access '/usr/local/share/perl5/site_perl/5.30': No such file or directory > > If I simply create these empty directories the problem goes away. > > Could the perl package just include these empty directories? I don't knowingly use perl packages but I have those directories: $ perl -V | tail -6 | xargs ls -d /usr/lib/perl5/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/5.30 /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.30 either something has not completed correctly, or something is missing in recent installations. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 7:33 ` Brian Inglis @ 2021-01-22 16:15 ` Anthony Heading 2021-01-22 16:36 ` Marco Atzeri 0 siblings, 1 reply; 12+ messages in thread From: Anthony Heading @ 2021-01-22 16:15 UTC (permalink / raw) To: cygwin Hi Brian! On Fri, Jan 22, 2021, at 7:33 AM, Brian Inglis wrote: > either something has not completed correctly, or something is missing in recent > installations. I think that's right. Those the directories which are referenced in the binary, I know the generic upstream perl source process has always created them, but they're not included in the current cygwin package. As a total guess, empty directories are maybe now being elided in the cygwin packaging process? % strings - /bin/cygperl5_30.dll | grep /usr/local /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 % cygcheck -p site_perl Found 4 matches for site_perl grepmail-5.3033-2 - grepmail: search mailboxes for mail matching an expression (installed binaries and support files) perl-Stow-2.3.1-1 - perl-Stow: perl library for stow perl-Stow-2.3.1-2 - perl-Stow: Perl library for stow perl-Stow-2.3.1-3 - perl-Stow: Perl library for stow On Thu, Jan 21, 2021, at 4:22 PM, Marco Atzeri via Cygwin wrote: > /usr/local/* are "local" > > no package should touch them Marco, I have no idea how to interpret that statement constructively. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 16:15 ` Anthony Heading @ 2021-01-22 16:36 ` Marco Atzeri 2021-01-22 17:53 ` Anthony Heading 0 siblings, 1 reply; 12+ messages in thread From: Marco Atzeri @ 2021-01-22 16:36 UTC (permalink / raw) To: cygwin On 22.01.2021 17:15, Anthony Heading wrote: > Hi Brian! > > On Fri, Jan 22, 2021, at 7:33 AM, Brian Inglis wrote: >> either something has not completed correctly, or something is missing in recent >> installations. > > I think that's right. Those the directories which are referenced in the binary, I know the generic upstream perl source process has always created them, but they're not included in the current cygwin package. As a total guess, empty directories are maybe now being elided in the cygwin packaging process? > > % strings - /bin/cygperl5_30.dll | grep /usr/local > /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads > /usr/local/share/perl5/site_perl/5.30 > > % cygcheck -p site_perl > Found 4 matches for site_perl > grepmail-5.3033-2 - grepmail: search mailboxes for mail matching an expression (installed binaries and support files) > perl-Stow-2.3.1-1 - perl-Stow: perl library for stow > perl-Stow-2.3.1-2 - perl-Stow: Perl library for stow > perl-Stow-2.3.1-3 - perl-Stow: Perl library for stow not on usr/local perl-Stow: Perl library for stow 2020-02-04 19:14 0 usr/share/perl5/ 2020-02-04 19:14 0 usr/share/perl5/site_perl/ 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/ 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/Stow/ 2020-02-04 19:14 5559 usr/share/perl5/site_perl/5.30/Stow/Util.pm 2020-02-04 19:14 70081 usr/share/perl5/site_perl/5.30/Stow.pm >> no package should touch them > > Marco, I have no idea how to interpret that statement constructively. Sorry, I should have be more clear. We can discuss if the perl package should deliver empty directories like usr/share/perl5/site_perl/ and similar. It seems reasonable but I am not a Perl expert, however a distribution package should never write on "/usr/local" https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html " The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated" Regards Marco ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 16:36 ` Marco Atzeri @ 2021-01-22 17:53 ` Anthony Heading 2021-01-22 19:43 ` Ken Brown 2021-01-22 20:29 ` Achim Gratz 0 siblings, 2 replies; 12+ messages in thread From: Anthony Heading @ 2021-01-22 17:53 UTC (permalink / raw) To: Marco Atzeri via Cygwin On Fri, Jan 22, 2021, at 4:36 PM, Marco Atzeri via Cygwin wrote: > > not on usr/local > > perl-Stow: Perl library for stow > > 2020-02-04 19:14 0 usr/share/perl5/ > 2020-02-04 19:14 0 usr/share/perl5/site_perl/ > 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/ > 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/Stow/ > 2020-02-04 19:14 5559 > usr/share/perl5/site_perl/5.30/Stow/Util.pm > 2020-02-04 19:14 70081 usr/share/perl5/site_perl/5.30/Stow.pm > Correct. And of course that means this Stow package doesn't actually work: % perl -MStow -e '' Can't locate Stow.pm in @INC (you may need to install the Stow module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-threads /usr/share/perl5/5.30). Similar to your reference to the FHS, the corresponding Perl policy intends that "site_perl" is to be used by the local SA. There is a "vendor_perl" concept instead to support this kind of cygwin packaging, as you can see referenced in the default path above. But the Stow example is a distraction which compounds two problems, so let's leave that aside. At core, this is catch 22. - The perl build reserves, creates, and expects to exist, an empty directory for the sole use of the SA: "site_perl". - Cygwin perl assigns that directory location into the tree similarly intended for the SA: "/usr/local" - Your strict interpretation of the FHS disallows the empty site_perl directory to be created for use by the SA because it's positioned within a tree reserved for use by the SA I dunno, Marco, I'm not so dogmatic, and I can fix my own installation. I just thought this would be a helpful bug report for others. It sounds like we can find enough conflicting Cygwin policy documents to ensure that there is no solution, so that's delightful. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 17:53 ` Anthony Heading @ 2021-01-22 19:43 ` Ken Brown 2021-01-22 20:29 ` Achim Gratz 1 sibling, 0 replies; 12+ messages in thread From: Ken Brown @ 2021-01-22 19:43 UTC (permalink / raw) To: cygwin On 1/22/2021 12:53 PM, Anthony Heading wrote: > On Fri, Jan 22, 2021, at 4:36 PM, Marco Atzeri via Cygwin wrote: >> >> not on usr/local >> >> perl-Stow: Perl library for stow >> >> 2020-02-04 19:14 0 usr/share/perl5/ >> 2020-02-04 19:14 0 usr/share/perl5/site_perl/ >> 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/ >> 2020-02-04 19:14 0 usr/share/perl5/site_perl/5.30/Stow/ >> 2020-02-04 19:14 5559 >> usr/share/perl5/site_perl/5.30/Stow/Util.pm >> 2020-02-04 19:14 70081 usr/share/perl5/site_perl/5.30/Stow.pm >> > > Correct. And of course that means this Stow package doesn't actually work: Achim has already answered your original question, but I just want to chime in to correct your misstatement. > % perl -MStow -e '' > Can't locate Stow.pm in @INC (you may need to install the Stow module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-threads /usr/share/perl5/5.30) perl-Stow works fine. It's intended to be used by /usr/bin/stow, which knows where to find it. Ken ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 17:53 ` Anthony Heading 2021-01-22 19:43 ` Ken Brown @ 2021-01-22 20:29 ` Achim Gratz 1 sibling, 0 replies; 12+ messages in thread From: Achim Gratz @ 2021-01-22 20:29 UTC (permalink / raw) To: cygwin Anthony Heading writes: > On Fri, Jan 22, 2021, at 4:36 PM, Marco Atzeri via Cygwin wrote: >> 2020-02-04 19:14 70081 usr/share/perl5/site_perl/5.30/Stow.pm That's a known packaging error caused by the stow configury / Makefile using its own special idea of installsitelib instead of installvendorlib (or at least installsitelib) from the existing Perl. --8<---------------cut here---------------start------------->8--- # Perl modules will be installed to ${prefix}/share/perl5/site_perl/5.30 # which will expand to # # /usr/share/perl5/site_perl/5.30 # # unless you override the value of prefix at make-time. config.status: creating Makefile make[1]: Entering directory '/cygdrive/c/Users/ASSI/CygwinHome/stow/stow.noarch/build' make[1]: Leaving directory '/cygdrive/c/Users/ASSI/CygwinHome/stow/stow.noarch/build' [ -d bin ] || mkdir bin # required in vpath mode # Perl modules will be installed to /usr/share/perl5/site_perl/5.30 # # This is not in /usr/bin/perl's built-in @INC, so the # front-end scripts will have an appropriate "use lib" # line inserted to compensate. --8<---------------cut here---------------end--------------->8--- Andrew, should you read this, putting --8<---------------cut here---------------start------------->8--- CYGCONF_ARGS="--with-pmdir=$(perl -MConfig -e 'print $Config{installvendorlib}')" --8<---------------cut here---------------end--------------->8--- into stow.cygport should resolve that problem. > Correct. And of course that means this Stow package doesn't actually work: > > % perl -MStow -e '' > Can't locate Stow.pm in @INC (you may need to install the Stow module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-threads /usr/share/perl5/5.30). It's a captive backend for the GNU stow application and stow sets up @INC so that it does work correctly in that context. There are no other users of that module that I know of. > At core, this is catch 22. > > - The perl build reserves, creates, and expects to exist, an empty > directory for the sole use of the SA: "site_perl". Again, it doesn't. If you (the SA) put files there they will be used by default, but it's not an error for that path or any leading components to not exist. > - Cygwin perl assigns that directory location into the tree > similarly intended for the SA: "/usr/local" Yes and it does that since several years (I think with the switch to 5.26). I'd have to dig out who requested it and why, but it was changed deliberately to separate the Cygwin and local installation, likely following Fedora and some other Linux distributions. > - Your strict interpretation of the FHS disallows the empty > site_perl directory to be created for use by the SA because it's > positioned within a tree reserved for use by the SA Yes, but since you don't need to create them there is no problem that needs solving. > I dunno, Marco, I'm not so dogmatic, and I can fix my own > installation. I just thought this would be a helpful bug report for > others. It sounds like we can find enough conflicting Cygwin policy > documents to ensure that there is no solution, so that's delightful. So what's your point here, then? Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-21 16:09 missing perl directories Anthony Heading 2021-01-21 16:22 ` Marco Atzeri 2021-01-22 7:33 ` Brian Inglis @ 2021-01-22 19:35 ` Achim Gratz 2021-01-22 21:05 ` Anthony Heading 2 siblings, 1 reply; 12+ messages in thread From: Achim Gratz @ 2021-01-22 19:35 UTC (permalink / raw) To: cygwin Anthony Heading writes: > Whenever I have a new cygwin setup, I get an error/warning when trying to install perl modules: > > % cpan install Win32::Symlink > Loading internal logger. Log::Log4perl recommended for better logging > [...] > Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.30/App/Cpan.pm line 679, <STDIN> line 1. > Warning: You do not have write permission for Perl library directories. > > I think it is just because the site_perl directories do not exist. No, I don't get these warnings, so it's something on your system that triggers these. $ rm -fr /usr/local/{lib,share} $ cpan install Win32::Symlink CPAN: CPAN::SQLite loaded ok (v0.219) Database was generated on Fri, 22 Jan 2021 19:19:22 GMT Running install for module 'Win32::Symlink' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.096) Checksum for /cygdrive/c/Users/ASSI/CygwinHome/.local/share/.cpan/sources/authors/id/A/AU/AUDREYT/Win32-Symlink-0.06.tar.gz ok CPAN: YAML::XS loaded ok (v0.82) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) Configuring A/AU/AUDREYT/Win32-Symlink-0.06.tar.gz with Makefile.PL Cannot determine license info from Symlink.pm Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Win32::Symlink Writing MYMETA.yml and MYMETA.json AUDREYT/Win32-Symlink-0.06.tar.gz /usr/bin/perl Makefile.PL -- OK Running make for A/AU/AUDREYT/Win32-Symlink-0.06.tar.gz CPAN: Module::CoreList loaded ok (v5.20200601_30) cp Symlink.pm blib/lib/Win32/Symlink.pm Running Mkbootstrap for Symlink () chmod 644 "Symlink.bs" "/usr/bin/perl.exe" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Symlink.bs blib/arch/auto/Win32/Symlink/Symlink.bs 644 "/usr/bin/perl.exe" "-Iinc" "/usr/share/perl5/vendor_perl/5.30/ExtUtils/xsubpp" -typemap '/usr/share/perl5/5.30/ExtUtils/typemap' -typemap '/cygdrive/c/Users/ASSI/CygwinHome/.local/share/.cpan/build/Win32-Symlink-0.06-1/typemap' Symlink.xs > Symlink.xsc Please specify prototyping behavior for Symlink.xs (see perlxs manual) mv Symlink.xsc Symlink.c gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/build=/usr/src/debug/perl-5.30.3-1 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/src/perl-5.30.3=/usr/src/debug/perl-5.30.3-1 -fwrapv -fno-strict-aliasing -DUSEIMPORTLIB -O3 -DVERSION=\"0.06\" -DXS_VERSION=\"0.06\" "-I/usr/lib/perl5/5.30/x86_64-cygwin-threads/CORE" Symlink.c rm -f blib/arch/auto/Win32/Symlink/Symlink.dll g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong Symlink.o -o blib/arch/auto/Win32/Symlink/Symlink.dll \ /usr/lib/perl5/5.30/x86_64-cygwin-threads/CORE/cygperl5_30.dll -lpthread -lnsl -ldl -lcrypt \ chmod 755 blib/arch/auto/Win32/Symlink/Symlink.dll Manifying 1 pod document AUDREYT/Win32-Symlink-0.06.tar.gz /usr/bin/make -- OK Running make test for AUDREYT/Win32-Symlink-0.06.tar.gz "/usr/bin/perl.exe" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Symlink.bs blib/arch/auto/Win32/Symlink/Symlink.bs 644 PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/1-basic.t .. ok All tests successful. Files=1, Tests=4, 1 wallclock secs ( 0.05 usr 0.03 sys + 0.09 cusr 0.06 csys = 0.23 CPU) Result: PASS AUDREYT/Win32-Symlink-0.06.tar.gz /usr/bin/make test -- OK Running make install for AUDREYT/Win32-Symlink-0.06.tar.gz "/usr/bin/perl.exe" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Symlink.bs blib/arch/auto/Win32/Symlink/Symlink.bs 644 Manifying 1 pod document Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads/auto/Win32/Symlink/Symlink.dll Installing /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads/Win32/Symlink.pm Installing /usr/local/share/man/man3/Win32.Symlink.3pm Appending installation info to /usr/lib/perl5/5.30/x86_64-cygwin-threads/perllocal.pod AUDREYT/Win32-Symlink-0.06.tar.gz /usr/bin/make install -- OK $ For good measure I repeated this with /usr/local not existing at all and the result stays the same. > % perl -V > Summary of my perl5 (revision 5 version 30 subversion 3) configuration: > [...] > @INC: > /usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads > /usr/local/share/perl5/site_perl/5.30 > /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads > /usr/share/perl5/vendor_perl/5.30 > /usr/lib/perl5/5.30/x86_64-cygwin-threads > /usr/share/perl5/5.30 > > ls: cannot access '/usr/local/lib/perl5/site_perl/5.30/x86_64-cygwin-threads': No such file or directory > ls: cannot access '/usr/local/share/perl5/site_perl/5.30': No such file or directory > > If I simply create these empty directories the problem goes away. If its just a warning then there really isn't a problem that needs fixing, but anyway there is no presumtption that the site directories must exist anyway. All installation methods are supposed to create leading path components. > Could the perl package just include these empty directories? See above and /usr/local is off-limits for packaging. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 19:35 ` Achim Gratz @ 2021-01-22 21:05 ` Anthony Heading 2021-01-23 19:08 ` Achim Gratz 0 siblings, 1 reply; 12+ messages in thread From: Anthony Heading @ 2021-01-22 21:05 UTC (permalink / raw) To: Marco Atzeri via Cygwin On Fri, Jan 22, 2021, at 7:35 PM, Achim Gratz wrote: > > For good measure I repeated this with /usr/local not existing at all and > the result stays the same. Achim, that was a helpful test, thankyou. Digging further, the triggering perl code in /usr/share/perl5/5.30/CPAN/FirstTime.pm, so to replicate I also need to delete my ~/.cpan directory. Could you try doing that too and see if you agree? Here's the fuller problem, which is more than a cosmetic warning: ================ % cpan install Win32::Symlink Loading internal logger. Log::Log4perl recommended for better logging CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes] Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.30/App/Cpan.pm line 679, <STDIN> line 1. Warning: You do not have write permission for Perl library directories. To install modules, you need to configure a local Perl library directory or escalate your privileges. CPAN can help you by bootstrapping the local::lib module or by configuring itself to use 'sudo' (if available). You may also resolve this problem manually if you need to customize your setup. What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') [local::lib] [...] ================ So the _apparent_ lack of write permission triggers a whole load of privilege escalation machinery which is unnecessary. This code is in unless ( $matcher || _can_write_to_libdirs() || _using_installbase() || _using_sudo() ) { local $auto_config = 0; # We *must* ask, even under autoconfig local *_real_prompt; # We *must* show prompt my_prompt_loop(install_help => 'local::lib', $matcher, 'local::lib|sudo|manual'); } and the core test on that looks like this: sub _can_write_to_libdirs { return -w $Config{installprivlib} && -w $Config{installarchlib} && -w $Config{installsitelib} && -w $Config{installsitearch} } hence there is an assumption that these directories exist. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-22 21:05 ` Anthony Heading @ 2021-01-23 19:08 ` Achim Gratz 2021-01-24 16:14 ` Anthony Heading 0 siblings, 1 reply; 12+ messages in thread From: Achim Gratz @ 2021-01-23 19:08 UTC (permalink / raw) To: cygwin Anthony Heading writes: […] > What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') > [local::lib] Well, just say "manual" at this prompt to override the heuristics for switching to local::lib, then. Alternatively you can report it upstream so that this check is properly guarded (if the leading path is writable by the current user then local::lib is not necessary). In general, if you install Cygwin often enough for this to be a nuisance I'd recommend adding a package to your local repo that sets up such things in a postinstall script. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: missing perl directories 2021-01-23 19:08 ` Achim Gratz @ 2021-01-24 16:14 ` Anthony Heading 0 siblings, 0 replies; 12+ messages in thread From: Anthony Heading @ 2021-01-24 16:14 UTC (permalink / raw) To: Marco Atzeri via Cygwin On Sat, Jan 23, 2021, at 7:08 PM, Achim Gratz wrote: > Anthony Heading writes: > […] > > What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') > > [local::lib] > > Well, just say "manual" at this prompt to override the heuristics for > switching to local::lib, then. Alternatively you can report it upstream > so that this check is properly guarded (if the leading path is writable > by the current user then local::lib is not necessary). I couldn't say whether there are additional parts of the CPAN ecosystem that are surprised by the site_perl directories having been deleted. And indeed maybe 'manual' works as a bypass, though it's not obvious. > In general, if you install Cygwin often enough for this to be a nuisance > I'd recommend adding a package to your local repo that sets up such > things in a postinstall script. > Sure. I like Cygwin and I install it a lot (so thank-you btw to everyone!), but there is an easy workaround once you know. As I said before, it's just a bug report because the final result of packaging is slightly broken and would certainly confuse new users. But then again, I'm of a certain age; the new generation uses python and chromebooks so maybe there are no new users :-) I think the issue is sufficiently understood, have appreciated the discussion. Rgds A ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-01-24 16:15 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-21 16:09 missing perl directories Anthony Heading 2021-01-21 16:22 ` Marco Atzeri 2021-01-22 7:33 ` Brian Inglis 2021-01-22 16:15 ` Anthony Heading 2021-01-22 16:36 ` Marco Atzeri 2021-01-22 17:53 ` Anthony Heading 2021-01-22 19:43 ` Ken Brown 2021-01-22 20:29 ` Achim Gratz 2021-01-22 19:35 ` Achim Gratz 2021-01-22 21:05 ` Anthony Heading 2021-01-23 19:08 ` Achim Gratz 2021-01-24 16:14 ` Anthony Heading
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).