On Sun, Jun 05, 2005 at 12:09:53AM -0000, Chris Prince wrote:
> == Reason ==
> The problem is in MM_Unix.pm.  There are two issues:
> (1) The value of $inc doesn't match the value used about 12 lines
> earlier (see "wild guess" comment).
> (2) More importantly, it doesn't match the actual location of perl.h,
> which the code checks for.
> 
> == Solution ==
> Instead of stripping the last directory from $found, should append
> "CORE".  This fixes both problems.

Two things which worry me about this patch.

1)  That code hasn't been touched in years.  Not since 2002 at least when
my records end.  I'm disinclined to touch complex things like 
cross-compliation which haven't been touched without several second opinions.
Then again, I can believe that something as obscure as installing modules
from an uninstalled Perl on Win32 would remain broken for years.

2)  Other places in the code which set PERL_INC don't always set CORE.
Here's the code for setting PERL_INC for a normal build while inside the
Perl source tree.

            $self->{PERL_INC}     = ($Is_Win32) ? 
              $self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};

AFAIK when building on Unix there is no CORE directory made and the include
files are in the top level source directory.  Headers in $src/lib/CORE looks 
like an anomaly of the Win32 build.

So I think the correct thing to do is...

--- lib/ExtUtils/MM_Unix.pm  (revision 2398)
+++ lib/ExtUtils/MM_Unix.pm  (local)
@@ -1608,7 +1608,8 @@
              $found = $dir, last if -e $self->catdir($dir, "Config.pm");
            }
            if ($found) {
-             my $inc = dirname $found;
+             my $inc = $Is_Win32 ? $self->catdir($found, "CORE" )
+                                  : dirname $found;
              if (-e $self->catdir($inc, "perl.h")) {
                $self->{PERL_LIB}          = $found;
                $self->{PERL_ARCHLIB}      = $found;


-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
Just call me 'Moron Sugar'.
        http://www.somethingpositive.net/sp05182002.shtml

Reply via email to