After seeing a post on installing 5.8 on MacOS X the other day, and being unsuccessful in the past, I decided to try again. After some problems, research and solutions, I was successful. Since I had to do quite a bit of Web searching, etc., I thought I'd post my steps and notes here. Now, granted I am not a guy that needs several versions of Perl for development and testing of modules. I'm also not claiming this to be definitive, of course. It seems to work for me. I have fink installed. I used the default '/usr/local' installation base, not replacing Apple's install, despite my using their article's instructions.
Feel free to comment, point out flaws, potential trouble spots, etc. Thanks in advance.
Paul
Installing 5.8.0 ----------------
Preinstall system check: --- % date; sw_vers; Sun Jul 13 11:52:03 EDT 2003 ProductName: Mac OS X ProductVersion: 10.2.6 BuildVersion: 6L60
% perl -v | grep 'built for' This is perl, v5.6.0 built for darwin
% fink --version | grep version Package manager version: 0.13.2 Distribution version: 0.5.3 ---
Following Apple's instructions resulted in a successful installation of Perl 5.8.0:
http://developer.apple.com/internet/macosx/perl.html
Here are some other URLs visited in research:
http://archive.develooper.com/[EMAIL PROTECTED]/msg02447.html [19 Jul 2002 - Covers undefined symbols]
http://search.cpan.org/author/JHI/perl-5.8.0/pod/perldelta.pod Section: Mac_OS_X_dyld_undefined_symbols [Covers undefined symbols]
http://archive.develooper.com/[EMAIL PROTECTED]/msg03368.html [30 Sep 2002 - Covers removing '.bundle' files]
http://groups.google.com/groups?q=fink+group:perl.macosx+group:perl.macosx&hl=en&lr=&ie=UTF-8&group=perl.macosx&scoring=d&selm=200307082057.h68Kvs328415%40localhost.localdomain&rnum=2 [2003-07-08 - Notes that as of version 5.3 "Fink will now coexist quite happily with Perl 5.8"]
Here are the steps I took to install Perl 5.8:
1) get 5.8.0 archive from CPAN, placing in /usr/local/src:
---
% cd /usr/local/src
% sudo cpan
Password:
cpan> get /J/JH/JHI/perl-5.8.0.tar.gz
cpan> exit
---
or get it here:
http://search.cpan.org/author/JHI/perl-5.8.0/
---
2) expand, configure, and install following the Apple instructions,
not using '/usr' as the install location to replace Apple's Perl,
but using the default 5.8 '/usr/local' location:
---
% pwd
/usr/local/src
% tar zxvf perl-5.8.0.tar.gz
% cd perl-5.8.0
% setenv LC_ALL C
% ./Configure -de [EMAIL PROTECTED] [EMAIL PROTECTED]
% make
% sudo make test
% sudo make install
---
3) check Perl version and location, after installation:
---
% perl -v | grep 'built for'
This is perl, v5.8.0 built for darwin
% which perl
/usr/bin/perl
% ls /usr/bin/perl*
/usr/bin/perl* /usr/bin/perlbug* /usr/bin/perldoc*
/usr/bin/perl5.6.0* /usr/bin/perlcc*
---
% ls -li /usr/bin/perl /usr/local/bin/perl
889573 -rwxr-xr-x 3 root wheel 21560 Jul 12 14:42 /usr/bin/perl*
889573 -rwxr-xr-x 3 root wheel 21560 Jul 12 14:42 /usr/local/bin/perl*
---
Same inode. These are identical, hard-linked files.
After installation of 5.8.0, running CPAN requires new configuration, choosing CPAN URLs, etc. After which it complains: --- % sudo cpan dyld: perl Undefined symbols: _Perl_sv_2pv _perl_get_sv Trace/BPT trap ---
So, I'm using fink version 5.3, but CPAN still fails with undefined symbols. One discussion URL above recommended moving the old Perl shared library out of the way and then reissuing "make install" but doing this and running CPAN still failed. More searching found this: --- http://archive.develooper.com/[EMAIL PROTECTED]/msg03368.html --- % locate .bundle | grep Perl [many files listed in /System/Library/Perl and /Library/Perl. I'll remove bundles from the latter...] % cd /Library/Perl/darwin/auto % sudo rm -rf ./* Password: --- % cd /usr/local/src/perl-5.8.0 % su Password: # make install ---
I can now run CPAN. --- cpan> install Bundle::CPAN cpan> reload cpan cpan> install Date::Manip ---
Successfully installed Date::Manip. So, a module install using CPAN works.
Since I have fink installed, I'll check the versions of Storable.pm, since it was mentioned as needing to be moved/renamed and rebuilt: --- % perl "-MStorable 99" Storable version 99 required--this is only version 2.04. BEGIN failed--compilation aborted.
% fink list storable-pm
Information about 1277 packages read in 9 seconds.
i storable-pm 1.0.14-6 Placeholder for versioned Storable packages
i storable-pm560 1.0.14-3 Perl module for persistent data structures, v. 5...
storable-pm561 1.0.14-3 Perl module for persistent data structures, v. 5...
---
So, I used fink to remove the two fink packages. I then used fink to install 'ispell' and 'cddb-pm' successfully to check fink operation, since it relies on Storable.