<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It is so easy to build OpenSSL using MinGW/MSYS!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Just type: ./Configure mingw64 ....... <whatever options you need/want></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
                  make all<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<img size="26123" contenttype="image/png" style="max-width: 100%; user-select: none;" unselectable="on" tabindex="-1" data-outlook-trace="F:1|T:1" src="cid:244b0963-a277-473a-95fe-9419d8ef84d0"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
How much experience do you have building apps from source on Windows? VS didn't work, MinGW didn't work either!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We are more than happy to assist you.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Have fun.<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> openssl-users <openssl-users-bounces@openssl.org> on behalf of Matt Caswell <matt@openssl.org><br>
<b>Sent:</b> Friday, 26 June 2020 11:30 PM<br>
<b>To:</b> openssl-users@openssl.org <openssl-users@openssl.org><br>
<b>Subject:</b> Re: Error building OpenSSL-1.1.1g</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText"><br>
<br>
On 26/06/2020 14:27, mhkelley2017@gmail.com wrote:<br>
> Matt,<br>
> <br>
> Thanks for your suggestion ...<br>
> <br>
>>><br>
>>> 2. Has anyone succeeded building OpenSSL for use in a Windows<br>
>>> 10 environment *without* need for visual studio?<br>
>><br>
>> You can do this using the MinGW compilers and the MSys2 shell. Note the<br>
>> MinGW compilers target *native* windows. So although you use Msys2 to<br>
>> build it, the resulting binaries are fully native.<br>
> <br>
> That was one of the first things I tried.  After exploring a few rabbit holes, I gave up and downloaded Visual Studio..<br>
> <br>
> Here is how far I got  I have been unable to even figure out where this error comes from ...<br>
> <br>
> ----------------------------------------------------------------------------------<br>
> $ where perl<br>
> C:\Perl64\bin\perl.exe<br>
> $ perl Configure mingw --prefix=$PREFIX<br>
> ******************************************************************************<br>
> This perl implementation doesn't produce Unix like paths (with forward slash<br>
> directory separators).  Please use an implementation that matches your<br>
> building platform.<br>
> <br>
> This Perl version: 5.24.3 for MSWin32-x64-multi-thread<br>
> ******************************************************************************<br>
<br>
For msys2 based builds you must use the msys2 provided perl version, not<br>
a native perl. Make sure msys2 has the perl package installed and remove<br>
this one from your path.<br>
<br>
Maybe we should add an FAQ section of common faults and how to fix them.<br>
<br>
Matt<br>
<br>
<br>
<br>
<br>
> Configuring OpenSSL version 1.1.1g (0x1010107fL) for mingw<br>
> Using os-specific seed configuration<br>
> ----------------------------------------------------------------------------------<br>
> <br>
> <br>
> -----Original Message-----<br>
> From: openssl-users <openssl-users-bounces@openssl.org> On Behalf Of Matt Caswell<br>
> Sent: Friday, June 26, 2020 3:04 AM<br>
> To: openssl-users@openssl.org<br>
> Subject: Re: Error building OpenSSL-1.1.1g<br>
> <br>
> <br>
> <br>
> On 26/06/2020 00:47, mhkelley2017@gmail.com wrote:<br>
>> 1. How do I figure out whether OpenSSL is trying to build the 32- or 64-bit version and which options, or environmental variables, or specific PATH elements do I need to pay attention to in order to accomplish that?<br>
> <br>
> My windows environment died on my recently, so I can't check the actual<br>
> output. IIRC just typing "cl" at the command line should give you<br>
> details about the compiler being used and whether it is for 32 or 64 bits.<br>
> <br>
> Visual Studio has a number of "developer command prompts" available with<br>
> it. If you start one of those it should have all the right environment<br>
> variables set up for you. There should be different command prompts for<br>
> 32 bit vs 64 bit.<br>
> <br>
> <a href="https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs">
https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs</a><br>
> <br>
> Alternatively there is the vcvarsall.bat script which comes with VS that<br>
> enables you to setup all the environment variables - you can specify as<br>
> an argument to script whether you are targeting 32 bit or 64 bit.<br>
> <br>
> <a href="https://stackoverflow.com/questions/43372235/vcvarsall-bat-for-visual-studio-2017">
https://stackoverflow.com/questions/43372235/vcvarsall-bat-for-visual-studio-2017</a><br>
> <br>
> As well as the VS tools environment variables you will need to make sure<br>
> both Perl (e.g. Strawberry Perl) and NASM are installed and are on your<br>
> %PATH%.<br>
> <br>
> <br>
>><br>
>> 2. Has anyone succeeded building OpenSSL for use in a Windows 10 environment *without* need for visual studio?<br>
> <br>
> You can do this using the MinGW compilers and the MSys2 shell. Note the<br>
> MinGW compilers target *native* windows. So although you use Msys2 to<br>
> build it, the resulting binaries are fully native.<br>
> <br>
> <br>
> There are details in the newly rewritten instructions for Windows:<br>
> <br>
> <a href="https://github.com/openssl/openssl/blob/OpenSSL_1_1_1-stable/NOTES.WIN">
https://github.com/openssl/openssl/blob/OpenSSL_1_1_1-stable/NOTES.WIN</a><br>
> <br>
> Matt<br>
> <br>
> <br>
>><br>
>> I'd really appreciate any useful information or pointers to such.<br>
>><br>
>> Thanks. <br>
>><br>
>><br>
>> -----Original Message-----<br>
>> From: openssl-users <openssl-users-bounces@openssl.org> On Behalf Of Matt Caswell<br>
>> Sent: Thursday, June 25, 2020 2:03 PM<br>
>> To: openssl-users@openssl.org<br>
>> Subject: Re: Error building OpenSSL-1.1.1g<br>
>><br>
>><br>
>><br>
>> On 25/06/2020 20:20, mhkelley2017@gmail.com wrote:<br>
>>> Thanks! That helped, but I have two follow-ups.<br>
>>><br>
>>> 1) To whom would I suggest minor changes to the available installation<br>
>>> instructions to help avoid future such misunderstandings?<br>
>><br>
>> You can raise on issue on Github. Or even better raise a PR with your<br>
>> suggested changes. However, as it so happens the Windows instructions<br>
>> have very recently been significantly updated - so some of your<br>
>> suggestions may already have been included:<br>
>><br>
>> <a href="https://github.com/openssl/openssl/pull/12098">https://github.com/openssl/openssl/pull/12098</a><br>
>><br>
>>> crypto\aes\aesni-mb-x86_64.obj : fatal error LNK1112: module machine type<br>
>>> 'x64' conflicts with target machine type 'x86'<br>
>><br>
>> This usually occurs when attempting to build 64-bit OpenSSL using the<br>
>> 32-bit VisualStudio tools.<br>
>><br>
>> Matt<br>
>><br>
>><br>
>><br>
>>> Could Not Find<br>
>>> c:\Users\Owner\LocalPrograms\OpenSSL\openssl-1.1.1g\libcrypto-1_1-x64.*<br>
>>> NMAKE : fatal error U1077: 'link' : return code '0x1'<br>
>>> Stop.<br>
>>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual<br>
>>> Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\nmake.exe"'<br>
>>> : return code '0x2'<br>
>>> Stop.<br>
>>><br>
>>> -----Original Message-----<br>
>>> From: openssl-users <openssl-users-bounces@openssl.org> On Behalf Of Matt<br>
>>> Caswell<br>
>>> Sent: Thursday, June 25, 2020 12:15 PM<br>
>>> To: openssl-users@openssl.org<br>
>>> Subject: Re: Error building OpenSSL-1.1.1g<br>
>>><br>
>>><br>
>>><br>
>>> On 25/06/2020 18:32, Michael Wojcik wrote:<br>
>>>>> From: openssl-users [<a href="mailto:openssl-users-bounces@openssl.org">mailto:openssl-users-bounces@openssl.org</a>] On Behalf<br>
>>> Of mhkelley2017@gmail.com<br>
>>>>> Sent: Thursday, June 25, 2020 11:54<br>
>>>><br>
>>>>> Error:  'ml64' is not recognized as an internal or external command,<br>
>>>>> operable program or batch file.<br>
>>>><br>
>>>> It's part of Visual C. The VC-WIN64A-masm configuration<br>
>>> (Configurations/50-masm.conf) specifies it as the assembler.<br>
>>><br>
>>> Note that using masm to compile OpenSSL is no longer supported by us<br>
>>> (although it might still work).<br>
>>><br>
>>> Preferred is to use the VC-WIN64A target and the nasm compiler.<br>
>>><br>
>>> If you use the Developer Studio command prompt (64-bit) it should have<br>
>>> all the environment variables set up already to find the various VS tools.<br>
>>><br>
>>> Matt<br>
>>><br>
>>><br>
>>>><br>
>>>>> Building with Visual Studio  2019 Community<br>
>>>><br>
>>>> Maybe VS2019 Community doesn't include the assembler? I haven't looked. Or<br>
>>> maybe it's part of some optional component?<br>
>>>><br>
>>>> In VS2017 Professional, which is what I have configured at the moment on<br>
>>> this machine, it's in .../VC/Tools/MSVC/14.16.27023/bin/HostX86/x64, thanks<br>
>>> to VS's gratuitously complicated directory layout.<br>
>>>><br>
>>>> --<br>
>>>> Michael Wojcik<br>
>>>> Distinguished Engineer, Micro Focus<br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>><br>
> <br>
</div>
</span></font></div>
</div>
</body>
</html>