Skip Menu |
 

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

Report information
The Basics
Id: 8827
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: kane [...] dwim.org
Cc:
AdminCc:

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



Subject: Module::Build fails tests if perl executable is not '/usr/bin/perl'
Download (untitled) / with headers
text/plain 2.4k
[kane@myriad ~...build/Module-Build-0.2606]$ ./Build realclean Deleting blib Deleting _build Deleting Build [kane@myriad ~...build/Module-Build-0.2606]$ perlc Build.PL Checking whether your kit is complete... Looks good Feature 'YAML_support' enabled. Creating new 'Build' script for 'Module-Build' version '0.2606' [kane@myriad ~...build/Module-Build-0.2606]$ ./Build test [...] Writing config notes to blib/lib/Module/Build/ConfigData.pm t/basic.........v-strings are deprecated at /opt/lib/perl5/5.8.3/darwin-2level/Config.pm line 32. Perl lib version (v5.8.3) doesn't match executable version (v5.8.1) at /opt/lib/perl5/5.8.3/darwin-2level/Config.pm line 32. Compilation failed in require at /Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2606/blib/lib/Module/Build/Base.pm line 5. BEGIN failed--compilation aborted at /Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2606/blib/lib/Module/Build/Base.pm line 5. Compilation failed in require at /Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2606/blib/lib/Module/Build.pm line 14. BEGIN failed--compilation aborted at /Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2606/blib/lib/Module/Build.pm line 14. Compilation failed in require at t/basic.t line 6. BEGIN failed--compilation aborted at t/basic.t line 6. t/basic.........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-41 Failed 41/41 tests, 0.00% okay [... etc ...] Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/basic.t 255 65280 41 82 200.00% 1-41 t/compat.t 255 65280 ?? ?? % ?? t/ext.t 255 65280 ?? ?? % ?? t/extend.t 255 65280 11 22 200.00% 1-11 t/files.t 0 5 ?? ?? % ?? t/install.t 255 65280 29 58 200.00% 1-29 t/manifypods.t 255 65280 21 42 200.00% 1-21 t/notes.t 255 65280 ?? ?? % ?? t/runthrough.t 255 65280 28 56 200.00% 1-28 t/signature.t 255 65280 ?? ?? % ?? t/versions.t 255 65280 2 4 200.00% 1-2 t/xs.t 255 65280 ?? ?? % ?? Failed 12/13 test scripts, 7.69% okay. 132/136 subtests failed, 2.94% okay. [kane@myriad ~...build/Module-Build-0.2606]$ running it as 'perlc Build test' fixes this problem. I think the shebang line is being written with a hardcoded path to perl, rather than $^X.
Date: Sat, 11 Dec 2004 17:27:52 -0600
From: "Ken Williams" <ken [...] mathforum.org>
To: bug-Module-Build [...] rt.cpan.org
Subject: Re: [cpan #8827] Module::Build fails tests if perl executable is not '/usr/bin/perl'
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.1k
I can't replicate these results. I suspect perhaps you've got PERL5LIB set to include a different lib directory? When I run Build.PL using a different perl executable, it "sticks": % /usr/local/perl5.005_04/bin/perl Build.PL Checking whether your kit is complete... Looks good * Optional prerequisite ExtUtils::ParseXS isn't installed * Optional prerequisite Module::Signature isn't installed * Optional prerequisite Archive::Tar isn't installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation. Feature 'YAML_support' disabled because of the following prerequisite failures: * Prerequisite YAML isn't installed Creating new 'Build' script for 'Module-Build' version '0.2606' % head -1 Build #! /usr/local/perl5.005_04/bin/perl % On Dec 10, 2004, at 7:09 AM, via RT wrote: Show quoted text
> > running it as 'perlc Build test' fixes this problem. I think the > shebang line is being written with a hardcoded path to perl, rather > than $^X.
Could you check please? What's the shebang line in 'Build' when you do 'perlc Build.PL'? -Ken
Can't replicate, setting to 'dead' until further info.
Download (untitled) / with headers
text/plain 2.7k
[KWILLIAMS - Tue Dec 14 11:03:41 2004]: Show quoted text
> Can't replicate, setting to 'dead' until further info.
I see a few insances where 'perl' entries in build_params don't point to /opt/bin/perl (perlc is just a symlink to that perl): [kane@myriad ~...build/Module-Build-0.2606]$ grep perl _build/build_params 'useperlio' => 'define', 'sitearch' => '/opt/lib/perl5/site_perl/5.8.3/darwin-2level', 'archlibexp' => '/opt/lib/perl5/5.8.3/darwin-2level', 'installsitelib' => '/opt/lib/perl5/site_perl/5.8.3', 'sitelib' => '/opt/lib/perl5/site_perl/5.8.3', 'privlibexp' => '/opt/lib/perl5/5.8.3', 'installprivlib' => '/opt/lib/perl5/5.8.3', 'perl_revision' => '5', 'perl' => '', 'perl5' => '/usr/bin/perl', 'sitelib_stem' => '/opt/lib/perl5/site_perl', 'perl_subversion' => '3', 'installusrbinperl' => undef, 'perl_version' => '8', 'sitelibexp' => '/opt/lib/perl5/site_perl/5.8.3', 'sitearchexp' => '/opt/lib/perl5/site_perl/5.8.3/darwin-2level', 'perladmin' => 'kane@myriad.local', 'perllibs' => '-ldl -lm -lc', 'installsitearch' => '/opt/lib/perl5/site_perl/5.8.3/darwin-2level', 'installarchlib' => '/opt/lib/perl5/5.8.3/darwin-2level', 'package' => 'perl5', 'perlpath' => '/opt/bin/perl', 'libperl' => 'libperl.a', 'd_perl_otherlibdirs' => undef, 'archlib' => '/opt/lib/perl5/5.8.3/darwin-2level', 'perl_patchlevel' => '', 'startperl' => '#!/opt/bin/perl', 'privlib' => '/opt/lib/perl5/5.8.3', 'installstyle' => 'lib/perl5', 'arch' => '/opt/lib/perl5/5.8.3/darwin-2level', 'lib' => '/opt/lib/perl5/5.8.3' 'arch' => '/opt/lib/perl5/site_perl/5.8.3/darwin-2level', 'lib' => '/opt/lib/perl5/site_perl/5.8.3' 'perl' => '5.005_03', 'license' => 'perl', 'perl' => '/opt/bin/perl', But i don't see a shebang line... [kane@myriad ~...build/Module-Build-0.2606]$ head t/basic.t ######################### We start with some black magic to print on failure. use strict; use Test; BEGIN { plan tests => 41 } use Module::Build; ok(1); use File::Spec; use Cwd; I'm attaching a tarball of the module::build package after i've run 'perlc Build.PL' and './Build' (which worked fine) and my attempt at './Build test', which blows up in the previously mentioned fashion. Hopefully that will let you track down what's happening
Download MB.tgz
application/x-gzip 233.6k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 732b
I believe I understand this one now. The 'perl' entry in build_params is correct (look for the one near the bottom of the file), the shebang line is correct, but on (most?) BSD derivatives when you run ./Build as a shebang script, as opposed to via "perlc ./Build", $^X ends up only being set to 'perl' instead of the full path /opt/bin/perl. This confuses some modules - not Module::Build, but IO::File, I think, and maybe Test::Harness. They end up running scripts based on $^X, which is 'perl', which of course is not what you want. The solution I've checked in is to set $^X = Module::Build->find_perl_interpreter() in the Build script, right after we load Module::Build. This seems to clean things up nicely. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.