You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sreeji K Das <sr...@yahoo.com> on 2003/08/07 15:50:02 UTC

[MP1.28 + perl maint. 20512] Build failure due to error in Apache/ExtUtils.pm

I tried to compile mod_perl-1.28 with perl maint.
20512 (http://www.iki.fi/jhi/perl@20512.tgz). I had a
build failure (different errors each time trying to
build).

I noticed the following messages during perl
Makefile.PL:
<MESSAGE>
..
 + id: Perl/v5.8.1 (linux)
[/nfs/private/user/srdas/i686/perl-pre-rc5/bin/perl]
Modification of a read-only value attempted at
/nfs/private/user/srdas/tech_stack/mod_perl-1.28/lib/Apache/ExtUtils.pm
line 50.
BEGIN failed--compilation aborted at
./modules/perl/perl_config line 6.
Modification of a read-only value attempted at
/nfs/private/user/srdas/tech_stack/mod_perl-1.28/lib/Apache/ExtUtils.pm
line 50.
BEGIN failed--compilation aborted at
./modules/perl/perl_config line 6.
Modification of a read-only value attempted at
/nfs/private/user/srdas/tech_stack/mod_perl-1.28/lib/Apache/ExtUtils.pm
line 50.
BEGIN failed--compilation aborted at
./modules/perl/perl_config line 6.
</MESSAGE>

Digging through, the following in Apache/ExtUtils.pm
seem to be the problem:
sub Config_pm_fixup {
....
local $_ = $Config::Config{$key};
  $sub->();
..

I could reproduce this using a small script:
$ cat repeat.pl
my $max_count = $ARGV[0] || 100;
while ($count++ <= $max_count)
{
        $ret = system("./oops.pl");
        if ($ret)
        {
          warn "#$count: Errored\n";  <STDIN>;
        }
}

$ cat oops.pl
#!perl
test('data');
sub test { replace() for (@_); }

sub replace
{
  my %hash = (
    ld => sub { s/(.*)/T1/e },
    ccdlflags => sub { s/(.*)/T2/; },
  );

  while (my($key, $sub) = each %hash)
  {
     local $_ = 'test';
     $sub->();
  }
}
-------------------
I ran it as:
$ perl ~/repeat.pl
Modification of a read-only value attempted at
/home/srdas/junk line 16.
#3: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#5: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#6: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#7: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#8: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#12: Errored

Modification of a read-only value attempted at
/home/srdas/junk line 16.
#13: Errored
------------------

1) The script ran perfectly fine on 5.6.1, 5.8.0 and
   also on 5.8.1 RC4
2) This looks similar to bug # 23238
(http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-08/msg00518.html)
3) local *_ before the local $_ in Apache/ExtUtils.pm
(or in the test script) solves the problem.

For whatever is worth, this is the above diff:
diff -u lib/Apache/ExtUtils.pm.org
lib/Apache/ExtUtils.pm
--- lib/Apache/ExtUtils.pm.org  Thu Aug  7 06:46:12
2003
+++ lib/Apache/ExtUtils.pm      Thu Aug  7 06:43:36
2003
@@ -47,6 +47,7 @@
     );
 
     while (my($key, $sub) = each %config_fixups) {
+       local *_;
        local $_ = $Config::Config{$key};
        $sub->();
        (tied %Config::Config)->{$key} = $_;
---------------------------------------------------

Now since this was working until RC4, I'd consider
this a bug. Should this go over to perl5-porters ?

thx
Sreeji
-------------
For completeness, I've attached my perl-details.

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

Re: [MP1.28 + perl maint. 20512] Build failure due to error in Apache/ExtUtils.pm

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Sreeji K Das wrote:
> 
>> I tried to compile mod_perl-1.28 with perl maint.
>> 20512 (http://www.iki.fi/jhi/perl@20512.tgz). I had a
>> build failure (different errors each time trying to
>> build).
>>
> Have you tried http://www.iki.fi/jhi/perl@20537.tgz ? That snapshot 
> worked OK for me on WinXP.

I can see it broken too @20543, forwarded to p5p

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [MP1.28 + perl maint. 20512] Build failure due to error in Apache/ExtUtils.pm

Posted by Steve Hay <st...@uk.radan.com>.
Sreeji K Das wrote:

>I tried to compile mod_perl-1.28 with perl maint.
>20512 (http://www.iki.fi/jhi/perl@20512.tgz). I had a
>build failure (different errors each time trying to
>build).
>
Have you tried http://www.iki.fi/jhi/perl@20537.tgz ? That snapshot 
worked OK for me on WinXP.

- Steve