“/bin/sh: C:Perl64binperl.exe: command not found”

2019-07-25 16:24发布

I am trying to build OpenSSL on Windows 10 64 bit machine using Code::blocks and Mingw. I already installed ActivePerl and MSYS. I am able to execute

perl Configure mingw

without errors. The problems is on executing the MAKE command. Regardless I am using the windows command prompt or MSYS, I always obtain the following error

C:\DiscoD\openssl>make CC=i586-mingw32msvc-gcc RANLIB=i586-mingw32msvc-ranlib
C:\Perl64\bin\perl.exe "-I." -Mconfigdata "util\dofile.pl" \
            "-oMakefile" crypto\include\internal\bn_conf.h.in > crypto\include\internal\bn_conf.h
/bin/sh: C:Perl64binperl.exe: command not found
make: *** [crypto\include\internal\bn_conf.h] Error 127

It seems the backslahes are removed from Perl.exe path, so the script cannot find C:/Perl64/bin/perl.exe. How to solve? Thanks

2条回答
等我变得足够好
2楼-- · 2019-07-25 17:17

I had the same problem and found that opening the Makefile and searching for "PERL=" found the line "PERL=C:\MinGW\msys\1.0\bin\perl.exe". Replacing the single-backslashes for double-backslashes (i.e., "PERL=C:\\MinGW\\msys\\1.0\\bin\\perl.exe") corrected the problem. Single forward-slashes also worked.

查看更多
SAY GOODBYE
3楼-- · 2019-07-25 17:29

You should see this recommendation from the OpenSSL distribution:

https://github.com/openssl/openssl/blob/master/NOTES.PERL#L30

Notes on Perl on Windows

There are a number of build targets that can be viewed as "Windows". Indeed, there are VC-* configs targeting VisualStudio C, as well as MinGW and Cygwin. The key recommendation is to use "matching" Perl, one that matches build environment. For example, if you will build on Cygwin be sure to use the Cygwin package manager to install Perl. For MSYS builds use the MSYS provided Perl. For VC-* builds we recommend ActiveState Perl, available from http://www.activestate.com/ActivePerl.

As you are doing an MSYS/MinGW build you should ensure that MSYS perl is installed (and on your path in preference to the ActiveState version). Then try the build again.

查看更多
登录 后发表回答