jryan has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to upgrade my version of Perl on Mac OSX 10.2 from the default 5.6.0 to the new 5.8.2. I was able to successfully install, and after fixing some environment problems, everything seemed to work fine, as "make test" was 99.76% successful. However, when I tried to run a program I was working on before the upgrade, I discovered that wasn't able to use any modules. It turns out that the values in @INC were messed up. Every mention of the word "Perl" in the paths was followed by a "/5.8.2"; for instance, instead of "/System/Library/Perl", it would be "/System/Library/Perl/5.8.2", which of course doesn't exist. I tried to change these values during Configure by changing the values in config.sh, i.e. change:

archlib='/System/Library/Perl/5.8.2/darwin'
to
archlib='/System/Library/Perl/darwin'

However, this causes compile problems during make for some reason. I can't make any sense of it. Has anyone else had similar problems?

Thanks for the help,

- Joe

Replies are listed 'Best First'.
Re: Changing path values during Configure causes make problems during 5.8.2 install.
by tachyon (Chancellor) on Dec 20, 2003 at 09:43 UTC

    There is a file called README.macosx. Did you READIT?

    =head2 Installation Prefix The default installation location for this release uses the traditiona +l UNIX directory layout under /usr/local. This is the recommended locati +on for most users, and will leave the Apple-supplied Perl and its modules undisturbed. Using an installation prefix of '/usr' will result in a directory layo +ut that mirrors that of Apple's default Perl, with core modules stored in '/System/Library/Perl/${version}', CPAN modules stored in '/Library/Perl/${version}', and the addition of '/Network/Library/Perl/${version}' to @INC for modules that are stored on a file server and used by many Macs.

    When you say not use any modules I assume you mean not use any NON CORE modules. The downside of 5.8.x is it is not binary compatible with 5.6 so you have to recompile all non core modules and reinstall them. Actually only those that have C source ie XS modules not Pure Perl. Thus if you achieved your goal of pointing to the old 5.6.x libraries you would be in for some nasty suprises (Pure Perl would be OK, compiled stuff could/should/would/might crash)

    ./Configure PREFIX=/usr

    Given OS X is *nix and thus should support symlinks

    ln -s /System/Library/Perl/5.8.2 /System/Library/Perl

    This aliases /System/Library/Perl to the real dir /System/Lobrary/Perl/5.8.2. but you probably don't wnat to do that. You typically symlink the perl binary into /usr/bin/perl or /usr/bin/local/perl for ease of use. Some people will link to /usr/bin/Perl5.8 so you can get either the original with /usr/bin/perl or 5.8 with ....

    cheers

    tachyon

      ln -s /System/Library/Perl/5.8.2 /System/Library/Perl

      should not work, 'cause you're trying to create /System/Library/Perl symlink, which already exist. reverse the argument. So if you enter 5.8.2 symlink you come back to parent dir.

      ln -s /System/Library/Perl /System/Library/Perl/5.8.2

        As you say the order is:

        ln -s REAL_DESTINATION FAKE_DIR

        But if you do a default install you should end up with your perl in /blah/blah/5.8.2/HERE

        cheers

        tachyon

Re: Changing path values during Configure causes make problems during 5.8.2 install.
by stvn (Monsignor) on Dec 20, 2003 at 19:33 UTC
    Joe,

    The advice about sym links and binary incompatabilities are all good, and I agree with what the other respondents have said. But in the end, my best suggestion to you is to upgrade from 10.2 to 10.3.

    I have been running OS X since 10.0 (and I used to mess around with some older pre-release developer builds and even some Rhapsody stuff). And while 10.3 has its share of bumps and uglies, it is totally worth the upgrade. It updates alot of the underlying Unix tools in particular the installations of Perl, Python and Ruby. Perl is upgraded to 5.8.0 (not quite 5.8.2 but its ALOT better than 5.6.0).

    If you either dont want to upgrade to 10.3 or still feel after upgrading you want 5.8.2, you can take a look at these instructions from Apple's developer site, they might provide some insight.

    http://developer.apple.com/internet/macosx/perl.html

    They are instructions for upgrading from 5.6.0 to 5.8.0, but i imagine (although i dont know since i havent done it myself) that they are still relevant.

    Another point to keep in mind is that there is apparently a problem with the threaded version of Perl 5.8 and the latest DBI version on OS X. I am not sure if this has been resolved (I dont use threads).

    -stvn