[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-porters
Subject: Re: [perl #36128] [PATCH] 5.8.7 (ExtUtils) Fixed compiling packages with an 'uninstalled' perl.
From: Chris Prince <cprince () gmail ! com>
Date: 2005-06-30 18:28:10
Message-ID: 769fe25d050630112853d17e0c () mail ! gmail ! com
[Download RAW message or body]
That seems good to me. Do you want to make the change? Or do I need
to submit another patch?
On 30 Jun 2005 07:13:08 -0000, Michael G Schwern via RT
<perlbug-followup@perl.org> wrote:
> 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 schwern@pobox.com http://www.pobox.com/~schwern
> Just call me 'Moron Sugar'.
> http://www.somethingpositive.net/sp05182002.shtml
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic