Hi,

I saw another message about getting a perl error 'Fatal error: can't
parse  object version..." after an upgrade to 4.9, and have a fix and
an explanation.

Fix: add this line:

  no lib qw(/usr/local/libdata/perl5
/usr/local/libdata/perl5/i386-openbsd/5.12.2
/usr/local/libdata/perl5/site_perl
/usr/local/libdata/perl5/site_perl/i386-openbsd);

 to the start of these libs, near the "package" declaration:

  /usr/libdata/perl5/OpenBSD/Error.pm
  /usr/libdata/perl5/OpenBSD/Paths.pm

Explanation: In a /usr/local directory is a shared library from a
different version of perl- Digest::SHA- and it's a binary (aka XS or
.so) version.

I have installed my own build of perl into /usr/local which might be
the cause- though it can also happen with the system perl, All one has
to do is install a binary/XS version of a library that system perl has
a non-binary version of, in a directory that the system perl uses.

System perl programs only need libraries in these directories, which
yo probably will never install anything into-
/usr/libdata/perl5
/usr/libdata/perl5/i386-openbsd/5.12.2
/usr/libdata/perl5/site_perl
/usr/libdata/perl5/site_perl/i386-openbsd

My "no lib" solution tells systerm Perl programs to ignore the
/usr/local perl libraries. Not sure if those two modules cover all
system perl programs, but it works for the pkg_* ones for sure.

-y

Reply via email to