[ic] Two different Perl in one Server

Joachim Leidinger interchange-users@interchange.redhat.com
Mon Feb 4 03:44:00 2002


Hi List,

I use FreeBSD 4.4 and in that OS, we can install two different Perl.
Each perl has an own path and libs directory. Per default, FreeBSD users
has Perl 5.005. If you install IC (via ./configure), it will call perl
from /usr/bin. In that case, ./configure set $PERL to "/usr/bin/perl"
and use "$PERL Makefile.PL". The Makefile has lines like

#grep 005 Makefile.sic.perl5.005
# These definitions are from config.sh (via
/usr/libdata/perl/5.00503/mach/Config.pm)
INSTALLSITELIB = /usr/local/lib/perl5/site_perl/5.005
INSTALLSITEARCH = /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
PERL_LIB = /usr/libdata/perl/5.00503
PERL_ARCHLIB = /usr/libdata/perl/5.00503/mach
SITELIBEXP = /usr/local/lib/perl5/site_perl/5.005
SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
PERL_INC = /usr/libdata/perl/5.00503/mach/CORE
MAKEMAKER = /usr/libdata/perl/5.00503/ExtUtils/MakeMaker.pm
$(INST_AUTODIR)/.exists :: /usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_AUTODIR)/.exists
$(INST_LIBDIR)/.exists :: /usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_LIBDIR)/.exists
$(INST_ARCHAUTODIR)/.exists ::
/usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_ARCHAUTODIR)/.exists
$(INST_MAN1DIR)/.exists :: /usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_MAN1DIR)/.exists
$(INST_MAN3DIR)/.exists :: /usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_MAN3DIR)/.exists
$(INST_SCRIPT)/.exists :: /usr/libdata/perl/5.00503/mach/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/libdata/perl/5.00503/mach/CORE/perl.h $(INST_SCRIPT)/.exists

During the installation of IC, cpan fetch Perl 5.6.1 and install Perl
5.6.1, because some modules is coming from Perl 5.6.1. The cpan module
of the perl 5.005 is too old and has a bug (thanks to Jason Kohles).
With the newest cpan module (installed from the tarball and not via the
cpan), Perl 5.6.1 will not be installed otherwise you force it to
install. After the installation of IC, you have for example a
"#!/usr/bin/perl" in your bin/interchange file.

If you ignore the ./configure file and make a Makefile with

/usr/local/bin/perl Makefile.PL 
or
/usr/local/bin/perl5.6.1 Makefile.PL

you will get a Makefile with the right path to Perl and his libs
directory like

#grep "5\.6\.1" Makefile.sic.perl5.6.1
# These definitions are from config.sh (via
/usr/local/lib/perl5/5.6.1/i386-freebsd/Config.pm)
INSTALLPRIVLIB = /home/ic48Perl5.6.1/lib
INSTALLARCHLIB = /home/ic48Perl5.6.1
INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.6.1
INSTALLSITEARCH = $(PREFIX)/lib/perl5/site_perl/5.6.1/i386-freebsd
INSTALLBIN = /home/ic48Perl5.6.1/bin
INSTALLSCRIPT = /home/ic48Perl5.6.1/bin
PERL_LIB = /usr/local/lib/perl5/5.6.1
PERL_ARCHLIB = /usr/local/lib/perl5/5.6.1/i386-freebsd
SITELIBEXP = /usr/local/lib/perl5/site_perl/5.6.1
SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
PERL_INC = /usr/local/lib/perl5/5.6.1/i386-freebsd/CORE
PERL = /usr/local/bin/perl5.6.1
FULLPERL = /usr/local/bin/perl5.6.1
MAKEMAKER = /usr/local/lib/perl5/5.6.1/ExtUtils/MakeMaker.pm
INSTALLMAN1DIR = /home/ic48Perl5.6.1/doc
INSTALLMAN3DIR = /home/ic48Perl5.6.1/doc
$(INST_AUTODIR)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_AUTODIR)/.exists
$(INST_LIBDIR)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_LIBDIR)/.exists
$(INST_ARCHAUTODIR)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_ARCHAUTODIR)/.exists
$(INST_MAN1DIR)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_MAN1DIR)/.exists
$(INST_MAN3DIR)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_MAN3DIR)/.exists
$(INST_SCRIPT)/.exists ::
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
        @$(EQUALIZE_TIMESTAMP)
/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE/perl.h
$(INST_SCRIPT)/.exists
FULLPERL      = /usr/local/bin/perl5.6.1

In bin/interchange, you will get the right direction to the right perl
like

#!/usr/local/bin/perl

which is Perl 5.6.1!

Question:
Is that the right way to direct IC to another Perl (Perl 5.6.1)? 

The big advandtage is, all IC users in one Server can use Perl 5.6.1 and
all IC users don't need a own Perl5.6.1 in his home directory.

If a newest FreeBSD user will install IC and has no former experience
with IC, he will probably get some trouble. I suggest the IC core team
change the ./configure file so, that it will find perl 5.6.1 (for
example TESTPERL=/usr/local/bin/perl or
TESTPERL=/usr/local/bin/perl5.6.1) first. If that failed, it will try to
find perl with TESTPERL=perl.

Any comments?

Thanks!

Joachim Leidinger


-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[Hans-Joachim.leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de