janjan has asked for the wisdom of the Perl Monks concerning the following question:

Hi fellow monks, Here's a problem that's been getting the best of me all morning. ExtUtils::MakeMaker seems to work just fine on my OS X laptop. I've been writing, testing, and installing there for months now.

I create a tarball with make dist and scp it over to the server so that my entire group can test the application. I untar it, and do perl Makefile.PL ; make ; make install. Everything appears to be going fine until the very last moment, when I realize that it's not actually installing any of my modules:
Writing /usr/local/apache/share/cgi-lib/policymaker/auto/PolicyMaker/. +packlist Appending installation info to /usr/local/lib/perl5/5.8.0/i686-linux/p +erllocal.pod
... is all I get after the entering/leaving directories bit. I find this incredibly strange, since it's working without a hitch on my laptop.

For reference, here's the Makefile.PL:
[Freyja:~/CVSdev/policymaker] janet% more Makefile.PL use strict; use Data::Dumper; use ExtUtils::MakeMaker; use ExtUtils::Manifest; use ExtUtils::Install; use Config::Tiny; my $config_file = 'data/config.ini'; # parse the config file my $conf = Config::Tiny->read($config_file); my $paths = $conf->{paths}; my %opts = ( NAME => 'PolicyMaker', VERSION => "1.0", INSTALLSITELIB => $paths->{cgilib}, realclean => {FILES => '$(INST_ARCHAUTODIR)/*.old *,v'} , test => {TESTS => 't/*.t'}, dist => {COMPRESS => 'gzip', SUFFIX => '.gz'}, #VERBINST => $conf->{_}->{verbose} ); WriteMakefile( %opts );
And here's what the directory looks like:
[Freyja:~/CVSdev/policymaker] janet% ls CVS MANIFEST.SKIP Makefile.old data MANIFEST + Makefile.PL README lib
I know that MakeMaker needs a Makefile.PL at every level (yes?), so here's what lib looks like:
[Freyja:~/CVSdev/policymaker] janet% ls lib CVS PolMaker-Rate-DiscountType Makefile.PL PolMaker-Rate-Legal PolMaker-AffUnderwriter PolMaker-Rate-MaxValsCoverage PolMaker-Affiliate PolMaker-Rate-Medical PolMaker-AutoPolicy PolMaker-Rate-Surcharge PolMaker-AutoQuote PolMaker-Rate-SurchargeType PolMaker-DBI PolMaker-Rate-Travel PolMaker-Insured PolMaker-Rate-TravelMexpro PolMaker-ItemValue PolMaker-Territory PolMaker-MMUnderwriter PolMaker-Towed PolMaker-Make PolMaker-TowedType PolMaker-Model PolMaker-Underwriter PolMaker-PolicyTowed PolMaker-User PolMaker-PowerUnit PolMaker-Util PolMaker-Quote PolMaker-VehicleCoverageType PolMaker-Rate PolMaker-VehicleType PolMaker-Rate-AutoLiability config.pl PolMaker-Rate-AutoPremium handler.pl PolMaker-Rate-Discount
Each of those directories contains the requisite module, a Makefile.PL, and various other things (I generated 'em all with h2xs.) Note that nothing from this directory actually gets installed. Here's lib/Makefile.PL:
[Freyja:~/CVSdev/policymaker] janet% cat lib/Makefile.PL use strict; use ExtUtils::MakeMaker; WriteMakefile( NAME => "Modules");
That's it. And it's working like a charm on my laptop. Both the server and the laptop are using perl 5.8.0. The server is running the latest version of RedHat Linux.

I don't think it's a permissions issue; I've double- and triple-checked that, and I've tried installing the modules as root. Is there anything at all I could be missing?

Thanks for any pointers you can give.

Replies are listed 'Best First'.
Re: MakeMaker not installing any modules
by tilly (Archbishop) on Oct 05, 2003 at 03:40 UTC
    For a cleaner solution to cross-platform installation scripts, you might look at using Module::Build instead.
Re: MakeMaker not installing any modules
by hardburn (Abbot) on Oct 01, 2003 at 20:28 UTC

    I know that MakeMaker needs a Makefile.PL at every level (yes?)

    No.

    In a typical distribution of a C program, Makefiles themselves are usually generated at each level of the directory structure, though this is not strictly necessary.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      Hm, okay. Was this a change from an earlier version of Perl? I seem to remember having to put a Makefile.PL at every level when I wrote an app in 5.005. And it works on my laptop, which tells me that this might not be the root of the problem.

      However, removing lib/Makefile.PL did work -- sort of. At least it's installing something. It's now doing this for every module:
      Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/RE +ADME Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/Ma +kefile.PL Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/pm +_to_blib Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/MA +NIFEST Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/Ma +kefile Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/Au +toQuote.pm Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/Ch +anges Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/t/ +02_test.t Installing /usr/local/apache/cgi-lib/policymaker/PolMaker-AutoQuote/t/ +01_load.t
      In other words, it's installing the entire directory. What it should be installing instead is
      /usr/local/apache/cgi-lib/policymaker/PolMaker/AutoQuote.pm
      ... so I'm clearly still going wrong somewhere. Ideas?
Re: MakeMaker not installing any modules
by janjan (Beadle) on Oct 01, 2003 at 22:57 UTC
    Update: I changed around the architecture of my distribution, so that each module was in its "proper" place -- i.e., instead of PolMaker-Rate-AutoLiability/AutoLiability.pm, I'm using the directory structure that will be in place in the installation, PolMaker/Rate/AutoLiability.pm. (I've used the former structure before, without problem, but I noticed in my troubleshooting that no one else around here seems to use it. Hm.)

    Still working just fine on OS X; still broken on Linux. Then it occurred to me that since I'm root, there's nothing stopping me from trying to install the various modules in site_perl, right? So, I took out this line from the top-level Makefile.PL:
    INSTALLSITELIB => $paths->{cgilib},
    And boom! Lines upon lines of beautiful things like
    Installing /usr/local/lib/perl5/site_perl/5.8.0/PolMaker/Rate/AutoLiab +ility.pm
    So the problem is fixed, in a way. (I'd rather keep these modules local, but I'm happy that it's working, at this point.) But I still don't know why I was having the problem in the first place. The only difference I can find is that the version of ExtUtils::MakeMaker is different: 6.03 on the Mac, and 6.17 on the Linux box.

    Any ideas/comments (including "use Module::Build instead, you dolt!"), I'd love to hear 'em.
      Why not try PREFIX or LIB ( as in perl Makefile.PL PREFIX=~/yoda )? How up-to-date is your MakeMaker? (you should have the latest/greatest)

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.