On Tue, Jun 07, 2011 at 11:57:42AM -0700, yary wrote:
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.
Ariane van der Steldt wrote:
Don't do that. No, it can't happen with the system perl, we control that.
It happens, though I'm not sure why or how to prevent it.
Note that in 4.9 the system perl looks in some /usr/local directories
before /usr/libdata -
$ /usr/bin/perl -e 'print join \n,@INC'
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/site_perl
/usr/libdata/perl5/i386-openbsd/5.12.2
/usr/local/libdata/perl5/i386-openbsd/5.12.2
/usr/libdata/perl5
/usr/local/libdata/perl5
The right way to fix this is to have all the /usr/libdata paths before
any /usr/local paths in the system perl's @INC. Order them like so:
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl
/usr/libdata/perl5/i386-openbsd/5.12.2
/usr/libdata/perl5
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/local/libdata/perl5/i386-openbsd/5.12.2
/usr/local/libdata/perl5
Here's a scenario- and I don't have a 4.8 system to test it on, just
from memory-
In OpenBSD 4.8, using only the system perl, install the XS version of
Digest::SHA. OBSD 4.8 uses perl 5.10. This isn't so farfetched. Even
if 4.8 comes with a binary Digest::SHA, it may have an update that you
want.
Perl decides to put it under /usr/local/libdata/perl5/site_perl/i386-openbsd/
Upgrade the same machine to OpenBSD 4.9. It uses perl 5.12 which is
not binary-compatible with perl 5.10
Now any system utilities that use Digest::SHA will get the version in
/usr/local/libdata/perl5/site_perl/i386-openbsd , at the top of @INC.
Not sure if that's what happened to me (or the other poster at
http://comments.gmane.org/gmane.os.openbsd.misc/185763 ) but it's my
most plausible guess