Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 433
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: mbarbon [...] dsi.unive.it
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.54_01
Fixed in: (no value)



Subject: tests in subdirs do not find modules in blib
wxPerl, Win32&Linux, perl@15632 the module structure is wxPerl/Makefile.PL wxPerl/ext/grid/Makefile.PL wxPerl/wxt/html/Makefile.PL ... at build time all .pm an .so/.dll are put in the toplevel blib ( BTW this requires a small tweak in constants(), because MM's INST_* are always ../blib even if the submakefile is in a two level deep directory ). make test for subdirectories fails because @INC does not contains ../../blib/* ( it contains blib/*, even if the subdir does not conatin a blib ). Adding -Mblib to the line starting the harness solves the problem. mbarbon@tweddledee:~/wx/b/gtk/P58cvs-2.3-d$ make test make[1]: Entering directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid' <snip> make[1]: Leaving directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/print' PERL_DL_NONLAZY=1 /home/mbarbon/p5.8/bin/perl "-MExtUtils::testlib" "-MExtUtils::Command::MM" "-e" "test_harness(0)" t/*.t t/1_load...........ok t/2_inheritance....ok t/3_event..........ok t/4_userdata.......ok All tests successful. Files=4, Tests=143, 15 wallclock secs (12.44 cusr + 0.47 csys = 12.91 CPU) make[1]: Entering directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid' PERL_DL_NONLAZY=1 /home/mbarbon/p5.8/bin/perl "-MExtUtils::testlib" "-MExtUtils::Command::MM" "-e" "test_harness(0)" t/*.t t/1_load...........Can't locate Wx.pm in @INC (@INC contains: /home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid/blib/arch /home/mbarbon/w x/b/gtk/P58cvs-2.3-d/ext/grid/blib/lib /home/mbarbon/p5.8/lib/perl5/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/5.7.3 /home/mbarbo n/p5.8/lib/perl5/site_perl/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/site_perl/5.7.3 /home/mbarbon/p5.8/lib/perl5/site_perl/5.7. 3 /home/mbarbon/p5.8/lib/perl5/site_perl . /home/mbarbon/p5.8/lib/perl5/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/5.7.3 /home/mb arbon/p5.8/lib/perl5/site_perl/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/site_perl/5.7.3 /home/mbarbon/p5.8/lib/perl5/site_perl .) at t/1_load.t line 6. BEGIN failed--compilation aborted at t/1_load.t line 6. t/1_load...........dubious Test returned status 2 (wstat 512, 0x200) BTW: great work! apart from that, everything else works nicely, even is wxPerl's build system plays Dirty Tricks against MM. I thought I would have to make some substantial fixes for the new MM. Regards Mattia
[guest - Sun Mar 31 16:06:15 2002]: Well, I can't build it at all, updated MM or not. Looks like something weird in the C code. See attached file. That was a build with 5.005_03 (so old MakeMaker) on Debian/PowerPC 3.0 and the libwxbase 2.2.9.2 package. Show quoted text
> BTW: great work! apart from that, everything > else works nicely, even is wxPerl's build > system plays Dirty Tricks against MM. I thought I > would have to make some substantial fixes for the new MM.
Well, we've been careful. And we haven't really started in on any really radical changes. BTW Could you list some of the Dirty Tricks you're playing so I can make sure they're not broken? So much of MakeMaker is undocumented lore.
Download wx.out
application/octet-stream 8.6k

Message body not shown because it is not plain text.

[guest - Sun Mar 31 16:06:15 2002]: Well, I can't build it at all, updated MM or not. Looks like something weird in the C code. See attached file. That was a build with 5.005_03 (so old MakeMaker) on Debian/PowerPC 3.0 and the libwxbase 2.2.9.2 package. Show quoted text
> BTW: great work! apart from that, everything > else works nicely, even is wxPerl's build > system plays Dirty Tricks against MM. I thought I > would have to make some substantial fixes for the new MM.
Well, we've been careful. And we haven't really started in on any really radical changes. BTW Could you list some of the Dirty Tricks you're playing so I can make sure they're not broken? So much of MakeMaker is undocumented lore.
Download wx.out
application/octet-stream 8.6k

Message body not shown because it is not plain text.

[guest - Sun Mar 31 16:06:15 2002]: Well, I can't build it at all, updated MM or not. Looks like something weird in the C code. See attached file. That was a build with 5.005_03 (so old MakeMaker) on Debian/PowerPC 3.0 and the libwxbase 2.2.9.2 package. Show quoted text
> BTW: great work! apart from that, everything > else works nicely, even is wxPerl's build > system plays Dirty Tricks against MM. I thought I > would have to make some substantial fixes for the new MM.
Well, we've been careful. And we haven't really started in on any really radical changes. BTW Could you list some of the Dirty Tricks you're playing so I can make sure they're not broken? So much of MakeMaker is undocumented lore.
Download wx.out
application/octet-stream 8.6k

Message body not shown because it is not plain text.

[guest - Sun Mar 31 16:06:15 2002]: Show quoted text
> wxPerl, Win32&Linux, perl@15632 > the module structure is > wxPerl/Makefile.PL > wxPerl/ext/grid/Makefile.PL > wxPerl/wxt/html/Makefile.PL > ... > > at build time all .pm an .so/.dll are put > in the toplevel blib
Is this normal behavior for MakeMaker or something WxPerl hacked in? Seems logical. Show quoted text
> ( BTW this requires a small > tweak in constants(), because MM's INST_* > are always ../blib even if the submakefile > is in a two level deep directory ).
You mean the code in build/? Eeek! Well... adding in support for Makefile.PL's below one subdirectory may be possible. init_dirscan's logic will have to be made recursive. From there everything should Just Work (finger's crossed). I don't think I'll have time to get to it before 5.8.0. However, if you'd like to take a swing I'll take a patch. I don't understand how your subroutines in build/Any_OS.pm are overriding things in MM. They should all be in package MY. Show quoted text
> make test for subdirectories fails because > @INC does not contains ../../blib/* ( it contains > blib/*, even if the subdir does not conatin > a blib ). Adding -Mblib to the line starting the > harness solves the problem.
Hmmm, tests in subdirectories. Hadn't thought of that. I'll have to change how test_via_harness works... again. Previously it was using the values of INST_LIB and INST_ARCH, but I'd changed them so they're absolute and put them into TEST_LIBS. Unfortunately on VMS this often results in a command line greater than the allowed 256 characters. So I switched to just using ExtUtils::testlib, which simply sticks an absolute blib/lib and blib/arch onto @INC. Obviously that's wrong if the test is in a subdir. So... what I'll do is change TEST_LIBS to once again be relative, so they're short, and then ExtUtils::Command::MM::test_harness will convert them to absolute paths itself. $(FULLPERL) "-MExtUtils::Command::MM" -e "test_harness($(TEST_VERBOSE), $(TEST_LIBS))" something like that. Either way, it'll be fixed.
[MSCHWERN - Sun Mar 31 19:04:04 2002]: Show quoted text
> I don't understand how your subroutines in build/Any_OS.pm > are overriding things in MM. They should all be in package MY.
Ahh. wxConfig::post_initialize is hacking the @ISA of MakeMaker's temporary package. Well... that's dangerous. I'd strongly recommend you instead build MY on the fly, possibly by using the techniques in ExtUtils::MakeMaker::mv_all_methods (DON'T call it directly). I can see why you chose to do it that way. Much easier to just change the superclass than shuffle around symbol tables. This doesn't help you much, but I will put it on the TODO list to make it so MY is actually inherited from and not simply copied. That way you can alter @MY::ISA and it will do the right thing.
[MSCHWERN - Sun Mar 31 19:04:04 2002]: Show quoted text
> > ( BTW this requires a small > > tweak in constants(), because MM's INST_* > > are always ../blib even if the submakefile > > is in a two level deep directory ).
> > You mean the code in build/? Eeek! > > Well... adding in support for Makefile.PL's below one subdirectory > may be possible. init_dirscan's logic will have to be made > recursive. From there everything should Just Work (finger's > crossed).
I was wrong, it already Just Works, but it's recursive. You just need a mostly empty Makefile.PL in ext/ so it can jump that gap. With that in place your override of constants is no longer necessary, nor must you explicitly set your DIRS. MakeMaker sets INST_LIB and friends correctly. Patch to WxPerl attached.
--- Makefile.PL 2002/04/01 02:22:18 1.1 +++ Makefile.PL 2002/04/01 02:25:59 @@ -35,15 +35,6 @@ ABSTRACT_FROM => 'Wx.pm', AUTHOR => 'Mattia Barbon <mbarbon@dsi.unive.it>', VERSION_FROM => 'Wx.pm', - DIR => [ MM->catdir( qw(ext grid) ), - MM->catdir( qw(ext mdi) ), - MM->catdir( qw(ext dnd) ), - MM->catdir( qw(ext html) ), - MM->catdir( qw(ext help) ), - MM->catdir( qw(ext filesys) ), - MM->catdir( qw(ext print) ), - MM->catdir( qw(ext xrc) ), - ], OBJECT => join( ' ', obj_from_src( @top_level_xs ) ) . ' ', ); --- build/Any_OS.pm 2002/04/01 02:03:46 1.1 +++ build/Any_OS.pm 2002/04/01 02:03:51 @@ -5,29 +5,6 @@ use File::Find; use wxMMUtils; -#FIXME// this is an horrendous hack... -# since MakeMaker does only understand Makefile.PL une level below -# the top directory, and we need towo level below, we add one additional -# level to INST_* constants beginning with 'updir' ( usually '..' ) -sub constants { - my $this = shift; - - if( $this->{PARENT} ) { - foreach my $k ( sort keys %$this ) { - $k !~ m/^INST_/ && next; - my $dir = $this->{$k}; - if( index( $dir, $this->updir ) == 0 ) { - $this->{$k} = $this->canonpath( $this->catdir - ( top_dir(), substr $this->{$k}, length( $this->updir ) ) ); -# substr( $this->{$k}, 0, length( $this->updir ) ) = top_dir(); - } - } - } - - package MY; - $this->SUPER::constants( @_ ); -} - sub depend { my $this = shift; my $exp = MM->catfile( qw(blib lib Wx _Exp.pm) ); --- /dev/null Fri Mar 15 19:43:09 2002 +++ ext/Makefile.PL Sun Mar 31 21:28:27 2002 @@ -0,0 +1,3 @@ +use ExtUtils::MakeMaker; + +WriteMakefile( NAME => 'nothing' );
[MSCHWERN - Sun Mar 31 19:04:04 2002]: Show quoted text
> Hmmm, tests in subdirectories. Hadn't thought of that.
Now thought of. Try out the current snapshot: http://www.makemaker.org/src/ExtUtils-MakeMaker-snap.tgz
AFAIK this issue is resolved.