microsoft / openssl

A cross-platform cryptographic library
133 stars 57 forks source link

Build hangs while running ms\do_vsprojects14.bat #24

Closed yuezhizizhang closed 8 years ago

yuezhizizhang commented 8 years ago

I've checkout tag OpenSSL_1_0_2g_WinRT. While running ms\do_vsprojects14.bat, it hangs:

Configured for VC-WINSTORE. unknown option - no-dso no rule for apps\ at util\mk1mf.pl line 1061. File ssl/tls1.h: cannot parse: ()

INFO::;

File ssl/tls1.h: cannot parse: ()

INFO::;

However, if I download the zip file OpenSSL_1_0_2_WinRT-stable, everything goes fine. What is the tag name of the 1.0.2g stable version?

Thanks.

khouzam commented 8 years ago

Hi @yuezhizizhang,

This is strange, the OpenSSL_1_0_2g_WinRT tag is at the exact same commit as the OpenSSL_1_0_2_WinRT-stable branch, which is the b6385a71e0c7e6d95bcb4662a76abf6f7958e39b commit.

yuezhizizhang commented 8 years ago

Hi khouzam,

I've checked out tag OpenSSL_1_0_2g_WinRT with command:

git checkout tags/OpenSSL_1_0_2g_WinRT -b OpenSSL_1_0_2g_WinRT

Thus, my working directory is a mirror of OpenSSL_1_0_2g_WinRT. While running ms\do_vsprojects14.bat from the command line, everything goes well. However, If I run the batch file from Makefile, it hangs.

The Makefile looks like: cd src; \ ms\do_vsprojects14.bat

The batch file hangs at:

Configured for VC-WINUNIVERSAL. unknown option - no-dso no rule for apps\ at util\mk1mf.pl line 1062. File ssl/tls1.h: cannot parse: ()

INFO::;

File ssl/tls1.h: cannot parse: ()

INFO::;

Any idea what's going wrong?

yuezhizizhang commented 8 years ago

I've found out the root cause. On Windows, core.autocrlf is TRUE by default. Consequently, line terminators of the checkout files are replaced by CRLF. However, the perl script fails for the CRLF line endings.

khouzam commented 8 years ago

Glad you found the cause. The default Windows instructions mention using ActivePerl, I guess, we didn't copy that clause in the WinRT instructions. I'll fix this to avoid others having the issue.

yuezhizizhang commented 8 years ago

Hi khouzam,

I suggest you add a .gitattributes file to the root folder, so that users don't have to change their configuration manually to avoid this pitfall. You just need to add one line into the .gitattributes file:

It works for me. https://git-scm.com/docs/gitattributes explains about it.

DongWang1111 commented 8 years ago

@yuezhizizhang Thanks for your info !