in reply to Changing Perl installation to include vendor_perl path

There are several approaches. To avoid having to use this lib manually all the time you could just symlink/copy/move the vendor_perl dirs trees into the same place in site_perl tree which by default will be at /usr/local/lib/perl5/site_perl/5.x.x/. That is the quickest fix.

As you know you have the option to specify additional dirs to add to @INC during the configuration stage pre-compile. You could just run configure again and recompile, that is next quickest.

The slowest way is probably what you want. As you appear reluctant to just run the configure again and add the required dirs what you could do is rename config.sh and Policy.sh files with a .old extension. Then rerun the configure (you are not going to run make at this stage) but you may as well try to do a similar job to the first time. Finally do a diff between the new and old config.sh files. It should be obvious exactly what changes to make to your original config.sh. Once you have editited that to your satisfaction rename it to config.sh, make && make test && make install.

cheers

tachyon

  • Comment on Re: Changing Perl installation to include vendor_perl path

Replies are listed 'Best First'.
Re: Re: Changing Perl installation to include vendor_perl path
by RonatArtifact (Initiate) on Mar 07, 2004 at 05:59 UTC
    I read the config.sh and found 3 places where vendor libraries were mentionned.

    I would just like to know what goes there in those spots. They may all be the same. If someone has vendor_perl in their @INC I could figure out the rest from their config.sh.

    I am running a few things that seem to be dependent on each other and I am afraid if I rerun config, I will create a whole lot of debugging to find some setting that I forgot to redo.

    I am new here and I can see that most of the questions are coding. Is there a better place to ask this type of question?

      Here is all you need to know to copy the modules from vendor_perl. It comes from a doco email and deals specifically with the redHat problems of vendor_perl.

      Note don't copy binaries from 5.6.x vendor_perl to 5.8.x as it won't work. You can copy vanilla perl modules with impunity, but the binary ones in i386/i686 can only get copied if the are for 5.6.x or 5.8.x already.

      I have configured, make(d) and installed 5.6.2 into default /usr/local +/lib/perl5 location along side 5.8.3 This is mostly for common benefit to document the changes/process aka +how to fix RedHats eclectic install! To get all the modules we have installed into 5.6.2 @INC I looked at w +here 5.6.1 is looking by erroring it out on a non existant module [root@devel3 perl5]# perl -MFOO -e 1 Can't locate FOO.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386- +linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux +/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/li +b/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/li +b/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .). BEGIN failed--compilation aborted. [root@devel3 perl5]# perl5.6.2 -MFOO -e 1 Can't locate FOO.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.2 +/i686-linux /usr/local/lib/perl5/5.6.2 /usr/local/lib/perl5/site_perl +/5.6.2/i686-linux /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib +/perl5/site_perl .). BEGIN failed--compilation aborted. [root@devel3 perl5]# The core modules for perl are in perl5/5.x.x Note different roots at / +usr/lib/perl5 for 5.6.1 and /usr/local/lib/perl5 for 5.6.2 The latter + location is the default but as usual redhat just had to put it somew +here else! The perl5/site_perl/5.x.x dirs contain all the user insalled non core +modules. To complicate matters with 5.6.1 the binaries went into i386 +-linux but with the new installs this dir is called i686-linux. To get all our installed modules into the right location I have done: [root@devel3 5.6.2]# ls /usr/lib/perl5/site_perl/5.6.0 Net SGMLS SGMLS.pm skel.pl OK no binaries for 5.6.0 to worry about renaming from i386.... [root@devel3 5.6.2]# cp -R /usr/lib/perl5/site_perl/5.6.0/* /usr/local +/lib/perl5/site_perl/5.6.2/ [root@devel3 5.6.2]# cp -R /usr/lib/perl5/site_perl/5.6.1/* /usr/local +/lib/perl5/site_perl/5.6.2/ [root@devel3 5.6.2]# mv /usr/local/lib/perl5/site_perl/5.6.2/i386-linu +x /usr/local/lib/perl5/site_perl/5.6.2/i686-linux There is also some stuff in vendor_perl GOK. I just took the binaries. +... cp -R /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/* /usr/local/lib/per +l5/5.6.2/i686-linux/ [root@devel3 5.6.2]# pwd /usr/local/lib/perl5/site_perl/5.6.2 [root@devel3 5.6.2]# ls Algorithm Crypt File i686-linux lwptut.pod SGMLS.pm WWW Apache Data Foomatic if.pm Mail skel.pl YAM +L Benchmark Devel GD LWP MIME Test YAM +L.pm Bundle Digest HTML lwpcook.pod Net URI YAM +L.pod Compress Digest.pm HTTP LWP.pm SGMLS URI.pm [root@devel3 5.6.2]# ls /usr/lib/perl5/site_perl/5.6.0 Net SGMLS SGMLS.pm skel.pl [root@devel3 5.6.2]# Finally I did: [root@devel3 5.6.2]cd /usr/bin [root@devel3 bin]# ls perl* perl perl5.6.1 perl5.6.2 perl5.8.3 perlbug perlcc perldoc [root@devel3 bin]# rm perl rm: remove `perl'? y [root@devel3 bin]# ln -s perl5.6.1 perl [root@devel3 bin]# perl -v This is perl, v5.6.1 built for i386-linux Copyright 1987-2001, Larry Wall [root@devel3 bin]# rm perl rm: remove `perl'? y [root@devel3 bin]# ln -s perl5.6.2 perl [root@devel3 bin]# perl -v This is perl, v5.6.2 built for i686-linux Copyright 1987-2003, Larry Wall So we are now pointed at 5.6.2 when you do /usr/bin/perl. We can chang +e to 5.6.1 or 5.8.3 just by changing the symlink. If you want 5.8.3 j +ust ask for it #!/usr/bin/perl5.8.3 If seemed to work OK..... [root@devel3 bin]# perl -MDBI -e 1; [root@devel3 bin]# perl -MSmartSurf::Bayes::BayesXS -e 1; [root@devel3 bin]# Then I did this to run our test suite /t/run Which mostly ran but complained about the odd module being missing. Th +ese were in per5/vendor_per/5.6.1 but there were also a whole lot of +out of date modules in there so I just reinstalled the latest version + of missing things like HTML::Tagset by hand rather than overwrite cu +rrent modules with old versions. Anyway the Redhat abortion of a default perl setup with 9 dirs in @INC + is now rationalised. All we need is the /usr/local/lib/perl5 tree an +d we will have all modules we installed for 5.6.2 and 5.8.3

      cheers

      tachyon

      Like I said to you before - there are several stages to a compile. config, make (compile), make test, make install. Your current installation will remain intact right up until the moment you type make install. You can rename your config.sh, and Policy.sh and rerun config (this time saying you want to include vendor_perl in @INC and the ONLY thing that has changed is your config.sh and Policy.sh which will now be rewritten. You still have the orignals unchanged under the .old ext. You can diff config.sh.old against new config.sh and SEE what to edit.

      To be frank you are unlikely to get a kinder answer anywhere. I gave you 3 working options.....

      Personally I would just copy the stuff from vendor_perl to site perl.

      When you did the config you may have noticed there are a lot of options. No one can give you a file that will work for you. Explaining what to edit when you can easily work it out for yourself is a waste of my time.........

      cheers

      tachyon