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

In reply to Re^5: Replicating perl instance on AIX 6.1 by syphilis
in thread Replicating perl instance on AIX 6.1 by twieckow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.