-1

In Perl, what does this error mean?

 Unresolved symbol: Perl_Gthr_key_ptr

I am getting this error while converting a Perl file to binary using perl2exe on a HP-UX PA-RISC machine.

/usr/lib/dld.sl: Unresolved symbol: Perl_Gthr_key_ptr (code)  from /tmp/p2xtmp-9979/Cwd.sl IOT trap (core dumped)
brian d foy
  • 129,424
  • 31
  • 207
  • 592
Saravana
  • 303
  • 1
  • 6
  • 12

2 Answers2

5

Off the top of my head it looks like a non-threaded perl trying to load modules compiled for a threaded perl.

EDIT: to clarify, you can compile Perl with support for threads (threaded perl) or without support for threads (non-threaded perl). If the module was built to be used with threads and is loaded by a perl without support for threads it usually produces the above error.

To check for thread support in perl, just search for the "thread" string in the output of perl -V:

perl -V | grep thread
kixx
  • 3,245
  • 22
  • 19
  • i dont understand wat u mean by non threaded perl running threaded perl modules – Saravana Sep 27 '10 at 10:47
  • Let Me give u a clear picture.. I have Perl code which works fine and this is the sample code #!/usr/bin/perl use strict; require 5.8.0; use Data::Dumper; use Cwd; use Cwd 'abs_path'; #perl2exe_include bytes; my $file; my $dir; my $abs_path; $file="dynamicload"; $dir=getcwd; $abs_path=abs_path($file); print Dumper($abs_path); This works fine as a perl code but only whil changing to a binarty using PERL2EXE it shows error. Also one more update is ldd /usr/lib/dld.sl output shows /usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/dld.sl /usr/lib/dld.sl: Not enough space – Saravana Sep 28 '10 at 05:30
  • The above sample code works as a BINARy (after converting) in all other platforms except for HP-UX PA-RISC. Even in HP-UX it happens only when perl file uses external packages like Dumper,Cwd etc.. : Call to mmap() failed - TEXT /usr/lib/dld.sl has anything to do with this? – Saravana Sep 28 '10 at 05:40
  • 1
    From what you're telling, the perl2exe binary on HP-UX PA-RISC has no threading support, while the external modules (packages) require it. – kixx Sep 28 '10 at 09:56
1

A Perl module is being loaded which is not binary-compatible with your base Perl installation. This can result from, among other circumstances, having previously installed modules with the CPAN shell and then using your OS package manager to upgrade Perl underneath it. This situation can be resolved by

$ cpan -r

which will find all your CPAN modules with a binary component, and recompile those binary components against your current installation of Perl.