develooper Front page | perl.perl5.porters | Postings from July 2002

perl 5.8.0 issue on Mac OS X w/ fink

From:
Adam Foxson
Date:
July 19, 2002 02:29
Subject:
perl 5.8.0 issue on Mac OS X w/ fink
Message ID:
20020719091803.GA29211@magnonel.guild.net

SYNOPSIS:

The release notes for perl 5.8.0 indicate:

"Perl 5.8 is not binary compatible with any earlier Perl release,
XS MODULES WILL HAVE TO BE RECOMPILED!"

Mac OS X users that have fink installed may experience the
following error when executing certain perl operations (see 'EXAMPLE').

dyld: perl Undefined symbols:
_Perl_safefree
_Perl_safemalloc
_Perl_saferealloc
_Perl_sv_2pv
_perl_call_sv
_perl_eval_sv
_perl_get_sv

This error is separate from the similar dyld issue mentioned in the
"Mac OS X dyld undefined symbols" section of perldelta[1].

EXAMPLE:

The below is one example of how to reproduce the issue. There are many
other ways to reproduce it. I have experienced the same behavior when
attempting to "perl Makefile.PL" certain modules (such as CPANPLUS
below). CPAN.pm also exhibits the same behavior when attempting
certain operations after configuration.

root@localhost:/tmp$ perl -MCPANPLUS -e shell

CPANPLUS::Shell::Default -- CPAN exploration and modules installation (v0.02)
*** Please report bugs to <cpanplus-bugs@lists.sourceforge.net>.
*** Using CPANPLUS::Backend v0.035.  ReadLine support enabled.

CPAN Terminal> o
Checking if source files are up to date
dyld: perl Undefined symbols:
_Perl_safefree
_Perl_safemalloc
_Perl_saferealloc
_Perl_sv_2pv
_perl_call_sv
_perl_eval_sv
_perl_get_sv
root@localhost:/tmp$

CAUSE:

The error is caused by the following sequence of events:

  1 - a .bashrc (or other shell rc file) sources /sw/bin/init.[c]sh
  2 - init.[c]sh sets PERL5LIB to /sw/lib/perl5
  3 - /sw/lib/perl5 contains Storable (the only compiled perl module,
      included by default, to my knowledge), and possibly other XS
      modules. Since Storable is a compiled XS module that was compiled
      with a prior version of perl that is binary incompatible with
      perl 5.8.0 it will be necessary to recompile Storable
      (see 'RESOLUTION').

FURTHER CONSIDERATIONS:

Fink stable currently includes the following six XS modules. If any
of these were installed prior to installing 5.8.0 you will likely
experience the dyld issue.

  - DBD::Mysql
  - DBI
  - Digest::MD5
  - MacOSX::File
  - Storable
  - Term::ReadKey

You will also experience the dyld issue if any other XS modules are
contained within the /sw/lib/perl5 directory. That is, XS modules
from fink unstable or another source.

RESOLUTION:

The following three commands will correct the above issue by removing
the current Storable and replacing it with a recompiled version. These
commands must be executed as the superuser. After these commands are
executed the aforementioned issue will be resolved.

mv /sw/lib/perl5/darwin/Storable.pm /tmp
mv /sw/lib/perl5/darwin/auto/Storable /tmp
fink rebuild storable-pm

It IS first necessary to do the mv's, before the rebuild, since fink is
a perl script that explicitly adds /sw/lib/perl5 to @INC, and exhibits
the behavior mentioned above.

You will need to execute the above commands for every XS module that
is contained within /sw/lib/perl5.

FOOTNOTES:

[1] http://search.cpan.org/doc/JHI/perl-5.8.0/pod/perldelta.pod#Mac_OS_X_dyld_undefined_symbols

-- 
Adam J. Foxson (Fox)
CPAN Tester for Mac OS X
Comprehensive Perl Archive Network



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About