develooper Front page | perl.perl5.porters | Postings from August 2003

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

Thread Previous | Thread Next
From:
Stas Bekman
Date:
August 7, 2003 16:34
Subject:
Re: [Fwd: [MP1.28 + perl maint. 20512] Build failure due to error in Apache/ExtUtils.pm]
Message ID:
3F32E157.8040906@stason.org
Stas Bekman wrote:
> I can see it broken too @20543, some recent change in MM broke things.

Didn't have a chance to look in details, but it might be a Config thing and 
not MM, since it fails at:

     while (my($key, $sub) = each %config_fixups) {
	local $_ = $Config::Config{$key};
        ^^^^^^^^^^^
	$sub->();
	(tied %Config::Config)->{$key} = $_;
     }

Config.pm values are now read-only and they weren't before?


> -------- Original Message --------
> Date: Thu, 7 Aug 2003 14:50:02 +0100 (BST)
> From: Sreeji K Das <sreeji_k@yahoo.com>
> Subject: [MP1.28 + perl maint. 20512] Build failure due to error in 
> Apache/ExtUtils.pm
> To: modperl@perl.apache.org
> 
> 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/
> 
> 
> ------------------------------------------------------------------------
> 
> 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 20000731 (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
>     alignbytes=4, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib /usr/lib
>     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
>     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
>     libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
>     gnulibc_version='2.2.4'
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl): 
>   Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
>   Locally applied patches:
>   	MAINT20511
>   Built under linux
>   Compiled at Aug  7 2003 00:19:15
>   @INC:
>     //nfs/private/user/srdas/i686/perl-pre-rc5/lib/5.8.1/i686-linux-thread-multi
>     //nfs/private/user/srdas/i686/perl-pre-rc5/lib/5.8.1
>     //nfs/private/user/srdas/i686/perl-pre-rc5/lib/site_perl/5.8.1/i686-linux-thread-multi
>     //nfs/private/user/srdas/i686/perl-pre-rc5/lib/site_perl/5.8.1
>     //nfs/private/user/srdas/i686/perl-pre-rc5/lib/site_perl
>     .
> 


-- 


__________________________________________________________________
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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About