Perl 5.8.0 & dyld: perl Undefined symbols

May 13, '03 10:00:00AM

Contributed by: projazz

An open Letter to Perl.org and Aaron Faby:

Perl.org's source code and your package distribution of the Perl 5.8.0 package may cause problems with Mac OS X applications such as command line tools such as CPAN, Fink, among others. I discovered the problem by trying to update perl 5.6.0 to 5.8.0. Like many others, I first tried Apple's instructions on installing perl-5.8.0. Then I tried Aaron Faby's package installer. Both gave the same problem. I kept getting errors in various dyld: perl Undefined symbols. After many hours of frustration and web searching, I think I have eliminated the problem. It seems the build either has an older version of Storable.pm or the standard Mac OS X perl-5.6.0 isn't overwritten using the latest Storable.pm (hidden in the darwin and/or perl5 folders).

This has been reported before in a few locations (1, 2, 3,4).

The solution for me was to (having tried the method on the above page and failed) load a fresh OS X install (with perl-5.6.0) on one drive, and and second fresh OS X install on a second drive (using your distribution of perl-5.8.0). I installed Fink on the first drive and installed the latest version of Storable.pm-2.07. I used PathFinder from CocoaTech to track down the older Storable.pm perl modules:

  file://localhost/System/Library/Perl/darwin/Storable.pm
  file://localhost/System/Library/Perl/darwin/auto/Storable/
  file://localhost/System/Library/Perl/Memoize/Storable.pm
I then substituted the updated versions on the second drive. Everything worked beautifully. No more dyld: perl Undefined symbols! I've included the perl crash log for reference (attached in the remainder of the hint).

Sincerely,

Michael M. Taylor, M.D.

Hope this helps someone, and maybe somebody smarter than me can figure out how to get Apple or Perl.org to correct the problem.

[robg adds: Although I edited the layout of this hint and fixed a couple of typos, I didn't edit the content at all - primarily because it's well beyond my skill set. I'm publishing it in the hopes that someone can verify it as a valid problem and solution -- any takers?]

The Perl crash log:

**********
Perl version 5.8.0
Date/Time:  2003-05-10 09:40:00 -0400
OS Version: 10.2.6 (Build 6L60)

Command:    perl
PID:        11760

Exception:  EXC_BREAKPOINT (0x0006)
Code[0]:    0x00000001Code[1]:    0x8fe01280

Thread 0 Crashed:
 #0   0x8fe01280 in halt
 #1   0x8fe106b4 in link_in_need_modules
 #2   0x8fe12230 in _dyld_link_module
 #3   0x90016ac8 in NSLinkModule
 #4   0x00001c7c in XS_DynaLoader_dl_load_file
 #5   0x00180060 in Perl_pp_entersub
 #6   0x001796f8 in Perl_runops_standard
 #7   0x0011c564 in S_run_body
 #8   0x0011c158 in perl_run
 #9   0x00001a9c in main
 #10  0x0000178c in _start (crt.c:267)
 #11  0x0000160c in start

PPC Thread State:
  srr0: 0x8fe01280 srr1: 0x0002d030                vrsave: 0x00000000
   xer: 0x20000000   lr: 0x8fe09c38  ctr: 0x8fe29468   mq: 0x00000000
    r0: 0x00000004   r1: 0xbffff320   r2: 0x8fe0b7f4   r3: 0x00000086
    r4: 0x00000000   r5: 0x00000086   r6: 0x0000000a   r7: 0x6c5f6765
    r8: 0x7376005f   r9: 0x00000000  r10: 0x8fe4850c  r11: 0x0000000c
   r12: 0x8fe71aad  r13: 0x002a0af0  r14: 0x00209adc  r15: 0x0020fb1c
   r16: 0x0020c0b4  r17: 0x0020c0b4  r18: 0x00000046  r19: 0x003dd7e0
   r20: 0x0020fb1c  r21: 0x00209984  r22: 0x00000001  r23: 0x00000000
   r24: 0x0020fb1c  r25: 0x00001af0  r26: 0x00001af0  r27: 0x0001d4cc
   r28: 0x8fe4841c  r29: 0x8fe484ec  r30: 0x8fe484ec  r31: 0x8fe099bc

**********

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030510134717974