in reply to Re^5: Installing File::Repl on a Mac possible?
in thread Installing File::Repl on a Mac possible?

Thanks, yeah. This is more what I was asking for. I wasn't sure if there might be some directive I could give cpan or cpanm to ignore this module. I'll dig around some more. But how did this module pass the tests for darwin machines? That's what I'm really wondering. What did those machines do to get this installed? I doubt an automated tester went through the trouble of modifying the Makefile. That's what leads me to believe there must be some kind of solution I'm missing.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

  • Comment on Re^6: Installing File::Repl on a Mac possible?

Replies are listed 'Best First'.
Re^7: Installing File::Repl on a Mac possible?
by syphilis (Archbishop) on Sep 10, 2018 at 03:57 UTC
    But how did this module pass the tests for darwin machines?

    Not sure - but it seems there's another bug in File::Repl in that the Makefile.PL fails to specify File::HomeDir as a prerequisite module.

    When I try to build File::Repl on Linux, I find that it also tries (and fails) to build and install Win32::API.
    But that's not what causes the build to fail - the failure I get (during the "make test" phase) on Linux is:
    Running make test PERL_DL_NONLAZY=1 "/home/sisyphus/perl528-f128/bin/perl" "-Iblib/lib" +"-Iblib/arch" test.pl Can't locate File/HomeDir.pm in @INC (you may need to install the File +::HomeDir module) (@INC contains: blib/lib blib/arch /home/sisyphus/p +erl528-f128/lib/site_perl/5.28.0/x86_64-linux-quadmath /home/sisyphus +/perl528-f128/lib/site_perl/5.28.0 /home/sisyphus/perl528-f128/lib/5. +28.0/x86_64-linux-quadmath /home/sisyphus/perl528-f128/lib/5.28.0 .) +at test.pl line 9. BEGIN failed--compilation aborted at test.pl line 9. Makefile:847: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 2
    I can only assume that the smokers already have File::HomeDir installed. Anyway, if that's the error that's killing you're build, you can get past it by first running "cpan -i File::HomeDir".

    Having done all that, I still find on Linux that, although all tests then pass, cpan steadfastly refuses to install the module because of the missing Win32::API module.
    Even with force, cpan refuses to install the module - a behaviour that I find offensively annoying.
    I don't know how the smokers get around that - maybe they don't have to. Maybe they're just reporting that "make test" was successful (which it was, despite the missing prerequisite).
    The fact that the module can't be installed might not bother them as it's beyond their terms of reference ... or something. Dunno.

    Anyway, if having reached the stage that cpan refuses to install the module simply because Win32::API was not installed, you should at least be able to cd to that File::Repl build directory and successfully run "make install" (or "sudo make install" if that's applicable).

    Cheers,
    Rob

      Ah, ok, I'm clearly deficient in my knowledge of how smoke testing works. I assumed the module got installed on the smoke testers' machines. I'll have to bone up on all that.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

        I assumed the module got installed on the smoke testers' machines.

        Yes - it would be handy if someone could clarify this.
        I think the problem in getting File::Repl to actually install on Linux was specific to the cpan utility, so another thing to consider is that perhaps the smokers aren't using that utility at all.

        Cheers,
        Rob
Re^7: Installing File::Repl on a Mac possible?
by pryrt (Abbot) on Sep 10, 2018 at 14:12 UTC

    I don't have a Mac to test it on, but the applying the following patch to the Makefile.PL (patch -u Makefile.PL path/to/patchfile) should work for you. The patch adds the prereq of File::HomeDir, and only includes Win32::API if it's a MSWin32 machine

    --- Makefile-orig.PL 2018-09-10 06:47:08.686476300 -0700 +++ Makefile.PL 2018-09-10 06:50:29.999858000 -0700 @@ -22,15 +22,24 @@ use ExtUtils::MakeMaker; -WriteMakefile( - 'NAME' => 'File::Repl', - 'VERSION_FROM' => 'Repl.pm', # finds $VERSION - 'PREREQ_PM' => { +my $prereq = { File::Find => 0, File::Copy => 2.03, File::Basename => 2.6, - Win32::API => 0, # 0.2000.07.08, - }, # e.g., Module::Name => 1.1 + File::HomeDir => 0, +# Win32::API => 0, # 0.2000.07.08, +}; +$prereq->{Win32::API} = 0 if $^O eq 'MSWin32'; + +WriteMakefile( + 'NAME' => 'File::Repl', + 'VERSION_FROM' => 'Repl.pm', # finds $VERSION + 'PREREQ_PM' => $prereq, #{ +# File::Find => 0, +# File::Copy => 2.03, +# File::Basename => 2.6, +# Win32::API => 0, # 0.2000.07.08, +# }, # e.g., Module::Name => 1.1 'dist' => { ZIP => 'wzzip.exe', ZIPFLAGS => "-P",

    The procedure I would use (since I use cpanm) would be to put the patchfile in my home directory, then:

    cpanm --look File::Repl patch -u Makefile.PL ~/patchfile make make test make install

    If that works for you, you should file a bug report at rt://File-Repl, and email the author mentioned at File::Repl (there are bugs from years ago, so I'm not sure he's paying attention to the bug tracker), including the patch file. (Doing it through a repo would have been even better, but couldn't find it in a quick look at github.)