tokuhirom / plenv

Perl binary manager
Other
516 stars 71 forks source link

`plenv migrate-modules` may break List::Util(and cpanm) #184

Open worthmine opened 6 months ago

worthmine commented 6 months ago

I found a bug and how to fix itself.

The reproducible environment is bellow:

plenv install 5.24.4
plenv install 5.34.3
plenv local 5.24.4
plenv install-cpanm
#install some modules with cpanm

plenv migrate-modules 5.24.4 5.34.3
plenv local 5.34.3
cpanm Another::Module

it provides the error like bellow:

Can't load '/home/*/perl5/lib/perl5/amd64-freebsd/auto/List/Util/Util.so' for module List::Util: /home/*/perl5/lib/perl5/amd64-freebsd/auto/List/Util/Util.so: Undefined symbol "PL_sv_immortals" at /home/*/.plenv/versions/5.24.4/lib/perl5/5.24.4/XSLoader.pm line 96.

even after I tried

cpanm --reinstall List::Util

it errors

ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xf680000, needed 0xf480000)

I don't know how to fix it fundamentally, but the most simple way is bellow:

plenv local --unset
plenv uninstall 5.34.3
plenv install 5.34.3
plenv local 5.34.3