Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Devel::NYTProf: "undefined symbol: PL_stack_sp" error

by Corion (Patriarch)
on Aug 26, 2021 at 05:37 UTC ( [id://11136089]=note: print w/replies, xml ) Need Help??


in reply to Devel::NYTProf: "undefined symbol: PL_stack_sp" error

The module loading path, most likely $ENV{PERL5LIB}, shows the path to one Perl version while you are running a different Perl version. Set up $ENV{PERL5LIB} to only contain paths for the Perl version you're actually running.

Replies are listed 'Best First'.
Re^2: Devel::NYTProf: "undefined symbol: PL_stack_sp" error
by Special_K (Monk) on Aug 26, 2021 at 20:02 UTC

    If I include the following in factorial_recurse.pl:

    printf("perl5lib = $ENV{PERL5LIB}");

    It prints:

    perl5lib = /home/user/perl_modules/lib/perl5/x86_64-linux/

    and nothing else. I don't see a path to either perl version referenced in my previous post (/tool/bin/perl

    or

    /usr/bin/perl

    ). Is that a problem?

      The issue is that the libraries under that path are compiled for one of your perls, but not the other.

      You need to have a separate directory for each perl version, each of which has a version of the libraries you are using. This is what Corion was recommending in 11136089.

      A slightly more involved, but well tested and used, way to achieve this is to use local::lib to handle the different directories.

        How do module directories get associated with specific installation locations of perl? When I install a module, I just do the following (as an example):

        cd /home/user/perl_modules cpanm -L$PWD Devel::NYTProf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found