How can you determine what Perl module is causing "undefined symbol: Perl_Tstack_sp_ptr?"
Asked Answered
E

4

9

I'm trying to run a Perl script, but it is returning:

/usr/bin/perl: symbol lookup error: /usr/local/groundwork/perl/lib/5.8.8/x86_64-linux-thread-multi/auto/IO/IO.so: undefined symbol: Perl_Tstack_sp_ptr

Is there any way to determine what Perl module is causing this?

Electroencephalogram answered 6/6, 2011 at 18:51 Comment(0)
P
18

IO.so is the binary component of IO. The modules of this distribution are also part of the perl distribution (i.e. they are dual-lived).

This type of error usually occurs when using a binary compiled using one version of Perl is used by a different version of Perl.

Phew answered 6/6, 2011 at 19:3 Comment(3)
Thanks. 'twas indeed the problem. The shebang at the top of the script was pointed at the wrong perl.Electroencephalogram
It could be the other way around too: a binary from an older version being used by a more recent version of Perl. For example, manually copying some binaries from CentOS 6 to CentOS 7 (which uses a higher version of Perl).Steeplechase
Fixed . . . . .Phew
S
2

I ran into this problem recently when I had a PERL5LIB environment variable defined in my login files, but they were pointing to a directory that was incompatible with the system-installed perl. This happened because the HOME filesystem is cross-mounted on lots of different machines where the perl installations are heterogenous. Deleting the environment variable solves the problem, and I'll find a better way to manage local libraries.

Subservience answered 13/4, 2015 at 18:6 Comment(0)
D
1

I have similar problem many times when I use old perl Module on new CentOS (for example CentOS 6.4).

/usr/bin/perl: symbol lookup error: /home/sonnn/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Cwd/Cwd.so: undefined symbol: Perl_Tstack_sp_ptr

/usr/bin/perl: symbol lookup error: /home/sonnn/perl5/lib/perl5/x86_64-linux-thread-multi/auto/version/vxs/vxs.so: undefined symbol: Perl_Tstack_sp_ptr

I have resolved these problems by:

  • Download sources code of Cwd, version from http://search.cpan.org/ and re-install them

      # tar -xzf version-0.9906.tar.gz
      # cd version-0.9906
      # perl Makefile.PL INSTALL_BASE=/home/sonnn/perl5/
      # make
      # make install
    
      (If you use default module path, you can omit "INSTALL_BASE=/home/sonnn/perl5/")
    
  • Do similarly for other modules

In your case, I think you can download IO module from http://search.cpan.org/ and re-install it.

Demythologize answered 15/1, 2014 at 10:5 Comment(1)
I just had exactly the same "vxs" error that you posted. An alternative is to use: "cpanm version" and "cpanm DBI" (DBI was the module that was having trouble). I think that is easier than installing the module manually.Orrin
C
-2

Edit:

Finally, even though I know it's not answering the question, i permit myself as it looks like really hard information to get, because I found a bunch of sites mentioning these errors, but very few with consistent solutions in it. Well that's it.

I couldn't process the zimbra migration I had to do before changing the platforms path. We have done it going from Ubuntu 8.04 with Zimbra 6.0.16 then Zimbra 7.2.7, migrating to Ubuntu 10.04, then upgrading Zimbra 8.0.9, then migrating to Centos 7 then upgrading to 8.6.0

On Centos where i had to do a move of the zimbramon files after I did ./install.sh -s ...

mv /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/ /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi.bak

Then i ran again the install.sh without -s

Carnahan answered 12/1, 2016 at 17:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.