Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Reporter CPAN distribution.

Report information
The Basics
Id: 37059
Status: resolved
Priority: 0/
Queue: CPAN-Reporter

People
Owner: Nobody in particular
Requestors: Support [...] RoxSoft.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.15
Fixed in: (no value)



Subject: Fails to install build_requires modules from META.yml
Fails to install the build_requires modules from the META.yml file before running Makefile.PL. This leads to ExtUtils::MakeMaker failing unnecessarily
Subject: Re: [rt.cpan.org #37059] Fails to install build_requires modules from META.yml
Date: Wed, 25 Jun 2008 05:50:04 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Tue, Jun 24, 2008 at 1:05 PM, Peter Flanigan via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> Fails to install the build_requires modules from the META.yml file > before running Makefile.PL. This leads to ExtUtils::MakeMaker failing > unnecessarily
Generally, CPAN::Reporter has no role in prerequisite resolution. That is a handled by CPAN.pm. So I need more information to understand what problem you're having and how to address it. First, is this is a problem installing CPAN::Reporter, or installing some other module when CPAN::Reporter is installed? If the latter, which module? Second, in either case, could you please post a copy of the output with the failure messages? That may help me understand what's going on. Thanks, David
Subject: Re: [rt.cpan.org #37059] Fails to install build_requires modules from META.yml
Date: Wed, 25 Jun 2008 11:32:22 +0100
To: bug-CPAN-Reporter [...] rt.cpan.org
From: Peter Flanigan <pjf [...] roxsoft.co.uk>
David Golden via RT wrote: Show quoted text
> Second, in either case, could you please post a copy of the output > with the failure messages? That may help me understand what's going > on.
For example: This is a computer-generated report for Data-CloudWeights-0.2.57 on perl 5.8.8 patch 34066, created by CPAN-Reporter-1.1556. Output from '/home/david/perl/5.8.x/bin/perl Makefile.PL': Checking if your kit is complete... Looks good Warning: prerequisite Class::Accessor::Fast 0.31 not found. Warning: prerequisite Readonly 1.03 not found. Warning: prerequisite version 0.74 not found. Could not eval ' package ExtUtils::MakeMaker::_version; no strict; BEGIN { eval { # Ensure any version() routine which might have leaked # into this package has been deleted. Interferes with # version->import() undef *version; require version; "version"->import; } } local $VERSION; $VERSION=undef; do { use version; our $VERSION = qv( sprintf '0.2.%d', q$Rev: 57 $ =~ /\d+/gmx ); }; $VERSION; ' in lib/Data/CloudWeights.pm: Can't locate version.pm in @INC (@INC contains: /home/david/perl/5.8.x/lib/site_perl/5.8.8/i686-linux-64int-ld /home/david/perl/5.8.x/lib/site_perl/5.8.8 /home/david/perl/5.8.x/lib/5.8.8/i686-linux-64int-ld /home/david/perl/5.8.x/lib/5.8.8 /home/david/perl/5.8.x/lib/site_perl/5.8.8/i686-linux-64int-ld /home/david/perl/5.8.x/lib/site_perl/5.8.8 .) at (eval 8) line 16, <$fh> line 11. BEGIN failed--compilation aborted at (eval 8) line 16, <$fh> line 11. WARNING: Setting VERSION via file 'lib/Data/CloudWeights.pm' failed at /home/david/perl/5.8.x/lib/5.8.8/ExtUtils/MakeMaker.pm line 511 My understanding is that because the META.yml contains build_requires: Test::More: 0.74 version: 0.74 the version module should be installed before Makefile.PL is executed -- Regards
Subject: Re: [rt.cpan.org #37059] Fails to install build_requires modules from META.yml
Date: Wed, 25 Jun 2008 07:40:33 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Wed, Jun 25, 2008 at 6:33 AM, Peter Flanigan via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> ' in lib/Data/CloudWeights.pm: Can't locate version.pm in @INC > (@INC contains: > [snip] > My understanding is that because the META.yml contains > > build_requires: > Test::More: 0.74 > version: 0.74 > > the version module should be installed before Makefile.PL is executed
This is a bug in Data::CloudWeights, though it's a subtle one caused by the way you are using version.pm. Because you are using VERSION_FROM in your Makefile.PL, version.pm is a *configure-time* dependency, not a build-time dependency. This is now officially enshrined in the latest META.yml specification as "configure_requires" -- which is supported in recent versions of CPAN.pm (including the one on the machine that generated the test report). See: http://module-build.sourceforge.net/META-spec-current.html Furthermore, the version.pm documentation is half right and half wrong. Module::Build (latest release) does have it's own 'version object' for compatibility at configure-time. But the version.pm documentation is correct that ExtUtils::MakeMaker does not. And you are trying to use version.pm with EU::MM, which is going to fail unless version.pm is installed *before* Makefile.PL is run and normal dependencies aren't installed until after the PL has finished. And even if you set 'requires' and 'build_requires' in META.yml, those requirements are generally not used because of an obscure META.yml setting, 'dynamic_config', which defaults to *true* if missing. That signals that requirements can't be trusted unless dynamically generated by running Makefile.PL or Build.PL. This is a quirk of META.yml. So your dependencies aren't installed because the Makefile.PL died and dependencies aren't installed by CPAN.pm until after Makefile.PL runs and determines the "official" prerequisites. Fortunately, this behavior doesn't apply to 'configure_requires', which is always valid as it applies before *.PL is ever run. So you have a number of options: * configure_requires for version.pm (but this won't help on older versions of CPAN.pm) * use Build.PL instead of Makefile.PL as newer versions can handle version * 'use 5.010' -- as 5.10 includes version objects by default * bundle the pure perl version.pm in inc/ and add that to @INC if $] < 5.009005 (but could be buggy) * set your version explicitly in Makefile.PL instead of having "VERSION_FROM" (I think that will let the PL finish and then the prerequisites should be loaded before your code actually runs). But the NA report is actually correct. A stock perl 5.8.8 can't handle your distribution because of the way you use version.pm. As a side note, I notice in your latest release that you have "exit 0" in Makefile.PL if it appears to be running on my smoke test machine (@INC matching 'home/david'). That's a pretty severe option for something that is only generating an 'NA' report and it could impact any other potential user with that username. In the future, if you have questions about some test report I've filed, please feel free to contact me directly and I'm happy to figure out whether the problem is in the smoker or in your code. Regards, David
On Wed Jun 25 07:40:50 2008, DAGOLDEN wrote: Show quoted text
> * configure_requires for version.pm (but this won't help on older > versions of CPAN.pm)
Many thanks for the information. I have modified my copy of Module::Build to include the configure_requires node in the META.yml. I have left the test for version.pm in the Makefile.PL to cater for old versions of CPAN.pm Show quoted text
> As a side note, I notice in your latest release that you have "exit 0" > in Makefile.PL if it appears to be running on my smoke test machine > (@INC matching 'home/david').
I have removed this. It would be useful to have an environment variable containing the smoke testers PAUSE id so that the "exit 0" line in the Makefile.PL becomes less of a blunt instrument Regards
Subject: Re: [rt.cpan.org #37059] Fails to install build_requires modules from META.yml
Date: Wed, 25 Jun 2008 09:55:51 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Wed, Jun 25, 2008 at 9:25 AM, Peter Flanigan via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> I have removed this. It would be useful to have an environment variable > containing the smoke testers PAUSE id so that the "exit 0" line in the > Makefile.PL becomes less of a blunt instrument
Ooh. That's an interesting idea. We already set $ENV{AUTOMATED_TESTING} variable to a true value. That could just as easily be an ID. I'll post to cpan-testers-discuss and see what they think. David