Thread: [Module-build-general] bug in Module-Build-0.18
Status: Beta
Brought to you by:
kwilliams
|
From: jk <bil...@fa...> - 2003-05-09 00:12:44
|
I wanted to install Module::Build on my computer. I keep my perl modules in /home/me/data/perl58, so I did this: perl Build.PL sitelib=/home/me/data/perl58/ ./Build ./Build test ./Build install ...but it still trys to install into /usr/lib/perl5/site_perl/5.8.0/ (where it has no permissions) rather than /home/me/data/perl58/ as I asked. Using a standard RedHat 9 Linux box with perl 5.8. Please let me know if I'm doing something wrong. Thanks for the help. |
|
From: Ken W. <ke...@ma...> - 2003-05-09 17:55:40
|
On Thursday, May 8, 2003, at 07:14 PM, jk wrote: > I wanted to install Module::Build on my computer. I keep my perl > modules in /home/me/data/perl58, so I did this: > > perl Build.PL sitelib=/home/me/data/perl58/ > ./Build > ./Build test > ./Build install > > ...but it still trys to install into /usr/lib/perl5/site_perl/5.8.0/ > (where it has no permissions) rather than /home/me/data/perl58/ as I > asked. > > Using a standard RedHat 9 Linux box with perl 5.8. > > Please let me know if I'm doing something wrong. Thanks for the help. Hi jk, The local-directory support for Module::Build is still woefully inadequate. It's a goal for version 0.19. One way (the only way?) to install locally with 0.18 is this: perl Build.PL config=sitelib=/home/me/data/perl58/ ./Build ./Build test ./Build fakeinstall (to check what it'll do in 'install') ./Build install I swear we'll try to make this better soon. -Ken |
|
From: Dave R. <au...@ur...> - 2003-05-09 18:13:06
|
On Fri, 9 May 2003, Ken Williams wrote: > perl Build.PL config=sitelib=/home/me/data/perl58/ > ./Build > ./Build test > ./Build fakeinstall (to check what it'll do in 'install') > ./Build install I couldn't even figure out how to do this by reading the damn code! And the docs say you can just do "perl Build.PL sitelib=..." I might take a stab at this. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-05-09 18:28:45
|
On Friday, May 9, 2003, at 01:11 PM, Dave Rolsky wrote: > On Fri, 9 May 2003, Ken Williams wrote: > >> perl Build.PL config=sitelib=/home/me/data/perl58/ >> ./Build >> ./Build test >> ./Build fakeinstall (to check what it'll do in 'install') >> ./Build install > > I couldn't even figure out how to do this by reading the damn code! > And > the docs say you can just do "perl Build.PL sitelib=..." > > I might take a stab at this. Beware that I haven't even specced it out yet. I'm hoping we can "simplify" the MakeMaker approach. One thing to look at is the install_map(), install_types(), and install_destination() routines, which I kind of like. Right now there are three kinds of 'install_types' items, qw(lib arch script). In the future there will also be qw(man) or qw(man1 man3). The idea is that everything to install is of a certain "type", and then when you're installing you can issue various incantations to say "stuff of this type should go here". MakeMaker has this idea of certain predefined configuration sets, switchable by selecting INSTALLDIRS to 'perl', 'site', or 'vendor'. Assuming we also support this in M::B, I would like to keep it distinct from manually selecting a place to install stuff. Note that the 'destdir' parameter already does the "prefix everything with this string" thing for helping rpm/deb/etc. package managers. -Ken |
|
From: jk <bil...@fa...> - 2003-05-09 22:03:58
|
Ken Williams wrote: > > On Thursday, May 8, 2003, at 07:14 PM, jk wrote: > >> I wanted to install Module::Build on my computer. I keep my perl >> modules in /home/me/data/perl58, so I did this: >> >> perl Build.PL sitelib=/home/me/data/perl58/ >> ./Build >> ./Build test >> ./Build install >> >> ...but it still trys to install into /usr/lib/perl5/site_perl/5.8.0/ >> (where it has no permissions) rather than /home/me/data/perl58/ as I >> asked. >> >> Using a standard RedHat 9 Linux box with perl 5.8. >> >> Please let me know if I'm doing something wrong. Thanks for the help. > > > Hi jk, > > The local-directory support for Module::Build is still woefully > inadequate. It's a goal for version 0.19. One way (the only way?) to > install locally with 0.18 is this: > > perl Build.PL config=sitelib=/home/me/data/perl58/ > ./Build > ./Build test > ./Build fakeinstall (to check what it'll do in 'install') > ./Build install > > I swear we'll try to make this better soon. > > -Ken > > Thanks Ken! This worked and Module::Build is now installed locally where it should be. I guess as Dave observed the docs should be updated. A couple other observations that might be helpful: 1) When I ran "./Build test" I got a couple of tests fail, indicating they could not find Module::Info.pm. I do have it installed locally (in the /home/me/data/perl58/ tree), and I do have the PERL5LIB environmental variable set to indicate it... is it possible that Module::Build doesn't know about PERL5LIB and doesn't add it to the @INC array? The relevant error messages are here: ===================================================================== [me@mcc Module-Build-0.18]$ ./Build test t/basic.........ok t/runthrough....ok 4/13B::Module::Info,packages use failed with 2 saying: Can't locate B/Module/Info.pm in @INC (@INC contains: /home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 / usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/ perl5/5.8.0 .) at (eval 1) line 18. BEGIN failed--compilation aborted at (eval 1) line 18. BEGIN failed--compilation aborted. t/runthrough....ok 6/13B::Module::Info,packages use failed with 2 saying: Can't locate B/Module/Info.pm in @INC (@INC contains: /home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at (eval 1) line 18. BEGIN failed--compilation aborted at (eval 1) line 18. BEGIN failed--compilation aborted. t/runthrough....ok t/xs............ok All tests successful. Files=3, Tests=32, 9 wallclock secs ( 5.20 cusr + 0.49 csys = 5.69 CPU) [me@mcc Module-Build-0.18]$ [me@mcc me]$ env | grep PERL PERL5LIB=/home/me/data/perl58/lib/perl5/site_perl/5.8.0:/home/me/data/perl58/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi:/home/me/data/perl58/lib/perl5/5.8.0:/home/me/data/perl58/lib/perl5/5.8.0/i386-linux-thread-multi [me@mcc me]$ ===================================================================== 2) I originally tried to install Module::Build and various other modules using the CPAN.pm module, but this didn't work because the version of CPAN.pm I have doesn't know anything about using Build.pm rather than make. It would be good to give the CPAN.pm people a heads up about Build.pm so they can support it (this may already have been done). Thanks for the help, and thanks for making Module::Build. Looking forward to using it. jk |
|
From: Dave R. <au...@ur...> - 2003-05-10 09:26:58
|
On Fri, 9 May 2003, jk wrote: > 2) I originally tried to install Module::Build and various other modules > using the CPAN.pm module, but this didn't work because the version of > CPAN.pm I have doesn't know anything about using Build.pm rather than > make. It would be good to give the CPAN.pm people a heads up about > Build.pm so they can support it (this may already have been done). Module::Build comes with a Makefile.PL and CPAN.pm should execute it without any trouble. I sent a patch to the CPAN.pm maintainer to add real support for Module::Build to CPAN.pm, but even without that Module::Build itself should install without a hitch. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-05-10 20:50:40
|
On Friday, May 9, 2003, at 05:05 PM, jk wrote: > 1) When I ran "./Build test" I got a couple of tests fail, indicating > they could not find Module::Info.pm. I do have it installed locally > (in the /home/me/data/perl58/ tree), and I do have the PERL5LIB > environmental variable set to indicate it... is it possible that > Module::Build doesn't know about PERL5LIB and doesn't add it to the > @INC array? Nope, not possible - but I did figure out what the problem is here. I'd seen this problem show up in a couple different ways, and the reason is that we chdir() a few times in the testing code, and any relative paths in @INC will be messed up if we load modules after that. The fix for this, which I've applied in CVS, is to convert all the @INC paths to absolute paths. > 2) I originally tried to install Module::Build and various other > modules using the CPAN.pm module, but this didn't work because the > version of CPAN.pm I have doesn't know anything about using Build.pm > rather than make. It would be good to give the CPAN.pm people a > heads up about Build.pm so they can support it (this may already have > been done). Yeah, as Dave said, this should have worked fine. What happened? -Ken |
|
From: jk <bil...@fa...> - 2003-05-10 22:55:11
|
Ken Williams wrote:
>
> On Friday, May 9, 2003, at 05:05 PM, jk wrote:
>
>> 1) When I ran "./Build test" I got a couple of tests fail,
>> indicating they could not find Module::Info.pm. I do have it
>> installed locally (in the /home/me/data/perl58/ tree), and I do
>> have the PERL5LIB environmental variable set to indicate it... is it
>> possible that Module::Build doesn't know about PERL5LIB and doesn't
>> add it to the @INC array?
>
>
> Nope, not possible - but I did figure out what the problem is here.
> I'd seen this problem show up in a couple different ways, and the
> reason is that we chdir() a few times in the testing code, and any
> relative paths in @INC will be messed up if we load modules after that.
>
> The fix for this, which I've applied in CVS, is to convert all the
> @INC paths to absolute paths.
I may be misunderstanding you--if I am, just ignore this--but the paths
specified in my PERL5LIB aren't relative. And as you can see, they
didn't appear to be getting added to @INC, at least that isn't indicated
in the output below.
===========screen output starts here==============
[me@mcc Module-Build-0.18]$ ./Build test
t/basic.........ok
t/runthrough....ok 4/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok 6/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
[me@mcc me]$ env | grep PERL
PERL5LIB=/home/me/data/perl58/lib/perl5/site_perl/5.8.0:/home/me/data/perl58/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi:/home/me/data/perl58/lib/perl5/5.8.0:/home/me/data/perl58/lib/perl5/5.8.0/i386-linux-thread-multi
[me@mcc me]$
============end of screen output================
>
>
>> 2) I originally tried to install Module::Build and various other
>> modules using the CPAN.pm module, but this didn't work because the
>> version of CPAN.pm I have doesn't know anything about using Build.pm
>> rather than make. It would be good to give the CPAN.pm people a
>> heads up about Build.pm so they can support it (this may already
>> have been done).
>
>
> Yeah, as Dave said, this should have worked fine. What happened?
>
>
>
Actually, the CPAN problems could just be due to it not using the
"config=" string prior to the "sitelib=" string on the command line and
problem 1 above.
I tried it again using CPAN and here are the results below. Note that I
am using CPAN version 1.61, I don't know if the Module::Build problems
still exist in the most recent version of CPAN.
The problems appear to be: 1) a couple of the tests fail, and it looks
like the @INC doesn't include the paths from my PERL5LIB variable (same
as above); and
2) It tries to install into the system directory rather than the
local directory as specified in my CPAN config file (other modules
install successfully to the local directory).
Hope this helps.
============cpan output below===========
[me@mcc me]$ !974
perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.61)
ReadLine support available (try 'install Bundle::CPAN')
cpan> install Module::Build
CPAN: Storable loaded ok
Going to read /home/me/.cpan/Metadata
Database was generated on Thu, 08 May 2003 14:13:17 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://cpan.digisle.net/pub/CPAN/authors/01mailrc.txt.gz
Going to read /home/me/.cpan/sources/authors/01mailrc.txt.gz
Fetching with LWP:
ftp://cpan.digisle.net/pub/CPAN/modules/02packages.details.txt.gz
Going to read /home/me/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Sat, 10 May 2003 13:13:28 GMT
There's a new CPAN.pm version (v1.70) available!
[Current version is v1.61]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
Fetching with LWP:
ftp://cpan.digisle.net/pub/CPAN/modules/03modlist.data.gz
Going to read /home/me/.cpan/sources/modules/03modlist.data.gz
Going to write /home/me/.cpan/Metadata
Running install for module Module::Build
Running make for K/KW/KWILLIAMS/Module-Build-0.18.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for
/home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18.tar.gz ok
Scanning cache /home/me/.cpan/build for sizes
Module-Build-0.18/
Module-Build-0.18/Build.PL
Module-Build-0.18/Changes
Module-Build-0.18/INSTALL
Module-Build-0.18/lib/
Module-Build-0.18/lib/Module/
Module-Build-0.18/lib/Module/Build/
Module-Build-0.18/lib/Module/Build/Base.pm
Module-Build-0.18/lib/Module/Build/Compat.pm
Module-Build-0.18/lib/Module/Build/Platform/
Module-Build-0.18/lib/Module/Build/Platform/Amiga.pm
Module-Build-0.18/lib/Module/Build/Platform/darwin.pm
Module-Build-0.18/lib/Module/Build/Platform/Default.pm
Module-Build-0.18/lib/Module/Build/Platform/EBCDIC.pm
Module-Build-0.18/lib/Module/Build/Platform/MacOS.pm
Module-Build-0.18/lib/Module/Build/Platform/MPEiX.pm
Module-Build-0.18/lib/Module/Build/Platform/RiscOS.pm
Module-Build-0.18/lib/Module/Build/Platform/Unix.pm
Module-Build-0.18/lib/Module/Build/Platform/VMS.pm
Module-Build-0.18/lib/Module/Build/Platform/VOS.pm
Module-Build-0.18/lib/Module/Build/Platform/Windows.pm
Module-Build-0.18/lib/Module/Build.pm
Module-Build-0.18/Makefile.PL
Module-Build-0.18/MANIFEST
Module-Build-0.18/META.yml
Module-Build-0.18/README
Module-Build-0.18/t/
Module-Build-0.18/t/basic.t
Module-Build-0.18/t/common.pl
Module-Build-0.18/t/lib/
Module-Build-0.18/t/lib/ModuleBuildOne.pm
Module-Build-0.18/t/MANIFEST
Module-Build-0.18/t/runthrough.t
Module-Build-0.18/t/Sample/
Module-Build-0.18/t/Sample/Build.PL
Module-Build-0.18/t/Sample/lib/
Module-Build-0.18/t/Sample/lib/Sample.pm
Module-Build-0.18/t/Sample/MANIFEST
Module-Build-0.18/t/Sample/META.yml
Module-Build-0.18/t/Sample/script
Module-Build-0.18/t/Sample/test.pl
Module-Build-0.18/t/xs.t
Module-Build-0.18/t/XSTest/
Module-Build-0.18/t/XSTest/Build.PL
Module-Build-0.18/t/XSTest/Changes
Module-Build-0.18/t/XSTest/lib/
Module-Build-0.18/t/XSTest/lib/XSTest.pm
Module-Build-0.18/t/XSTest/lib/XSTest.xs
Module-Build-0.18/t/XSTest/MANIFEST
Module-Build-0.18/t/XSTest/test.pl
Removing previously used /home/me/.cpan/build/Module-Build-0.18
CPAN.pm: Going to build K/KW/KWILLIAMS/Module-Build-0.18.tar.gz
/usr/bin/perl Build.PL prefix=/home/me/data/perl58
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'Module-Build' version '0.18'
Warning: PREREQ_PM mentions ExtUtils::Install more than once, last
mention wins at /usr/lib/perl5/5.8.0/CPAN.pm line 4607, <GEN15> line 1.
/usr/bin/perl ./Build
lib/Module/Build.pm -> blib/lib/Module/Build.pm
lib/Module/Build/Base.pm -> blib/lib/Module/Build/Base.pm
lib/Module/Build/Compat.pm -> blib/lib/Module/Build/Compat.pm
lib/Module/Build/Platform/Amiga.pm ->
blib/lib/Module/Build/Platform/Amiga.pm
lib/Module/Build/Platform/darwin.pm ->
blib/lib/Module/Build/Platform/darwin.pm
lib/Module/Build/Platform/Default.pm ->
blib/lib/Module/Build/Platform/Default.pm
lib/Module/Build/Platform/EBCDIC.pm ->
blib/lib/Module/Build/Platform/EBCDIC.pm
lib/Module/Build/Platform/MacOS.pm ->
blib/lib/Module/Build/Platform/MacOS.pm
lib/Module/Build/Platform/MPEiX.pm ->
blib/lib/Module/Build/Platform/MPEiX.pm
lib/Module/Build/Platform/RiscOS.pm ->
blib/lib/Module/Build/Platform/RiscOS.pm
lib/Module/Build/Platform/Unix.pm -> blib/lib/Module/Build/Platform/Unix.pm
lib/Module/Build/Platform/VMS.pm -> blib/lib/Module/Build/Platform/VMS.pm
lib/Module/Build/Platform/VOS.pm -> blib/lib/Module/Build/Platform/VOS.pm
lib/Module/Build/Platform/Windows.pm ->
blib/lib/Module/Build/Platform/Windows.pm
/usr/bin/make -- OK
Running make test
/usr/bin/perl ./Build test
t/basic.........ok
t/runthrough....ok 4/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/build/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok 6/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/build/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok
t/xs............ok
All tests successful.
Files=3, Tests=32, 10 wallclock secs ( 4.89 cusr + 0.45 csys = 5.34 CPU)
/usr/bin/make test -- OK
Running make install
/usr/bin/perl ./Build install
Warning: You do not have permissions to install into
/usr/lib/perl5/site_perl/5.8.0 at
/usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 84.
mkdir /usr/lib/perl5/site_perl/5.8.0/Module: Permission denied at
/usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 137
make: *** [install] Error 255
/usr/bin/make install -- NOT OK
You may have to su to root to install the package
cpan>
|
|
From: Ken W. <ke...@ma...> - 2003-05-12 15:16:43
|
On Saturday, May 10, 2003, at 05:56 PM, jk wrote:
> Ken Williams wrote:
>
>>
>> On Friday, May 9, 2003, at 05:05 PM, jk wrote:
>>
>>> 1) When I ran "./Build test" I got a couple of tests fail,
>>> indicating they could not find Module::Info.pm. I do have it
>>> installed locally (in the /home/me/data/perl58/ tree), and I do
>>> have the PERL5LIB environmental variable set to indicate it... is it
>>> possible that Module::Build doesn't know about PERL5LIB and doesn't
>>> add it to the @INC array?
>>
>>
>> Nope, not possible - but I did figure out what the problem is here.
>> I'd seen this problem show up in a couple different ways, and the
>> reason is that we chdir() a few times in the testing code, and any
>> relative paths in @INC will be messed up if we load modules after
>> that.
>>
>> The fix for this, which I've applied in CVS, is to convert all the
>> @INC paths to absolute paths.
>
> I may be misunderstanding you--if I am, just ignore this--but the
> paths specified in my PERL5LIB aren't relative. And as you can see,
> they didn't appear to be getting added to @INC, at least that isn't
> indicated in the output below.
Hmm, that's strange. Perhaps you set PERL5LIB after you ran 'perl
Build.PL'? 'perl Build.PL' freezes @INC so that it'll be the same for
all subsequent runnings of the 'Build' script.
Oh - note that it can't find B::Module::Info, not Module::Info. They
should have both been installed as part of the Module::Info package.
What happens if you run this one-liner to check whether Module::Info is
working?
perl -MModule::Info -le 'print
Module::Info->new_from_module("File::Spec")->packages_inside'
> Actually, the CPAN problems could just be due to it not using the
> "config=" string prior to the "sitelib=" string on the command line
> and problem 1 above.
Yeah, that could do it. CPAN doesn't know to invoke the 'Build.PL'
script with this argument.
> I tried it again using CPAN and here are the results below. Note that
> I am using CPAN version 1.61, I don't know if the Module::Build
> problems still exist in the most recent version of CPAN.
Probably nothing has changed recently.
> The problems appear to be: 1) a couple of the tests fail, and it
> looks like the @INC doesn't include the paths from my PERL5LIB
> variable (same as above); and
I don't think that should make any tests fail, it just complains that
it can't load Module::Info - but notice it also says "All tests
successful", which is true.
-Ken
|
|
From: jk <bil...@fa...> - 2003-05-15 22:03:22
|
Ken Williams wrote:
>
> On Saturday, May 10, 2003, at 05:56 PM, jk wrote:
>
>> Ken Williams wrote:
>>
>>>
>>> On Friday, May 9, 2003, at 05:05 PM, jk wrote:
>>>
>>>> 1) When I ran "./Build test" I got a couple of tests fail,
>>>> indicating they could not find Module::Info.pm. I do have it
>>>> installed locally (in the /home/me/data/perl58/ tree), and I do
>>>> have the PERL5LIB environmental variable set to indicate it... is
>>>> it possible that Module::Build doesn't know about PERL5LIB and
>>>> doesn't add it to the @INC array?
>>>
>>>
>>>
>>> Nope, not possible - but I did figure out what the problem is here.
>>> I'd seen this problem show up in a couple different ways, and the
>>> reason is that we chdir() a few times in the testing code, and any
>>> relative paths in @INC will be messed up if we load modules after that.
>>>
>>> The fix for this, which I've applied in CVS, is to convert all the
>>> @INC paths to absolute paths.
>>
>>
>> I may be misunderstanding you--if I am, just ignore this--but the
>> paths specified in my PERL5LIB aren't relative. And as you can see,
>> they didn't appear to be getting added to @INC, at least that isn't
>> indicated in the output below.
>
>
> Hmm, that's strange. Perhaps you set PERL5LIB after you ran 'perl
> Build.PL'? 'perl Build.PL' freezes @INC so that it'll be the same for
> all subsequent runnings of the 'Build' script.
I don't think so, the PERL5LIB is set in my .bash_profile
>
> Oh - note that it can't find B::Module::Info, not Module::Info. They
> should have both been installed as part of the Module::Info package.
> What happens if you run this one-liner to check whether Module::Info
> is working?
>
> perl -MModule::Info -le 'print
> Module::Info->new_from_module("File::Spec")->packages_inside'
>
=====screen output starts here======
$ perl -MModule::Info -le 'print
Module::Info->new_from_module("File::Spec")->packages_inside'
File::Spec
$
=======end of screen output=======
.
.
.
>
>
>> The problems appear to be: 1) a couple of the tests fail, and it
>> looks like the @INC doesn't include the paths from my PERL5LIB
>> variable (same as above); and
>
>
> I don't think that should make any tests fail, it just complains that
> it can't load Module::Info - but notice it also says "All tests
> successful", which is true.
>
True, so the problem may just be one of incorrect complaints. What
seems odd to me is how when it complains it can't find B/Module/Info.pm
in @INC, and then prints out what it thinks @INC is, it doesn't include
the paths set in PERL5LIB.
===========screen output starts here==============
[me@mcc Module-Build-0.18]$ ./Build test
t/basic.........ok
t/runthrough....ok 4/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok 6/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/home/me/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.18/blib/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 1) line 18.
[me@mcc me]$ env | grep PERL
PERL5LIB=/home/me/data/perl58/lib/perl5/site_perl/5.8.0:/home/me/data/perl58/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi:/home/me/data/perl58/lib/perl5/5.8.0:/home/me/data/perl58/lib/perl5/5.8.0/i386-linux-thread-multi
[me@mcc me]$
============end of screen output================
|
|
From: Ken W. <ke...@ma...> - 2003-05-15 22:17:53
|
On Thursday, May 15, 2003, at 05:00 PM, jk wrote:
> Ken Williams wrote:
>>
>> Hmm, that's strange. Perhaps you set PERL5LIB after you ran 'perl
>> Build.PL'? 'perl Build.PL' freezes @INC so that it'll be the same
>> for all subsequent runnings of the 'Build' script.
>
>
> I don't think so, the PERL5LIB is set in my .bash_profile
Hmmm - care to try another patch? I think maybe it's the way I'm
overwriting $ENV{PERL5LIB} in the tests. Patch below.
Index: t/basic.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v
retrieving revision 1.12
diff -u -r1.12 basic.t
--- t/basic.t 12 Apr 2003 03:36:42 -0000 1.12
+++ t/basic.t 15 May 2003 22:16:00 -0000
@@ -14,7 +14,11 @@
ok $INC{'Module/Build.pm'}, '/blib/', "Make sure Module::Build was
loaded from blib/";
# So 'test' and 'disttest' in Sample/ can see the not-yet-installed
Module::Build.
-unshift @INC, $ENV{PERL5LIB} = File::Spec->catdir( Module::Build->cwd,
'blib', 'lib' );
+{
+ my $build_dir = File::Spec->catdir( Module::Build->cwd, 'blib',
'lib' );
+ unshift @INC, $build_dir;
+ $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
$build_dir;
+}
chdir 't';
Index: t/runthrough.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v
retrieving revision 1.21
diff -u -r1.21 runthrough.t
--- t/runthrough.t 15 May 2003 21:29:22 -0000 1.21
+++ t/runthrough.t 15 May 2003 22:16:00 -0000
@@ -17,9 +17,12 @@
my $start_dir = Module::Build->cwd;
# So 'test' and 'disttest' can see the not-yet-installed Module::Build.
-unshift @INC, # For 'test'
-$ENV{PERL5LIB} = # For 'disttest'
-File::Spec->catdir( $start_dir, 'blib', 'lib' );
+{
+ my $build_dir = File::Spec->catdir( $start_dir, 'blib', 'lib' );
+ unshift @INC, $build_dir;
+ $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
$build_dir;
+}
+warn "PERL5LIB is $ENV{PERL5LIB}\n";
my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' );
chdir $goto or die "can't chdir to $goto: $!";
===================================================================
-Ken
|
|
From: jk <bil...@fa...> - 2003-05-16 02:39:40
|
Ken Williams wrote:
>
> On Thursday, May 15, 2003, at 05:00 PM, jk wrote:
>
>> Ken Williams wrote:
>>
>>>
>>> Hmm, that's strange. Perhaps you set PERL5LIB after you ran 'perl
>>> Build.PL'? 'perl Build.PL' freezes @INC so that it'll be the same
>>> for all subsequent runnings of the 'Build' script.
>>
>>
>>
>> I don't think so, the PERL5LIB is set in my .bash_profile
>
>
> Hmmm - care to try another patch? I think maybe it's the way I'm
> overwriting $ENV{PERL5LIB} in the tests. Patch below.
Sorry for my ignorance, but I don't know how to a patch, I have never
done that before... if you can explain I'll be happy to try if it might
help.
JK
>
> Index: t/basic.t
> ===================================================================
> RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v
> retrieving revision 1.12
> diff -u -r1.12 basic.t
> --- t/basic.t 12 Apr 2003 03:36:42 -0000 1.12
> +++ t/basic.t 15 May 2003 22:16:00 -0000
> @@ -14,7 +14,11 @@
> ok $INC{'Module/Build.pm'}, '/blib/', "Make sure Module::Build was
> loaded from blib/";
>
> # So 'test' and 'disttest' in Sample/ can see the not-yet-installed
> Module::Build.
> -unshift @INC, $ENV{PERL5LIB} = File::Spec->catdir(
> Module::Build->cwd, 'blib', 'lib' );
> +{
> + my $build_dir = File::Spec->catdir( Module::Build->cwd, 'blib',
> 'lib' );
> + unshift @INC, $build_dir;
> + $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
> $build_dir;
> +}
>
> chdir 't';
>
> Index: t/runthrough.t
> ===================================================================
> RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v
> retrieving revision 1.21
> diff -u -r1.21 runthrough.t
> --- t/runthrough.t 15 May 2003 21:29:22 -0000 1.21
> +++ t/runthrough.t 15 May 2003 22:16:00 -0000
> @@ -17,9 +17,12 @@
> my $start_dir = Module::Build->cwd;
>
> # So 'test' and 'disttest' can see the not-yet-installed Module::Build.
> -unshift @INC, # For 'test'
> -$ENV{PERL5LIB} = # For 'disttest'
> -File::Spec->catdir( $start_dir, 'blib', 'lib' );
> +{
> + my $build_dir = File::Spec->catdir( $start_dir, 'blib', 'lib' );
> + unshift @INC, $build_dir;
> + $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
> $build_dir;
> +}
> +warn "PERL5LIB is $ENV{PERL5LIB}\n";
>
> my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' );
> chdir $goto or die "can't chdir to $goto: $!";
> ===================================================================
>
> -Ken
>
>
|
|
From: Ken W. <ke...@ma...> - 2003-05-16 02:47:38
|
On Thursday, May 15, 2003, at 09:39 PM, jk wrote:
> Ken Williams wrote:
>>
>> Hmmm - care to try another patch? I think maybe it's the way I'm
>> overwriting $ENV{PERL5LIB} in the tests. Patch below.
>
> Sorry for my ignorance, but I don't know how to a patch, I have never
> done that before... if you can explain I'll be happy to try if it
> might help.
Hi JK,
No need to be sorry - there was a time when each of us didn't know how
to patch. =)
For a short patch like this, you can just apply it by hand by editing
the files it indicates. Each hunk of the patch gives a little context
(line numbers are in the header too), then shows lines that should be
removed by putting '-' in front of them, and lines that should be added
by putting '+' in front of them. So you can just make those edits
yourself if you want.
If you want to apply a patch automatically, save it in a file called
"patch.txt" (or whatever you want), then from the top level of the
Module-Build directory issue the command "patch < patch.txt". More
details are in the manual page for the 'patch' command.
-Ken
|
|
From: jk <bil...@fa...> - 2003-05-22 23:03:08
Attachments:
errs.modbuild
|
Ken Williams wrote:
>
> On Thursday, May 15, 2003, at 09:39 PM, jk wrote:
>
>> Ken Williams wrote:
>>
>>>
>>> Hmmm - care to try another patch? I think maybe it's the way I'm
>>> overwriting $ENV{PERL5LIB} in the tests. Patch below.
>>
>>
>> Sorry for my ignorance, but I don't know how to a patch, I have never
>> done that before... if you can explain I'll be happy to try if it
>> might help.
>
>
> Hi JK,
>
> No need to be sorry - there was a time when each of us didn't know how
> to patch. =)
>
> For a short patch like this, you can just apply it by hand by editing
> the files it indicates. Each hunk of the patch gives a little context
> (line numbers are in the header too), then shows lines that should be
> removed by putting '-' in front of them, and lines that should be
> added by putting '+' in front of them. So you can just make those
> edits yourself if you want.
>
> If you want to apply a patch automatically, save it in a file called
> "patch.txt" (or whatever you want), then from the top level of the
> Module-Build directory issue the command "patch < patch.txt". More
> details are in the manual page for the 'patch' command.
>
> -Ken
>
>
Hi Ken,
Sorry it took so long to do this, been busy. I patched the basic.t and
runthrough.t files from a freshly untarred Module-Build-0.18 as
instructed, so they look like this:
=====from t/basic.t=====
# So 'test' and 'disttest' in Sample/ can see the not-yet-installed
Module::Build.
{
my $build_dir = File::Spec->catdir( Module::Build->cwd, 'blib', 'lib' );
unshift @INC, $build_dir;
$ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
$build_dir;
}
chdir 't';
===end t/basic.t====
===from t/runthrough.t===
# So 'test' and 'disttest' can see the not-yet-installed Module::Build.
{
my $build_dir = File::Spec->catdir( $start_dir, 'blib', 'lib' );
unshift @INC, $build_dir;
$ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
$build_dir;
}
warn "PERL5LIB is $ENV{PERL5LIB}\n";
my $goto = File::Spec->catdir( Module::Build->cwd, 't', 'Sample' );
===end t/runthrough.t===
Then I did the usual install proceedure:
perl Build.PL config=sitelib=/home/me/data/perl58/
./Build
./Build test
./Build fakeinstall (to check what it'll do in 'install')
./Build install
There were some errors durring the tests. They are different than the
errors I was getting before. The module does seem to get installed at
the end despite the error messages.
Including the screen output below:
|