Skip Menu |

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 58518
Status: open
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: jfields.bitcard.org [...] spammenot.com
Cc: CHORNY [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.99
Fixed in: (no value)



Subject: False Positive! Module::Install only supports 5.005 or newer Failure
When moving my module to a second (third, fourth) machine, Module::Install refuses to run based on the perl version being too old. But these machines are ubuntu 10.04 with stock perl 5.10.1. FYI: skipping this check on line 175 (as below) makes everything work just fine for me. I have worked around it but anybody else with stock setup should get caught. Cheers! John The Error: root@cmo01k:/home/ctiadmin/CTI-akTools# perl Makefile.PL include /home/ctiadmin/CTI-akTools/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm include inc/Module/Install/Makefile.pm Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker) root@cmo01k:/home/ctiadmin/CTI-akTools# From: ../Module/Install/Metdata.pm 163 sub perl_version { 164 my $self = shift; 165 return $self->{values}->{perl_version} unless @_; 166 my $version = shift or die( 167 "Did not provide a value to perl_version()" 168 ); 169 170 # Normalize the version 171 $version = $self->_perl_version($version); 172 173 # We don't support the reall old versions 174 unless ( $version >= 5.005 ) { 175 # die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker )\n"; 176 } 177 178 $self->{values}->{perl_version} = $version; 179 } My uname string: root@cmo01k:/home/ctiadmin/CTI-akTools# uname -a Linux cmo01k 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux My debian/ubuntu version: root@cmo01k:/home/ctiadmin/CTI-akTools# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS" My Perl: root@cmo01k:/home/ctiadmin/CTI-akTools# perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.24-27-server, archname=x86_64-linux-gnu-thread-multi uname='linux crested 2.6.24-27-server #1 smp fri mar 12 01:23:09 utc 2010 x86_64 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.1 -Dsitearch=/usr/local/lib/perl/5.10.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.1 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.4.3', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.11.1.so, so=so, useshrplib=true, libperl=libperl.so.5.10.1 gnulibc_version='2.11.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Apr 23 2010 08:21:31 @INC: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl
Subject: Re: [rt.cpan.org #58518] False Positive! Module::Install only supports 5.005 or newer Failure
Date: Mon, 21 Jun 2010 11:49:03 +1000
To: bug-Module-Install [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Apparently, it's not line 175 that is the problem here, it's line 174... Why is this coming up as false positive? Adam K On 19 June 2010 06:51, J Fields via RT <bug-Module-Install@rt.cpan.org> wrote: Show quoted text
> Fri Jun 18 16:50:59 2010: Request 58518 was acted upon. > Transaction: Ticket created by SirSpammenot >       Queue: Module-Install >     Subject: False Positive!  Module::Install only supports 5.005 or newer Failure >   Broken in: 0.99 >    Severity: Critical >       Owner: Nobody >  Requestors: jfields.bitcard.org@spammenot.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=58518 > > > > When moving my module to a second (third, fourth) machine, > Module::Install refuses to run based on the perl version being too old. >  But these machines are ubuntu 10.04 with stock perl 5.10.1. > > FYI: skipping this check on line 175 (as below) makes everything work > just fine for me. I have worked around it but anybody else with stock > setup should get caught. > > Cheers! > John > > The Error: > > root@cmo01k:/home/ctiadmin/CTI-akTools# perl Makefile.PL > include /home/ctiadmin/CTI-akTools/inc/Module/Install.pm > include inc/Module/Install/Metadata.pm > include inc/Module/Install/Base.pm > include inc/Module/Install/Makefile.pm > Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker) > root@cmo01k:/home/ctiadmin/CTI-akTools# > > From: ../Module/Install/Metdata.pm > > 163 sub perl_version { > 164         my $self = shift; > 165         return $self->{values}->{perl_version} unless @_; > 166         my $version = shift or die( > 167                 "Did not provide a value to perl_version()" > 168         ); > 169 > 170         # Normalize the version > 171         $version = $self->_perl_version($version); > 172 > 173         # We don't support the reall old versions > 174         unless ( $version >= 5.005 ) { > 175 #               die "Module::Install only supports 5.005 or newer > (use ExtUtils::MakeMaker )\n"; > 176         } > 177 > 178         $self->{values}->{perl_version} = $version; > 179 } > > My uname string: > > root@cmo01k:/home/ctiadmin/CTI-akTools# uname -a > Linux cmo01k 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC > 2010 x86_64 GNU/Linux > > My debian/ubuntu version: > > root@cmo01k:/home/ctiadmin/CTI-akTools# cat /etc/lsb-release > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=10.04 > DISTRIB_CODENAME=lucid > DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS" > > My Perl: > > root@cmo01k:/home/ctiadmin/CTI-akTools# perl -V > Summary of my perl5 (revision 5 version 10 subversion 1) configuration: > >  Platform: >    osname=linux, osvers=2.6.24-27-server, > archname=x86_64-linux-gnu-thread-multi >    uname='linux crested 2.6.24-27-server #1 smp fri mar 12 01:23:09 utc > 2010 x86_64 gnulinux ' >    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN > -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr > -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 > -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 > -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local > -Dsitelib=/usr/local/share/perl/5.10.1 > -Dsitearch=/usr/local/lib/perl/5.10.1 -Dman1dir=/usr/share/man/man1 > -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 > -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl > -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio > -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib > -Dlibperl=libperl.so.5.10.1 -Dd_dosuid -des' >    hint=recommended, useposix=true, d_sigaction=define >    useithreads=define, usemultiplicity=define >    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef >    use64bitint=define, use64bitall=define, uselongdouble=undef >    usemymalloc=n, bincompat5005=undef >  Compiler: >    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN > -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', >    optimize='-O2 -g', >    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing > -pipe -fstack-protector -I/usr/local/include' >    ccversion='', gccversion='4.4.3', gccosandvers='' >    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 >    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 >    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 >    alignbytes=8, prototype=define >  Linker and Libraries: >    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' >    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 >    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt >    perllibs=-ldl -lm -lpthread -lc -lcrypt >    libc=/lib/libc-2.11.1.so, so=so, useshrplib=true, > libperl=libperl.so.5.10.1 >    gnulibc_version='2.11.1' >  Dynamic Linking: >    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' >    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib > -fstack-protector' > > > Characteristics of this binary (from libperl): >  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV >                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP > USE_64_BIT_ALL >                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES >                        USE_PERLIO USE_REENTRANT_API >  Built under linux >  Compiled at Apr 23 2010 08:21:31 >  @INC: >    /etc/perl >    /usr/local/lib/perl/5.10.1 >    /usr/local/share/perl/5.10.1 >    /usr/lib/perl5 >    /usr/share/perl5 >    /usr/lib/perl/5.10 >    /usr/share/perl/5.10 >    /usr/local/lib/site_perl > > >
From: jfields.bitcard.org [...] spammenot.com
You are correct, line 174 is the test that fails, line 175 is where I put my "patch". I called it a false positive because it incorrectly determines that perl version 5.10.x is lower than 5.005. Which is obviously not the intended result. I marked it as critical because that prevents the module from completing a successful run. I was dead in the water (no makefile) until I applied my workaround. *Any* user with a stock install of ubuntu 10.4 should have this same problem. Show quoted text
>---------
Buuuut the reason it is failing is that your _perl_version() routine has some flawed logic. However I would call it a lot of effort in the wrong direction. :) First, you have the use... in your main Install.pm module: 19 use 5.005; 20 use strict 'vars'; 21 use Cwd (); 22 use File::Find (); 23 use File::Path (); So if the user's perl version was prior to 5.005 then your version normalizing code would not ever get to run. Perl would exit out in the early stages of init. Put a similar use statement the sub module you are concerned with and Ouila! Rip out your versioning code. Less code with same result. :) But then there would still be no nice error message to the user. Hmmm. (Keep in mind that nobody will ever see your nice message currently due to that use command.) Best practice is to put version dependent code in an eval block. That way perl is the arbiter of if perl can execute it, not an arbitrary scheme (in this case, versions). Your current way (strict versioning) is not future proof which is why it is no longer considered best practice. So rather than try to fix the version math I would just make the calls you are worried about in a eval wrapper and let perl error out with a good message at run time (remember to change/remove your use statement too). Much cleaner! Good job on your module, keep plugging away! John F On Sun Jun 20 21:49:13 2010, adam@ali.as wrote: Show quoted text
> Apparently, it's not line 175 that is the problem here, it's line > 174... > > Why is this coming up as false positive? > > Adam K
Do you use "perl_version" in Makefile.PL and which minimum version of Perl is required in module that is specified in "all_from"? -- Alexandr Ciornii, http://chorny.net
From: jfields.bitcard.org [...] spammenot.com
On Sun Sep 19 15:48:00 2010, CHORNY wrote: Show quoted text
> Do you use "perl_version" in Makefile.PL and which minimum version of > Perl is required in module that is specified in "all_from"?
I think the answer is no, it is not specified directly. I did a grep across the entire directory and found the author's routine: joot@TST01K:/home/ctiadmin/CTI-akTools$ grep -Rn perl_version * inc/Module/Install/Metadata.pm:163:sub perl_version { inc/Module/Install/Metadata.pm:165: return $self->{values}->{perl_version} unless @_; inc/Module/Install/Metadata.pm:167: "Did not provide a value to perl_version()" inc/Module/Install/Metadata.pm:171: $version = $self->_perl_version($version); inc/Module/Install/Metadata.pm:178: $self->{values}->{perl_version} = $version; inc/Module/Install/Metadata.pm:246: $self->perl_version_from($file) unless $self->perl_version; inc/Module/Install/Metadata.pm:392:sub _extract_perl_version { inc/Module/Install/Metadata.pm:402: my $perl_version = $1; inc/Module/Install/Metadata.pm:403: $perl_version =~ s{_}{}g; inc/Module/Install/Metadata.pm:404: return $perl_version; inc/Module/Install/Metadata.pm:410:sub perl_version_from { inc/Module/Install/Metadata.pm:412: my $perl_version=_extract_perl_version(Module::Install::_read($_[0])); inc/Module/Install/Metadata.pm:413: if ($perl_version) { inc/Module/Install/Metadata.pm:414: $self->perl_version($perl_version); inc/Module/Install/Metadata.pm:592:sub _perl_version { inc/Module/Install/Metadata.pm:664: my $perl = delete $val->{perl_version}; Show quoted text
>------------
The problem (IMHR) is in how it attempts version comparison and not in where the version originates from. I have actually switched to Local::Lib for other reasons on this project, but like Module::Install and expect to use it again. JF