On Fri Mar 20 20:14:17 2009, TJENNESS wrote:
Show quoted text> CPAN now has a build dependency on File::HomeDir when using a
> darwin/OSX system. This is
> fine on 32-bit perl but if you are unlucky enough to be using a 64-bit
> perl on OSX (which is a
> trivial thing to do) you can now no longer update CPAN using the CPAN
> shell because
> File::HomeDir does not pass its tests on 64-bit (see RT #43549). The
> reason for this is that it
> uses Mac::Files to locate files and that uses Mac::Carbon which has no
> 64-bit implementation
> (RT #43551).
>
> The real fix is for an implementation of Mac::Files to exist that is
> based on Cocoa. The next layer
> of fix is to fix File::HomeDir so that it will at least skip some of
> the tests if it is on 64-bit. The
> final hack is to make CPAN work the old way if it sees that it's got a
> 64-bit perl on darwin.
>
> Note that most people have not noticed yet because perl5.10 does not
> have the correct
> configure switches in place to let the -Duse64bitall option work. Back
> porting the patch from
> blead fixes it so I assume that this will become a bit of an issue
> when 5.10.1 comes out.
Hey,
I hate to be a spoiler, but this is still broken on my Mac OS 10.4.11,
with Perl 5.8.8 installed. Also, I am not sure this is restricted to 64
bit only. Anyway, here is my (abbreviated) report when I try to
'install CPAN' from the CPAN shell.
First it unpacks CPAN and detects a missing dependency:
CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for CPAN
Show quoted text ---- Unsatisfied dependencies detected during ----
---- ANDK/CPAN-1.9402.tar.gz ----
File::HomeDir [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Next it trys to install File::HomeDir:
CPAN.pm: Going to build A/AD/ADAMK/File-HomeDir-0.86.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for File::HomeDir
---- Unsatisfied dependencies detected during ----
---- ADAMK/File-HomeDir-0.86.tar.gz ----
Mac::Carbon [requires]
Mac::Files [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Here is where we get into trouble. These two modules are totally
unreliable and have not been maintained for years. I've tried
installing them on several Macs, from 10.3x through 10.5x and I couldn't
get them to install anywhere. What buggers me the most is that even
without these dependencies, CPAN seems to pass all it's tests:
Result: PASS
ADAMK/File-HomeDir-0.86.tar.gz
Tests succeeded but 2 dependencies missing (Mac::Files,Mac::Carbon)
ADAMK/File-HomeDir-0.86.tar.gz
[dependencies] -- NA
Running make install
make test had returned bad status, won't install
So, File::HomeDir is only using a tiny bit of the bad Mac stuff, and
CPAN is only using part of File::HomeDir, yet the whole thing is blowing
up. Now, what happens when I force install File::HomeDir and then try
to install CPAN normally?
ANDK/CPAN-1.9402.tar.gz
make install -- OK
It installs without any trouble, passing all the tests.
Another related issue here is how in a Mac, due to File::HomeDir, can
actually end up creating multiple .cpan directories? How does this
happen? Well, in CPAN::HandleConfig, it will try to use File::HomeDir
to locate where to put the .cpan directory. On a Mac this will return
$home/Library/Application Support/.cpan
rather than in:
$home/.cpan
Yet the "$home/.cpan" directory is also create somehow. I guess this
is an Apple standard, but it's confusing to most perl people. In fact,
I have noticed that the vast majority of applications ignore the Apple
standard and just drop the 'dot' directories in $home where Unix people
expect it to be.
CPAN::HandleConfig will fall back to locating the parent folder of .cpan
by looking for a $ENV{HOME}, which is how I guess we end up with .cpan
is more than one place. I guess this could be a problem with Windows as
well
Anyway, sorry this is rambling, but I've spent the last two days playing
with this trying to make a new Catalyst installer that actually works
correctly on the Mac. I guess from my perspect two things:
1) File::HomeDir's dependency of the Mac::* stuff is very problematic.
2) for platforms like the Mac where 'dotfiles' are not dropped into the
$home directory, we need to make sure we don't have both $home/cpan and
$home/Application Support/.cpan
For 1), I dropped an email to the File::HomeDir maintainer offering to
take a shot at adding the minimal XS to get the files portion of the Mac
stuf working. I definitely don't have time to fix the entire Mac::*
stuff, but from my perspective there's like a half dozen functions here
that we really need.
For 2) we need a way to disambiguate between the two, and have some sort
of detection and offer to either let the user choose or migrate to
whichever is preferred. Right now having two causes tons of install
problems for my on the Macs I have to maintain.
I'm willing to help with either/or, please let me know if my assessment
is correct. Thank you!