MSYS 编译 openssl-3.0.0-alpha4 发生错误时解决方法

******************************************************************************
This perl implementation doesn't produce Unix like paths (with forward slash
directory separators).  Please use an implementation that matches your
building platform.

This Perl version: 5.18.0 for MSWin32-x86-multi-thread-64int
******************************************************************************
出现这个错误,需要MSYS2的perl
https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/perl-5.30.2-1-i686.pkg.tar.xz.sig/download
解压到 D:\MSYS\opt\perl-5.30.2-1-i686\usr\bin
运行perl出错时,下载msys2-base-i686-20190524.tar.xz
https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20190524.tar.xz/download
并这个包里所有的dll文件解压到D:\MSYS\opt\perl-5.30.2-1-i686\usr\bin目录下,这样正常运行perl

./Configure mingw --prefix=/usr/local
正常结束之后修改 configdata.pm 和 Makefile
/usr/bin/perl      --->  perl

make depend && make && make install 出现一下错误
make[1]: execvp: ar: Bad file number
make[1]: *** [libcrypto.a] Error 127
make[1]: Leaving directory `/build/libs/openssl-3.0.0-alpha4'
make: *** [build_sw] Error 2
错误原因是 ar 命令行太长

make -n>make.txt
查找 "ar r libcrypto.a"
把所有的 *.obj 文本写入 crypto-all.obj 文件中
利用 ar @option - read options from file
ar r libcrypto.a @crypto-all.obj
ranlib libcrypto.a

这样可以生成 libcrypto.a 
然后make && make install 就可以;

猜你喜欢

转载自www.cnblogs.com/nlsoft/p/13211391.html