This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
44455
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
TJENNESS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
(no value)



Subject: CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
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.
And does CPAN.pm work sufficiently well on such a 64bit system without File::HomeDir? Or what breaks if you force install it and simply use it? I mean, can we get away with simply dropping the dependency or do we need code changes too?
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Fri, 20 Mar 2009 20:25:47 -1000
To: bug-CPAN@rt.cpan.org
From: Tim Jenness <tjenness@cpan.org>
The CPAN module works fine in bleadperl, and it's only when trying to update CPAN itself from the CPAN shell that things go wrong. It's close enough to a normal BSD system that things will work and you'll just get complaints about the same things that people were complaining about that resulted in File::HomeDir being used in the first place.

So removing the dependency on File::HomeDir will probably be fine. I'd be happy if the dependency was only dropped when you knew you had 64-bit pointers as well as darwin.

Tim

On Fri, Mar 20, 2009 at 7:32 PM, Andreas Koenig via RT <bug-CPAN@rt.cpan.org> wrote:
Show quoted text
<URL: https://rt.cpan.org/Ticket/Display.html?id=44455 >

And does CPAN.pm work sufficiently well on such a 64bit system without
File::HomeDir? Or what breaks if you force install it and simply use it?
I mean, can we get away with simply dropping the dependency or do we
need code changes too?

Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Sun, 22 Mar 2009 08:35:22 -0400
To: bug-CPAN@rt.cpan.org
From: David Golden <dagolden@cpan.org>
On Sat, Mar 21, 2009 at 2:26 AM, TJENNESS via RT <bug-CPAN@rt.cpan.org> wrote:
Show quoted text
> So removing the dependency on File::HomeDir will probably be fine. I'd be > happy if the dependency was only dropped when you knew you had 64-bit > pointers as well as darwin.
I'd rather try to fix this upstream -- at least in File-HomeDir -- than make yet another change to how CPAN.pm handles home directory detection. File-HomeDir is in Alias' open repo, so I just patched it to fall back to Unix mode. Tim -- can you check out this SVN repo and tell me if it passes tests? (I don't have Darwin available to test.) http://svn.ali.as/cpan/trunk/File-HomeDir/ -- David
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Mon, 23 Mar 2009 09:43:21 -1000
To: bug-CPAN@rt.cpan.org
From: "tim.jenness" <tim.jenness@gmail.com>
On Mar 22, 2009, at 2:35 AM, David Golden via RT wrote:
Show quoted text
I'm clearly being a bit stupid since the Makefile.PL file in that checkout doesn't work in the normal way. Regardless, this line in Makefile.PL: } elsif ( $^O eq 'darwin' ) { requires 'Mac::Carbon' => '0.77'; requires 'Mac::Files' => '1.09'; will cause trouble before we even get to the point of running the module. That dependency will force Mac::Carbon to be installed from the CPAN shell which will cause an install failure on 64-bit. PS I reported this problem for the CPAN distribution since I wasn't sure whether anyone had noticed my earlier report on File::HomeDir (I'm guilty of ignoring bug reports as well) and it really was an issue with cpan in the short term. -- Tim Jenness
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Mon, 23 Mar 2009 18:33:06 -0400
To: bug-CPAN@rt.cpan.org
From: David Golden <dagolden@cpan.org>
On Mon, Mar 23, 2009 at 5:14 PM, tim.jenness via RT <bug-CPAN@rt.cpan.org> wrote:
Show quoted text
> I'm clearly being a bit stupid since the Makefile.PL file in that > checkout doesn't work in the normal way. Regardless, this line in > Makefile.PL:
You just need to install Module::Install and then it'll work more or less like normal. (Welcome to the Borg. You will be assimilated.)
Show quoted text
> PS I reported this problem for the CPAN distribution since I wasn't > sure whether anyone had noticed my earlier report on File::HomeDir > (I'm guilty of ignoring bug reports as well) and it really was an > issue with cpan in the short term.
No problem. Generally, for anything in the ali.as repo, my approach is to patch first, then nudge Adam to do a release. ;-) (If you don't have a commit bit there, just email him with your CPAN id and ask. He hands them out like candy.) -- David
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Mon, 23 Mar 2009 15:29:26 -1000
To: bug-CPAN@rt.cpan.org
From: "tim.jenness" <tim.jenness@gmail.com>
On Mar 23, 2009, at 12:39 PM, David Golden via RT wrote:
Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=44455 > > > On Mon, Mar 23, 2009 at 5:14 PM, tim.jenness via RT > <bug-CPAN@rt.cpan.org> wrote:
>> I'm clearly being a bit stupid since the Makefile.PL file in that >> checkout doesn't work in the normal way. Regardless, this line in >> Makefile.PL:
> > You just need to install Module::Install and then it'll work more or > less like normal. (Welcome to the Borg. You will be assimilated.) >
--- lib/File/HomeDir.pm (revision 5739) +++ lib/File/HomeDir.pm (working copy) @@ -5,7 +5,7 @@ use 5.00503; use strict; use Carp (); -use Config (); +use Config; use File::Spec (); # Globals Otherwise %Config is not imported. That and the fix to PREREQ_PM passes all tests. Although this line: t/11_darwin.t ... skipped: Not running on Darwin is amusing. Maybe that should say "Not running on 32-bit Darwin" or something. -- Tim Jenness
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Mon, 23 Mar 2009 21:36:21 -0400
To: bug-CPAN@rt.cpan.org
From: David Golden <dagolden@cpan.org>
On Mon, Mar 23, 2009 at 9:29 PM, tim.jenness via RT <bug-CPAN@rt.cpan.org> wrote:
Show quoted text
> -use Config     (); > +use Config;
I went the other way and did $Config::Config{...} to keep the package namespace clean. Also committed the other changes you suggested. Please check the latest trunk. If that works, then we can ask Adam to put out a dev release. -- David
Subject: Re: [rt.cpan.org #44455] CPAN requirement on File::HomeDir on OSX breaks 64-bit perl
Date: Mon, 23 Mar 2009 15:44:09 -1000
To: bug-CPAN@rt.cpan.org
From: "tim.jenness" <tim.jenness@gmail.com>
Works for me. Thanks. On Mar 23, 2009, at 3:36 PM, David Golden via RT wrote:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=44455 > > > On Mon, Mar 23, 2009 at 9:29 PM, tim.jenness via RT > <bug-CPAN@rt.cpan.org> wrote:
>> -use Config (); >> +use Config;
> > I went the other way and did $Config::Config{...} to keep the package > namespace clean. Also committed the other changes you suggested. > > Please check the latest trunk. If that works, then we can ask Adam to > put out a dev release. > > -- David >
-- Tim Jenness
1.93_52 released, ticket look like resolved. Please re-open if something is missing. Thanks!
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!
RT-Send-CC: dagolden@cpan.org, tim.jenness@gmail.com, tjenness@cpan.org
RT#43549 (in the File::HomeDir queue) has been fixed long time ago. We should probably close this bug too. -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
Yes, and the dev version of CPAN has new code to try to avoid creating extra directories when one already exists. Closing the ticket. Thank you!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.