GmSSL icon indicating copy to clipboard operation
GmSSL copied to clipboard

windows下编译GmSSL执行do_ms卡住

Open sinotitan opened this issue 11 years ago • 10 comments

你好!

我试着编译GmSSL在windows下: OS:win10 64位 编译成32位的动态库。 目前情况: D:\src\GmSSL\guanzhi-GmSSL-cc31670>ms\do_ms

D:\src\GmSSL\guanzhi-GmSSL-cc31670>perl util\mkfiles.pl 1>MINFO

D:\src\GmSSL\guanzhi-GmSSL-cc31670>perl util\mk1mf.pl no-asm VC-WIN32 1>ms\nt.m ak

D:\src\GmSSL\guanzhi-GmSSL-cc31670>perl util\mk1mf.pl dll no-asm VC-WIN32 1>ms
ntdll.mak

D:\src\GmSSL\guanzhi-GmSSL-cc31670>if x == x goto skipce

D:\src\GmSSL\guanzhi-GmSSL-cc31670>perl -d util\mkdef.pl 32 libeay 1>ms\libeay3 2.def

然后就卡住了。

请问是什么问题?

sinotitan avatar Oct 22 '15 09:10 sinotitan

调试了下mkdef.pl发现可能是938这里死循环了

sinotitan avatar Oct 22 '15 09:10 sinotitan

今天上午又看了下,时候是添加的CPK算法信息有问题,卡住了

sinotitan avatar Oct 23 '15 02:10 sinotitan

mkdef.pl文件中关于CPK算法的部分可能有问题,因为GmSSL仍在开发中,我们没有在Windows上做任何测试,建议你优先选择Mac作为试用环境。

guanzhi avatar Oct 31 '15 08:10 guanzhi

在编译时,忽略了CPK算法(如perl Configure no-cpk VC-WIN64A),还是会出现mkdef.pl卡死的问题。

bjgxjob avatar Mar 26 '16 02:03 bjgxjob

哪位perl熟悉的调一下吧

James1256 avatar May 25 '16 07:05 James1256

之前遇到过类似问题,如果do_ms.bat执行长时间无响应,则可能是include目录下的头文件中存在不规范的函数原型:

简单通过grep查了一下:grep -r "()" include/openssl/* | grep -v ":[ #//]",在cpk.h中发现一个

X509_ALGOR *CPK_MAP_new_default();

这里要改成

X509_ALGOR *CPK_MAP_new_default(void);

没有在Windows环境上试过,不知道能否解决问题

conezxy avatar May 26 '16 01:05 conezxy

@conezxy , 这两个定义有区别吗?应该都符合C标准的吧

James1256 avatar May 26 '16 07:05 James1256

非常感谢 @conezxy 发现这个问题!

guanzhi avatar May 26 '16 10:05 guanzhi

@James1256 void f()表明f可以接收任意数量的参数,如:f(),f(1),f(1,2)都行.void f(void)则指定f不能接收任何参数,只能f().

hidva avatar May 26 '16 12:05 hidva

函数改了后,应该不卡死了,但相关的文件都要改动过才能正确运行,并生成编译文件吧

James1256 avatar May 27 '16 08:05 James1256