0

So

here is the import lines of my script...when I uncomment the JSON::RPC line I get the error listed below. I'm not even using the library in the script and still get the error listed below

#!/usr/bin/perl -w

use Data::Dumper;
use Mail::MboxParser;
use Mail::MboxParser::Mail;
use Mail::Box::Manager;
use Email::Delete qw[delete_message];
use POSIX;
use Date::Calc qw(:all);
#use JSON::RPC::Client;
use strict;

--

 /usr/bin/perl: symbol lookup error:  /usr/local/lib64/perl5/auto/Storable/Storable.so: undefined symbol: Perl_Istack_sp_ptr

On the perl 5.10 box:

perl -MStorable -wle'print $ARGV[0]->VERSION' Storable
2.30

On the perl 5.16 box:

perl -MStorable -wle'print $ARGV[0]->VERSION' Storable
perl: symbol lookup error: /usr/local/lib64/perl5/auto/Storable/Storable.so: undefined symbol: Perl_Istack_sp_ptr
BostonMacOSX
  • 1,369
  • 2
  • 17
  • 38
  • 3
    Have you recently changed versions of Perl or do you have different versions of perl: http://stackoverflow.com/questions/6256633/how-can-you-determine-what-perl-module-is-causing-undefined-symbol-perl-tstack suggests that you have a lib that was compiled with a different version that you are trying to use. – scrappedcola Mar 29 '17 at 14:41
  • updated post with some more troubleshooting info – BostonMacOSX Mar 29 '17 at 15:35
  • 2
    So it looks like you compiled the module on 5.10 and are trying to use it on the 5.16. You need to rebuild it for 5.16. – scrappedcola Mar 29 '17 at 15:38

1 Answers1

0

(I can't find a module called JSON::RPC::Client on CPAN, so some of this is guesswork. Where did the module come from?)

The reason why you're getting those errors when you just uncomment the use line is that Perl will then try to load the library. And the load is failing.

It looks like your library has an XS component. That is to say, it's not written in Pure Perl. Part of it is a Perl wrapper around a library written in another language (probably C).

Perl guarantees that XS libraries written for a given major version of Perl (in this case 5.10) will work for all minor releases under that same major version number (so any 5.10.x). But major releases will usually break that binary compatibility. An XS module built for Perl 5.10.x will not usually work with Perl 5.16.x.

The solution is to rebuild the module for your new version of Perl. I hope you know where the source code is, because (as I mentioned earlier) it's not on CPAN.

Dave Cross
  • 68,119
  • 3
  • 51
  • 97