On Wed, Aug 05, 2020 at 10:03:52PM +0100, Ken Moffat via lfs-dev wrote:
> On Thu, Aug 06, 2020 at 03:57:29AM +0800, Xi Ruoyao via lfs-dev wrote:
> > On 2020-08-05 19:53 +0100, Ken Moffat via lfs-dev wrote:
> > > 
> > > But until now we have managed without putting pure perl core modules
> > > in /usr/share (although ISTR that when we used separate modules
> > > related to git - perhaps Errno.pm - something did go into
> > > /usr/share.
> > > 
> > > We did not used to have -Dprivlib, I guess that dropping that would
> > > stop core modules being placed in /usr/share.
> > > 
> > > This leaves the items in /usr/lib/perl5/core_perl which were NOT
> > > updated in chapter 8.  Looking at the times in ls -lR these are
> > > either pure perl modules (*.pm), headers (in CORE) or else
> > > directories.  I'm happy that those have not been changed between
> > > chapter 7 and chapter 8.
> > > 
> > > I'll start a build WITHOUT Dprivlib later.
> > 
> > Is there any rationale to change the default Perl module directory, besides 
> > to
> > remove the Perl patch level from path?
> > 
> 
> Som of the modules (.so libs) are in archlib, i.e.
> /usr/lib/perl5/5.32/core_perl
> 
> > I suggest three alternatives:
> > 
> > (1) -Dprivlib=/usr/share/perl5/5.32/core_perl
> > 
> > It's like the status quo, but versioned.
> > 
> 
> I am hopeful that not specifying privlib will do that.  If not, I
> will go with that.
> 

I completed the chapter 7 build of perl, all the (plain) modules now
in /usr/lib/perl5/5.32/core_perl/ and /usr/lib/perl5/site_perl was
created.

It also created /usr/share/perl5 which will be needed if anything
ever uses vendor_perl.

But it also created /usr/share/perl5/site_perl (sitelib) - I missed
that.  And after another run to stop that directory getting created
I sat down to look at exactly what I had.

In the book, modules are variously in /usr/lib/perl5/5.32/core_perl
(good, as expected) and in /usr/share/perl5/core_perl (messy).

By not defining privlib, the modules from /usr/share moved to
/usr/lib/perl5/5.32/core_perl.

But by changing sitelib to
 -Dsitearch=/usr/lib/perl5/5.32/site_perl
I have ended up with plain perl modules in /usr/lib/prel5/5.32.0
such as my old friend Test/More.pm.

Note that I have NOT specified 5.32.0 in any of the defines.
The diff from my script is:
@@ -41,7 +41,7 @@ sh Configure -des                                     \
              -Dprefix=/usr                            \
              -Dvendorprefix=/usr                      \
              -Darchlib=/usr/lib/perl5/5.32/core_perl  \
-             -Dsitelib=/usr/share/perl5/site_perl     \
+             -Dsitelib=/usr/lib/perl5/5.32/site_perl  \
              -Dsitearch=/usr/lib/perl5/5.32/site_perl \
              -Dvendorlib=/usr/share/perl5/vendor_perl \

So apparently there is some weird interaction.  I guess I'll revert
that, live with the creation of /usr/share/perl5/site_perl and try
again.

ĸen
-- 
Juliet's version of cleanliness was next to godliness, which was to
say it was erratic, past all understanding and was seldom seen.
                          -- Unseen Academicals
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to