in reply to Re: [Win32] Math::GSL on perl 5.10.0
in thread [Win32] Math::GSL on perl 5.10.0

Nor more sure that this is actually the solution

Turns out to be the same type of thing - thanks for the pointer.

Once I searched the Module::Build source for the string "Can't locate the perl binary", it all fell into place fairly quickly.
In Module/Build/Base.pm there's some checking goes on - looks like they're trying to verify that the perl being used is the first perl to be found in the path. (I don't know why that needs to be done ... I doubt that it does ... but maybe they're trying to check something else altogether...)

Everything's fine until Base.pm's _quoted_args() sub puts single quotes around C:\MinGW\perl510\bin\perl.exe so that, instead of executing:
C:\MinGW\perl510\bin\perl.exe -MConfig=myconfig -e print -e myconfig
this gets executed:
'C:\MinGW\perl510\bin\perl.exe' -MConfig=myconfig -e print -e myconfig
which produces the The filename,... error.

A simple $cmd =~ s/'//g; just prior to the execution of $cmd fixes the problem.
It's interesting that the same version of Module::Build (ie 0.38) on perls 5.8.0, 5.8.9, 5.12.0 and 5.14.0 does not throw up this problem. I guess there's something specific to 5.10.0 that triggers the error.

Cheers,
Rob

Update: Originally copy'n'pasted the wrong string in a couple of places ... now fixed.

Replies are listed 'Best First'.
Re^3: [Win32] Math::GSL on perl 5.10.0
by BrowserUk (Patriarch) on Nov 04, 2011 at 23:47 UTC
    looks like they're trying to verify that the perl being used is the first perl to be found in the path.

    Still don't get why they don't just let the shell do that job.

    Better still as far as I'm concerned would be to use $^X. That way, if I want to install to a perl other than my default version, I could just invoke it with the full path name from wherever it lives and not have to faff around modifying my path to get it to install in the right place.

    Doesn't $^X work on other platforms?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      FWIW, this bug (however stupid) has long big fixed, upgrade Module::Build
        I was using the latest stable build of Module::Build (version 0.38). There's only one later version available and it's a devel version (0.39_01) - it does indeed fix the problem, though the Module::Build::Base_quote_args() sub is unchanged and still surrounds the first element with single quotes.
        However, 0.39_01 apparently manages to avoid calling this sub.

        Cheers,
        Rob
      That way, if I want to install to a perl other than my default version, I could just invoke it with the full path name from wherever it lives

      Actually, now that I think about it, that's exactly what I was doing at one point (and still getting the same error). At that time, the only perl in my path was the one that resides in MinGW/msys/bin - and I certainly don't want it getting invoked. (MinGW/msys/bin was in the path for other reasons, not because it contained a perl installation ... obviously.)

      So, my guess at the reason for the route that Module::Build takes was probably a bad one.

      Cheers,
      Rob