Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^6: Errors While Installing Image::Magick

by syphilis (Archbishop)
on Feb 15, 2024 at 23:23 UTC ( [id://11157718]=note: print w/replies, xml ) Need Help??


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

fileparse(): need a valid pathname at C:/Strawberry/perl/site/lib/ExtUtils/Install.pm line 1187.

I've installed SP-5.24.1.1 - same version as yours, but I can't reproduce the problem.
I've grabbed the "portable" version, not the "msi installer" - but that should make no difference.
I do see the "scoped enums only available with -std=c++11 or -std=gnu++11" warning, but the build succeeds anyway.

So I think we're looking at a problem with ExtUtils::MakeMaker.
What version of ExtUtils::MakeMaker do you have ?
Strawberry 5.24.1 shipped with version 7.24, and that's the version I've used.
On Strawberry 5.24.4 (which I already had), version 7.34 is installed - and there was no problem with it, either.

Also, what does line 1187 of Install.pm state ? (We might be able to fix your issue by patching that file.)

Update:
C:\Strawberry\perl\lib\Config.pm -- No "ccflags" entries in this file.
C:\Strawberry\perl\lib\Config_heavy.pl -- I found: cc='$cc', ccflags ='$ccflags', but $ccflags is set somewhere else (this is the only reference).


Sorry - skimmed past that.
Yes - wrt altering of $Config{ccflags}, it's only Config_heavy.pl that needs patching.
If you keep searching further through that file you'll come to the line that needs to be altered. Search for ccflags=
I think you can also temporarily override ccflags the same way as I did for cc:
perl Makefile.PL CC=g++ CCFLAGS="full space-delimited list of all the +flags that you want"
Cheers,
Rob

Replies are listed 'Best First'.
Re^7: Errors While Installing Image::Magick
by roho (Bishop) on Feb 16, 2024 at 02:17 UTC
  • 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."

      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."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-05-22 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found