AS Perl 5.26.1 IPC::Cmd::can_run fails on Windows

The following script fails:
sub which
my ($name)=@_;
if (eval { require IPC::Cmd; 1; }) {
print “About to can run $name\n”;
my $ret = scalar IPC::Cmd::can_run($name);
print “Finished can run $name\n”;
return $ret;
my $j = which(“ranlib”);
print “$j”;
The following is the output on Windows 10 Ent 20H2: (Note is uses coloring that isn’t shown)
About to can run ranlib

It looks like you don't have either nmake.exe or dmake.exe on your PATH,
so you will not be able to execute the commands from a Makefile.  You can
install dmake.exe with the Perl Package Manager by running:

    ppm install dmake

Finished can run ranlib

Note: If you do have ranlib in your path just change it to something you don’t have.


To get your own copy you can dl it from:
ActivePerl-5.26 - sldr22 - ActiveState Platform

Hey @sldr22!

Thanks for the report!

@ActiveState-Support - could you take a look at this?


This isn’t exactly a fail. This is a designed exit happening in the ExtUtils::MakeMaker module.

This happens because The Platform doesn’t support make tools and CPAN scripts.

The “can_run” subroutine in IPC::Run leverages MakeMaker for a routine called “maybe_command”. Maybe_command checks to see if the string supplied is likely to be a match for a known command.

Unfortunately, this is a very big hammer for a small task. MakeMaker immediately checks if it can run, and it needs make tools, which ActivePerl doesn’t support and Windows doesn’t provide. MakeMaker won’t even use those make tools in this case, but there’s no way to avoid the startup functionality check, so MakeMaker exits.

The error message is also “legacy”. nmake hasn’t been supported by ActivePerl since 5.16 and PPM is no longer supported either. I think that message is probably coming from the legacy ActivePerl-CPAN-Config shim, but even if that shim was pulled out, MakeMaker will still have a problem.

I can only suggest that you look for another way to do this. Perl is famous for “there is more than one way to do it”.

1 Like

Thank you for looking into the issue. I will see if Perl 5.28 can be used instead (I don’t remember why I reverted back to 5.26).

FYI: This is coming out of building OpenSSL 1.1.1i on Windows and running the perl script Configure. The OpenSSL people don’t seem to want to “adjust” their perl script just for Windows ActiveState perl. I think a community member said Strawberry perl works but I have not tried it.

(Stephen L. De Rudder)