Search code examples
perlperl2exe

Why does perl2exe complain about "Unresolved symbol: Perl_Gthr_key_ptr"?


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)

Solution

  • 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