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

2003-08-14 Thread Steve Hay
Sreeji K Das wrote:

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

- Steve



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

2003-08-14 Thread Stas Bekman
Steve Hay wrote:
Sreeji K Das wrote:

I tried to compile mod_perl-1.28 with perl maint.
20512 (http://www.iki.fi/jhi/[EMAIL PROTECTED]). I had a
build failure (different errors each time trying to
build).
Have you tried http://www.iki.fi/jhi/[EMAIL PROTECTED] ? That snapshot 
worked OK for me on WinXP.
I can see it broken too @20543, forwarded to p5p

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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

2003-08-10 Thread Sreeji K Das
I tried to compile mod_perl-1.28 with perl maint.
20512 (http://www.iki.fi/jhi/[EMAIL PROTECTED]). 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/Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.9-e.18smp, archname=i686-linux-thread-multi
uname='linux ap631wgs 2.4.9-e.18smp #1 smp fri apr 11 18:24:51 edt 2003 i686 
unknown '
config_args='-de -Dprefix=//nfs/private/user/srdas/i686/perl-pre-rc5 
-Dmake=/usr/bin/make -Dbin=/nfs/private/user/srdas/i686/perl-pre-rc5/bin/ 
-Uinstallusrbinperl -Dusethreads 
-Dstartperl=#!/nfs/private/user/srdas/i686/perl-pre-rc5/bin/perl 
-Dinc_version_list=none -Dscriptdir=//nfs/private/user/srdas/i686/perl-pre-rc5/bin 
-Dsitebin=/nfs/private/user/srdas/i686/perl-pre-rc5/bin -Doptimize=-O2'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing 
-I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.2 2.96-108.1)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8