modperl-multiple_perl_libs

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: Brooklyn Linux Solutions CEO <ruben@mrbrklyn.com>
From: Stas Bekman <stas@stason.org>
Subject: Re: which perl?
Date: Sun, 24 Jun 2001 12:20:08 +0800 (SGT)

On Sun, 24 Jun 2001, Brooklyn Linux Solutions CEO wrote:

> > > It's got to be built in.  My mod_perl conf keeps looking in 5.6.0 in the @INC
> > > array even after the 5.6.1 upgrade
> >
> I got sick of the problem and linked 5.6.1 into 5.6.0

You could achieve the same with:

startup.pl:
 -----------
use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1);

note that lib.pm takes care of adding the arch lib paths (i686-linux on my
machine) and removing dups.

===

To: Todd Goldenbaum <todd@marigoldtech.com>
From: Stas Bekman <stas@stason.org>
Subject: Re: which perl?
Date: Mon, 25 Jun 2001 00:55:28 +0800 (SGT)

On Sun, 24 Jun 2001, Todd Goldenbaum wrote:

> On Sun, 24 Jun 2001, Stas Bekman wrote:
>
> > On Sun, 24 Jun 2001, Brooklyn Linux Solutions CEO wrote:
> >
> > > > > It's got to be built in.  My mod_perl conf keeps looking in 5.6.0 in the @INC
> > > > > array even after the 5.6.1 upgrade
> > > >
> > > I got sick of the problem and linked 5.6.1 into 5.6.0
> >
> > You could achieve the same with:
> >
> > startup.pl:
> > -----------
> > use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1);
> >
> > note that lib.pm takes care of adding the arch lib paths (i686-linux on my
> > machine) and removing dups.
>
> interesting.  I created a symlink to my 5.6.1 binary, and I am pointing to
> the 5.6.1 libraries within my PerlRequire script (in my case it's mason's
> handler.pl)... and yet, modperl is still using 5.6.0!
>
> I am really at a loss... I'm really hoping i won't have to rebuild mod_perl
> as this particular server is using a pre-built SSL version we don't want to
> break ;)   but would that even help?  Is sounds like it shouldn't be necessary.

check the order of paths in @INC. If 5.6.0 is coming first, that explains
your problem. try:

perl -le 'print join "\n", @INC' but this is your perl with no @INC
adjustments.

do the same from some simple CGI script

/server-status via Apache::Status is another way to check (See the guide
or the manpage)

===

To: Todd Goldenbaum <todd@marigoldtech.com>
From: Stas Bekman <stas@stason.org>
Subject: Re: which perl?
Date: Mon, 25 Jun 2001 00:58:47 +0800 (SGT)

On Sun, 24 Jun 2001, Todd Goldenbaum wrote:

> On Sun, 24 Jun 2001, Stas Bekman wrote:
>
> > On Sun, 24 Jun 2001, Brooklyn Linux Solutions CEO wrote:
> >
> > > > > It's got to be built in.  My mod_perl conf keeps looking in 5.6.0 in the @INC
> > > > > array even after the 5.6.1 upgrade
> > > >
> > > I got sick of the problem and linked 5.6.1 into 5.6.0
> >
> > You could achieve the same with:
> >
> > startup.pl:
> > -----------
> > use lib qw(/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1);
> >
> > note that lib.pm takes care of adding the arch lib paths (i686-linux on my
> > machine) and removing dups.
>
> interesting.  I created a symlink to my 5.6.1 binary, and I am pointing to
> the 5.6.1 libraries within my PerlRequire script (in my case it's mason's
> handler.pl)... and yet, modperl is still using 5.6.0!

also notice that this will work only if your libs are binary compatible.

did you make 4 symlinks? I've numbered these below as 1-4

mine is:

$ perl -V

Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING USE_LARGE_FILES
  Built under linux
  Compiled at Apr 20 2001 22:58:59
  @INC:
1    /usr/lib/perl5/5.6.1/i686-linux
2    /usr/lib/perl5/5.6.1
3    /usr/lib/perl5/site_perl/5.6.1/i686-linux
4    /usr/lib/perl5/site_perl/5.6.1
    /usr/lib/perl5/site_perl/5.6.0
    /usr/lib/perl5/site_perl/5.005
    /usr/lib/perl5/site_perl
    .


> I am really at a loss... I'm really hoping i won't have to rebuild mod_perl
> as this particular server is using a pre-built SSL version we don't want to
> break ;)   but would that even help?  Is sounds like it shouldn't be necessary.

===
To: Todd Goldenbaum <todd@marigoldtech.com>
From: Stas Bekman <stas@stason.org>
Subject: Re: which perl?
Date: Mon, 25 Jun 2001 11:31:41 +0800 (SGT)

On Sun, 24 Jun 2001, Todd Goldenbaum wrote:

> > actually yes, they appear to be in the right order:
> >
> > $ perl -V
> >
> > Characteristics of this binary (from libperl):
> >   Compile-time options: USE_LARGE_FILES
> >   Built under linux
> >   Compiled at May 23 2001 08:18:14
> >   @INC:
> >     /usr/local/lib/perl5/5.6.1/i686-linux
> >     /usr/local/lib/perl5/5.6.1
> >     /usr/local/lib/perl5/site_perl/5.6.1/i686-linux
> >     /usr/local/lib/perl5/site_perl/5.6.1
> >     /usr/local/lib/perl5/site_perl
> >
> > and yet, mod perl is still showing that it's using 5.6.0...
>
> note- the results i get from a script running under mod_perl is slightly
> different, but 5.6.1 is indeed first.  (this is the output of @INC)
>
> /usr/local/lib/perl5/5.6.1
> /usr/local/lib/perl5/site_perl/5.6.1
> /usr/lib/perl5/5.6.0/i386-linux
> /usr/lib/perl5/5.6.0
> /usr/lib/perl5/site_perl/5.6.0/i386-linux
> /usr/lib/perl5/site_perl/5.6.0
> /usr/lib/perl5/site_perl
>
> i may have misunderstood- were you recommending that i actually delete
> these 5.6.0 directories, and symlink them over to the 5.6.1 equivs?

It's me who wasn't clear. Of course perl -V is not what you want. I just
suggested it as an example to see what your @INC under mod_perl should be
like.

So grab the output of perl -V, and put it in
use lib qw(HERE);
in startup.pl

now make sure that 5.6.1's 4 directories are coming up first in @INC. As
you can see your output is missing i386-linux dirs for 5.6.1.

remove the symlinks.

ALso I repeat that this won't work if your 5.6.0 is binary incompatible
with 5.6.1 (which is the case if you've changed build args, like
enable/disable threads and similar).

Of course the best thing is to recompile :)

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu