The following script fails:
sub which
{
my ($name)=@_;
if (eval { require IPC::Cmd; 1; }) {
IPC::Cmd->import();
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.
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”.
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.