Why does perl2exe complain about “Unresolved symbo

2019-03-06 19:33发布

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)

标签: perl perl2exe
2条回答
Root(大扎)
2楼-- · 2019-03-06 20:18

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
查看更多
beautiful°
3楼-- · 2019-03-06 20:19

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.

查看更多
登录 后发表回答