Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^7: Errors While Installing Image::Magick

by roho (Bishop)
on Feb 16, 2024 at 02:17 UTC ( [id://11157721]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Errors While Installing Image::Magick
in thread Errors While Installing Image::Magick

  • I have ExtUtils::MakeMaker (version 7.24).

  • The temporary override "perl Makefile.PL CC=g++" works ok.

  • I researched the error message "fileparse(): need a valid pathname" at line 1187 and found that it is issued by module "File::Basename qw(dirname)".

    This is as far as I've gotten trying to track down the source of the error in C:\Strawberry\perl\site\lib\ExtUtils\Install.pm.

    7 use File::Basename qw(dirname);
    1165 while(my($from, $to) = each %$fromto) {
    1187 my $dirname = dirname($to);

    It appears the "$to" variable in line 1187 which comes from the "%$fromto" hash in line 1165 is empty, but I feel like I'm on the verge of descending into a rabbit hole here. :-)

    Update: I took my research one step further and found that the subroutine "pm_to_blib" in C:\Strawberry\perl\site\lib\ExtUtils\Install.pm is referenced in the following makefile:
    C:\Strawberry\cpan\build\Image-Magick-7.1.1-10\Makefile

    ... and that's where my expertise in this area ends. :-(

    "It's not how hard you work, it's how much you get done."

    • Comment on Re^7: Errors While Installing Image::Magick
  • Replies are listed 'Best First'.
    Re^8: Errors While Installing Image::Magick
    by syphilis (Archbishop) on Feb 16, 2024 at 03:11 UTC
      This is as far as I've gotten trying to track down the source of the error in C:\Strawberry\perl\site\lib\ExtUtils\Install.pm.

      Duh ... I need to learn how to read more carefully.
      For me, there is no perl\site\lib\ExtUtils\Install.pm, only perl\lib\ExtUtils\Install.pm

      I think we just need to have the EU::MM that's in perl\lib found - not the one in perl\site\lib.
      Try renaming perl\site\lib\ExtUtils to perl\site\lib\Extutils_hide, and then retry building and installing Image-Magick.
      There's absolutely nothing in my perl-5.24.1 site/lib/folder, so hiding it's ExtUtils folder shouldn't matter for this exercise.
      You'll probably want to make it visible again after you've run "dmake install"- so that it can lurk about and mysteriously screw up other stuff at a future date ;-)

      Cheers,
      Rob
        I renamed the "Install.pm" file and discovered that my perl/lib/ExtUtils does NOT contain the "Install.pm" file, which obviously created an entirely new set of errors, so I renamed the file back. The mystery continue to grow.

        Update: Sorry, I also renamed the directory ".../ExtUtils" to ".../ExtUtils_HIDE", but get the same errors, so I renamed the directory back.

        "It's not how hard you work, it's how much you get done."

          If perl/lib/ExtUtils/Install.pm is missing, then it has been removed ... and if that's the case then who knows what else has been jiggered with.
          It's not so much the location of the file that's important, it's that your Strawberry-5.24.1 perl/site/lib/ExtUtils/Install.pm is quite different to my Strawberry-5.24.1 perl/lib/ExtUils/Install.pm.
          You reported the following content for your Install.pm:
          7 use File::Basename qw(dirname); 1165 while(my($from, $to) = each %$fromto) { 1187 my $dirname = dirname($to);
          For those line numbers (of 7, 1165 and 1187) my Install.pm has:
          7 use Carp (); 1165 Filenames with the extension .pm are autosplit into the $autospli +t_dir. 1187 next;
          In my Strawberry-5.24.1 Install.pm, there is no mention of any variable $dirname.

          If you run dmake instead of dmake test do you get an error ?
          If there's no error (or even if there is), you could try running the tests by entering:
          "C:Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Ha +rness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\li +b', 'blib\arch')" t/*.t
          And you could try installing the module by running:
          "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonemp +ty -- Magick.bs blib\arch\auto\Image\Magick\Magick.bs 644
          Cheers,
          Rob

          Update:
          For reference, that test command will, if run successfully, output:
          t/blob.t .......... ok t/composite.t ..... ok t/filter.t ........ ok t/getattribute.t .. ok t/montage.t ....... ok t/ping.t .......... ok t/read.t .......... ok t/setattribute.t .. ok t/write.t ......... ok All tests successful. Files=9, Tests=273, 2 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 C +PU) Result: PASS

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://11157721]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others studying the Monastery: (3)
    As of 2025-11-07 15:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What's your view on AI coding assistants?





      Results (65 votes). Check out past polls.

      Notices?
      hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.