AFP548 Changing the world one server at a time.

New Perl 5.8 install breaks Fink

Home › Forums › OS X Server and Client Discussion › Questions and Answers › New Perl 5.8 install breaks Fink

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #355374
    brossow
    Participant

    I recently installed Perl 5.8 per the instructions posted on this site for installing ClamAV wiith Exim. Everything was fine until I began the process of setting up the server as a PDC. Fink installed fine, but when I try to update-all, scanpackages, list, selfupdate, or just about anything else I get the following error:

    [mail:/Users/admin] admin# fink update-all
    dyld: perl Undefined symbols:
    _Perl_safefree
    _Perl_safemalloc
    _Perl_saferealloc
    _Perl_sv_2pv
    _perl_call_sv
    _perl_eval_sv
    _perl_get_sv
    Trace/BPT trap

    Perhaps worse, after reverting to the old (v5.6) Perl, I still get get errors with fink:

    [mail:/] admin# fink scanpackages
    dyld: perl Undefined symbols:
    _Perl_get_sv
    _Perl_getcwd_sv
    _Perl_sv_2pv_flags
    _Perl_sv_setsv_flags
    Trace/BPT trap

    Any help? I must get this PDC set up today, so I guess I’ll have to compile samba myself and then do all updates on my own as well. 🙁 However, if someone has quick suggestions I can find something else to do for awhile while praying that someone responds to this post.

    #355375
    brossow
    Participant

    After another hour of digging on the ‘Net for a resolution to this, I finally discovered that this is a known issue caused by Fink. Here’s the solution: http://archive.develooper.com/macosx@perl.org/msg02447.html

    Just in case the page I linked to would disappear, here’s the text of that message:

    perl 5.8.0 issue on Mac OS X w/ fink
    
        * To: fink-devel@lists.sourceforge.net
        * Subject: perl 5.8.0 issue on Mac OS X w/ fink
        * From: Adam Foxson <afoxson@pobox.com>
        * Date: Fri, 19 Jul 2002 05:18:03 -0400
        * Cc: perl5-porters@perl.org, macosx@perl.org
        * Delivered-to: mailing list macosx@perl.org
        * Delivered-to: moderator for macosx@perl.org
        * Mailing-list: contact macosx-help@perl.org; run by ezmlm
        * User-agent: Mutt/1.3.24i
    
    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

    Following the advice above solved the issue for me. I’m posting this info in the hope that this helps someone else! Wish this info had been posted here earlier….

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.