Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Perl 5.8.0 & dyld: perl Undefined symbols UNIX
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

**********
    •    
  • Currently 3.50 / 5
  You rated: 5 / 5 (4 votes cast)
 
[7,500 views]  

Perl 5.8.0 & dyld: perl Undefined symbols | 8 comments | Create New Account
Click here to return to the 'Perl 5.8.0 & dyld: perl Undefined symbols' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
There's a much simpler solution
Authored by: kwalker on May 13, '03 11:01:41AM

I had the same (or at least a very similar) problem. There's a much easier fix:

(1) Disable the old fink copy of Storable.pm (/sw/lib/perl5/darwin/....). e.g. rename or delete all the Storable files in the above directory and its subdirectories

(2) Install a new Storable.pm using your favorite method (Cpan.pm or whatever). This is unnecessary if you already have a new version of Storable installed.

That's it. See also:

http://fink.sourceforge.net/faq/usage-fink.php

---
lkjlkjtrlykjlkjhflkjulkytmnmtkj,g,h,y,u,j,h,i,w



[ Reply to This | # ]
HOW TO: building/upgrading Perl 5.8.0 & CPAN from scratch
Authored by: blakers on May 23, '03 03:29:50PM

previous comment is correct --> differences bet 5.6.0 and 5.8.0 are not insignificant, and can be troublesome ....

my suggestion? "clean house" ....

this works flawlessly for me ....

CLEAN INSTALL: perl-5.8.0

# personally i recommend upgrading BerkeleyDB before Perl, but it's optional ....

in shell (tcsh here ...), login as ROOT

mkdir /usr/ports
cd /usr/ports

curl -O ftp://ftp.cpan.org/pub/CPAN/src/perl-5.8.0.tar.gz

unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS
unsetenv LC_ALL LANG LINGUAS
setenv DYLD_LIBRARY_PATH /usr/ports/perl-5.8.0

gnutar zxf perl-5.8.0.tar.gz
cd /usr/ports/perl-5.8.0


# clear out existing Perl & cpan before new build ...
rm -rf \
/System/Library/Perl \
/Library/Perl \
/usr/bin/perl* \
/usr/bin/find2perl \
/usr/docs/ref/perl \
/usr/libexec/httpd/libperl.so \
/var/root/.cpan


./Configure -Dfirstmakefile=GNUmakefile -Duseperlio -Dusethreads -Dprefix=/usr -Dperladmin=yourname@yourdomain.com -Dcf_email=yourname@yourdomain.com -Dperllibs='-lc' -Dlibs='-lc'


# ENTER the configuration dialogue .....
# accept defaults by entering "& -d", i.e.:
Which of these apply, if any? [darwin] "& -d"
(OK, I'll run with -d after this question.)
Which of these apply, if any? [darwin] "RETURN"
.....


make
make test
make install

unsetenv DYLD_LIBRARY_PATH

# now update CPAN
perl -MCPAN -e shell

# ENTER the configuration dialogue .....
# accept defaults, except:

CPAN build and cache directory? [/usr/ports/cpan_build]
Policy on building prerequisites (follow, ask or ignore)? [follow]
Parameters for the 'perl Makefile.PL' command? Your choice: [LINKTYPE=dynamic]
Parameters for the 'make install' command? Your choice: [UNINST=1]
.....

cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install Bundle::libnet MD5 DB_File
# install/update any/all other modules you need ...
cpan>q

and you're finished!



[ Reply to This | # ]
HOW TO: building/upgrading Perl 5.8.0 & CPAN from scratch
Authored by: ld50 on Nov 03, '03 07:33:36AM

i found another easy way.

if you have fink installed first you have to update your fink then install the fink update for perl 5.8.0

apt-get update
apt-get install system-perl580

now finks perl is 5.8

then the perl installer seems to leave some of the old files around from the previous version of 5.6
so just move or remove /System/Library/Perl , /Library/Perl and /Network/Library/Perl (if you have it)

now when make install runs it'll install all the new perl files.
i worked for me. os x 10.2

mich



[ Reply to This | # ]
Perl 5.8.0 & dyld: perl Undefined symbols
Authored by: aaronfaby on May 13, '03 11:11:34AM

This is not a bug.

Perl modules built against version 5.6 are not compatible with version 5.8, and therefore need to be rebuilt after updating or you will get these exact error messages. The user simply failed to read the documentation.

See this reply for more information.



[ Reply to This | # ]
Perl 5.8.0 & dyld: perl Undefined symbols
Authored by: lrivers on May 13, '03 03:28:39PM

It would be great if it were easier to update and maintain perl on Mac OS X, and adding fink to the mix certainly doesn't help.

Sherm's response is also, in it's way, correct but it does not address the problems of the casual or beginner perl delver.

He says:
With all due respect, the best solution is pre-emptive: Delve into the Perl documentation until you're thoroughly familiar with Perl's directory layout and the effects of the PERL5LIB variable. Then, plan your installation before entering a single shell command. Installing Perl is *not* a simple task, and trying to proceed as if it is (or should be) quite often results in problems such as you describe.

OK, why shouldn't it be easy? Why shouldn't it have better error messages? Why is it so hard to find out what the problem is when this class of error shows up? I'm no dewey-eyed newbie, but I have had lots of problems getting various perl modules to work with various combinations of perl, fink, darwinports, PostgreSQL (try compiling DBD::pg without compiling everything else first to encounter similar problems).

I appreciate what Aaron Faby provides and respect his and Sherm's obvious knowledge (no doubt hard won). Nobody is born with the perl docs as instinct...

Perl comes on every Mac OS X box, and it should work with CPAN, fink, darwinports and so forth without being a complete horrorshow for the intermediate geek.



[ Reply to This | # ]
Perl 5.8.0 & dyld: perl Undefined symbols
Authored by: carsten on May 13, '03 07:30:15PM

Perl 5.8.0 changed enough from the 5.6 included with Mac OS X that a small handful of binary modules are incompatible, and they simply need to be recompiled (such as the popular Storable.pm). This is a known and documented perl issue (from the developers of perl itself), even if the error messages are too technical for many people to understand, such as me.

Fortunately the fink developers have been aware of and discussing this perl module version incompatibility and are presently writing upgrades to fink to provide seamless transition to the newer perl and any modules which must be compiled specificially against the newer version.

This is not a problem specific to Mac OS X, Debian and other Lunix have been affected too.

In the mean time you'll have to delete all XM perl binaries beforehand if you decide to upgrade perl on your own.



[ Reply to This | # ]
Perl 5.8.0 & dyld: perl Undefined symbols
Authored by: gdelfino on May 23, '03 11:19:02AM

Is there a problem if I just install the new Perl using CPAN?

sudo perl -MCPAN -e shell

[ Reply to This | # ]
Even easier solution
Authored by: Greg on Jan 20, '04 10:07:25AM

This problem arose on my machine because the PERL5LIB variable
was pointing to a fink source that was no longer needed. So the
fix is to remove this directive completely as follows:

sudo pico /sw/bin/init.csh

then comment out the following lines by placing a # at the beginning

if ( $?PERL5LIB ) then
prepend_path PERL5LIB /sw/lib/perl5:/sw/lib/perl5/darwin
else
setenv PERL5LIB /sw/lib/perl5:/sw/lib/perl5/darwin
endif

Now perl works as expected when you log back into the terminal. Thanks to the previous posters for pointing out the problem.



[ Reply to This | # ]