Hello Rob. No this is not the 'duplicate perl', I have yet to build/implement until I get a good understanding what is involved. The reason for the 'duplicate' is, my users have been running on the 'system' perl. thus there are extra modules installed and their production apps have been verified to run as designed there. I now want to decouple them from the system, and give them their own perl to run from. trying to make this as seamless and simple as possible, so, that in the end, all they would have to do is point to the 'duplicate' perl and be assured that it is the exact same version/flavor, only in different locale. Hope this makes sense and would be appreciative of any further guidance.
regards,
Tom | [reply] |
No this is not the 'duplicate perl'
Hmmm ... I always thought that the system perl would be in /usr/bin, and that /usr/opt was a typical installation location for non-system perls.
But there's lots of things about which I'm mistaken ;-)
But maybe, if you're in any doubt, it's worth double-checking that /usr/opt/perl5 is the system perl.
One thing for you to do is download the perl source and read the 'INSTALL' and 'README.aix' files that are located in the top level source directory.
First thing I notice is that /usr/opt/perl5 was not built with -Duserelocatableinc.
The INSTALL file also tells us that -Duserelocatableinc is incompatible with -Duseshrplib (and /usr/opt/perl5 was built with -Duseshrplib).
As I understand it, this all means that you can forget about copying your perl to a different location - you're going to have to build another perl.
You could therefore try building the same version of perl from source, using the same configure options as the original. (I've some doubts about the wisdom of doing that. I'll come back to that.)
You would change the -Dprefix=/usr/opt/perl5 to point to the actual location into which the "duplicate" is to be installed, and change the -Dinstallprefix=/usr/opt/perl5 option to point to the same location as -Dprefix.
(Actually, I don't know why -Dinstallprefix is specified at all. I suspect it could simply be removed - though we do need to be mindful of ensuring that the "duplicate" perl is not going to install anything into any of /usr/opt/perl5's @INC.)
If that all worked, you'd then have a perl installed that's compatible with /usr/opt/perl5.
This "duplicate" would be missing all of the modules that had been installed by /usr/opt/perl5/perl, but that becomes a non-issue if your users then set the PERL5LIB environment variable to /usr/opt/perl5's @INC.
Should work fine, I think.
The things (doubts) that bother me:
1) README.aix advises that "you probably should not use the -r option of Configure in AIX". (ie they're recommending that the "-desr" config option be changed to "-des".)
2) The /usr/opt/perl5 build used the native xlc compiler, but flexvault has recommended that you specify the -Dcc=gcc config option.
But if you follow either of those 2 pieces of advice, the "duplicate" will probably no longer be binary-compatible with /usr/opt/perl5.
That's perhaps no big deal - but it would mean you'd have to install the missing modules into the "duplicate". (ie you'd lose the option of making the above use of PER5LIB).
Note, too, that if you really need a "duplicate", then you need to build the exact same version as the original.
(You're probably already aware of that.)
I hope that helps ... and I hope there's someone checking this and prepared to correct any bad advice.
Cheers, Rob
| [reply] |