tags:

views:

56

answers:

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)
+4  A: 

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
i dont understand wat u mean by non threaded perl running threaded perl modules
Saravana
Actually my perl code works fine..
Saravana
Let Me give u a clear picture.. I have Perl code which works fine and this is the sample code #!/usr/bin/perluse 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
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
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