develooper Front page | perl.perl5.porters | Postings from October 2005

Re: relocation error: undefined symbol: Perl_Gthr_key_ptr or Perl_Tstack_sp_ptr

Thread Previous
From:
Dominic Dunlop
Date:
October 14, 2005 02:16
Subject:
Re: relocation error: undefined symbol: Perl_Gthr_key_ptr or Perl_Tstack_sp_ptr
Message ID:
9768FE57-D47B-4803-95E9-96410B8A0B20@mac.com
Executive summary: Check that your PERL5LIB environment value is  
sensible.

On 2005–10–13, at 19:14, Bowen Dwelle wrote (three times!):

> /usr/local/bin/perl: relocation error:
> /home/bdwelle/lib/perl/i386-linux/auto/Storable/Storable.so: undefined
> symbol: Perl_Tstack_sp_ptr
> ...
> /usr/local/bin/perl: relocation error:
> /home/bdwelle/lib/perl/i386-linux-thread-multi/auto/Clone/Clone.so
> : undefined symbol: Perl_Gthr_key_ptr

Your unthreaded perl is finding modules that were built against a  
threaded perl. This Should Not Happen, but it is possible to confuse  
perl into making this mistake by naming a directory (or directories)  
containing threaded modules in the PERL5LIB environment variable.  
Look what I get if I do this:

$ PERL5LIB=/System/Library/Perl/5.8.6/darwin-thread-multi-2level:./ 
lib ./perl -MStorable -e1
dyld: lazy symbol binding failed: Symbol not found: _Perl_Tstack_sp_ptr
   Referenced from: /System/Library/Perl/5.8.6/darwin-thread- 
multi-2level/auto/Fcntl/Fcntl.bundle
   Expected in: dynamic lookup

dyld: Symbol not found: _Perl_Tstack_sp_ptr
   Referenced from: /System/Library/Perl/5.8.6/darwin-thread- 
multi-2level/auto/Fcntl/Fcntl.bundle
   Expected in: dynamic lookup

Trace/BPT trap

This is with an uninstalled unthreaded perl running from its build  
directory with its own libraries in ./lib; /System/Library/Perl/5.8.6/ 
darwin-thread-multi-2level is where the threaded modules which ship  
with Mac OS X are to be found; an unthreaded perl won't search it  
unless I force it to.

(I suspect the missing symbol is being flagged from Fcntl because  
Storable probes Fcntl early in its initialisation and, on my system,  
hits threaded XS module. On your system I guess that perl is  
correctly finding an unthreaded Fcntl.)
-- 
Dominic Dunlop


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About