It seems I have multiple sources of confusion here. First of all, the Devel::NYTProf module directory contains the following file (referenced in the error message in my OP):

/user/perl_modules/lib/perl5/x86_64-linux/Devel/auto/Devel/NYTProf/NYT +Prof.so

Which appears to be called using this line in /user/perl_modules/lib/perl5/x86_64-linux/Devel/NYTProf/Core.pm:

XSLoader::load('Devel::NYTProf', $VERSION);

Based on a cursory search this appears to be a way to include a library of separate C/C++ functions and access them from within perl. Is that correct? If so, then that probably explains why I've never run into this error until now - other modules I've installed and referenced from /user/perl_modules/lib/perl5 didn't have dynamic libraries.

Having said that, based on my C/C++ experience linker errors such as "undefined symbol" occur when the executable doesn't have a path to the referenced dynamic library, which can be checked using the "ldd" command. If I run "ldd /usr/bin/perl", it returns the following:

> ldd /usr/bin/perl linux-vdso.so.1 => (0x00007ffc0b140000) libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x00007f74bbaa5000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f74bb88c000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f74bb672000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f74bb46e000) libm.so.6 => /lib64/libm.so.6 (0x00007f74bb16c000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f74baf35000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f74bad32000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f74bab16000) libc.so.6 => /lib64/libc.so.6 (0x00007f74ba749000) /lib64/ld-linux-x86-64.so.2 (0x00007f74bbe33000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f74ba546000)

whereas "ldd /tool/bin/perl" returns the following:

> ldd /tool/bin/perl linux-vdso.so.1 => (0x00007ffeeebb7000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f3a2cd0f000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f3a2cb0b000) libm.so.6 => /lib64/libm.so.6 (0x00007f3a2c809000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f3a2c5d2000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f3a2c002000) libc.so.6 => /lib64/libc.so.6 (0x00007f3a2c002000) /lib64/ld-llinux-x86-64.so.2 (0x00007f3a2cf29000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f3a2bdff000)

Note that neither perl installation has /user/perl_modules/lib/perl5/x86_64-linux/Devel/auto/Devel/NYTProf/ in its list of ldd paths, so how was /tool/bin/perl able to find NYTProf.so but /usr/bin/perl was not?
Also the ldd paths for a given perl installation are completely separate from the paths contained in @INC when that perl executable is run, correct?


In reply to Re^6: Devel::NYTProf: "undefined symbol: PL_stack_sp" error by Special_K
in thread Devel::NYTProf: "undefined symbol: PL_stack_sp" error by Special_K

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.