RE: Error building OpenSSL-1.1.1g

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you both, Matt and Sergio (and maybe Michael who just now weighed in but whose post I have not read).  You finally gave me clues sufficient to solve my problems. At present, OpenSSL is crunching through its tests and hasn't turned up a problem, so I think I can safely declare victory.

Thanks in particular to Sergio for giving me the assurance that OpenSSL *could* successfully build under Mingw-w6.
And thanks in particular to Matt for the key question that "It may well be that your MSYS2 environment already has perl available".

I simply re-installed MSYS2 and that solved all problem of which I was aware.

More complete response: I was running msys2-x86_64-20180531.exe, which I installed about 2 years ago.  Id *did not* include a version of perl.  It is hard to believe I would have deleted it, because that is a tool I use very frequently (though I'm generally in a standard windows command shell instead of MSYS2).  At some point, I installed and have relied on ActivePerl.

I deleted that version of MSYS2 and installed  msys2-base-x86_64-20200602.  This was a raw install - I still need to re-configure a bunch of add-on packages, but that is for later.  First thing I did after MSYS2 configured itself was re-run my build script - didn't change anything, just re-ran it.

Problem solved.

Again, thanks for sticking we me to success!

Mke


-----Original Message-----
From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Matt Caswell
Sent: Friday, June 26, 2020 9:56 AM
To: openssl-users@xxxxxxxxxxx
Subject: Re: Error building OpenSSL-1.1.1g



On 26/06/2020 14:30, Matt Caswell wrote:
>> C:\Perl64\bin\perl.exe

Try *removing* this perl from your %PATH%. It may well be that your
MSYS2 environment already has perl available but this version is taking
priority.

Matt



>> $ perl Configure mingw --prefix=$PREFIX
>> ******************************************************************************
>> 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.24.3 for MSWin32-x64-multi-thread
>> ******************************************************************************
> 
> For msys2 based builds you must use the msys2 provided perl version, not
> a native perl. Make sure msys2 has the perl package installed and remove
> this one from your path.
> 
> Maybe we should add an FAQ section of common faults and how to fix them.
> 
> Matt
> 
> 
> 
> 
>> Configuring OpenSSL version 1.1.1g (0x1010107fL) for mingw
>> Using os-specific seed configuration
>> ----------------------------------------------------------------------------------
>>
>>
>> -----Original Message-----
>> From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Matt Caswell
>> Sent: Friday, June 26, 2020 3:04 AM
>> To: openssl-users@xxxxxxxxxxx
>> Subject: Re: Error building OpenSSL-1.1.1g
>>
>>
>>
>> On 26/06/2020 00:47, mhkelley2017@xxxxxxxxx wrote:
>>> 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?
>>
>> My windows environment died on my recently, so I can't check the actual
>> output. IIRC just typing "cl" at the command line should give you
>> details about the compiler being used and whether it is for 32 or 64 bits.
>>
>> Visual Studio has a number of "developer command prompts" available with
>> it. If you start one of those it should have all the right environment
>> variables set up for you. There should be different command prompts for
>> 32 bit vs 64 bit.
>>
>> https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
>>
>> Alternatively there is the vcvarsall.bat script which comes with VS that
>> enables you to setup all the environment variables - you can specify as
>> an argument to script whether you are targeting 32 bit or 64 bit.
>>
>> https://stackoverflow.com/questions/43372235/vcvarsall-bat-for-visual-studio-2017
>>
>> As well as the VS tools environment variables you will need to make sure
>> both Perl (e.g. Strawberry Perl) and NASM are installed and are on your
>> %PATH%.
>>
>>
>>>
>>> 2. Has anyone succeeded building OpenSSL for use in a Windows 10 environment *without* need for visual studio?
>>
>> You can do this using the MinGW compilers and the MSys2 shell. Note the
>> MinGW compilers target *native* windows. So although you use Msys2 to
>> build it, the resulting binaries are fully native.
>>
>>
>> There are details in the newly rewritten instructions for Windows:
>>
>> https://github.com/openssl/openssl/blob/OpenSSL_1_1_1-stable/NOTES.WIN
>>
>> Matt
>>
>>
>>>
>>> I'd really appreciate any useful information or pointers to such.
>>>
>>> Thanks. 
>>>
>>>
>>> -----Original Message-----
>>> From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Matt Caswell
>>> Sent: Thursday, June 25, 2020 2:03 PM
>>> To: openssl-users@xxxxxxxxxxx
>>> Subject: Re: Error building OpenSSL-1.1.1g
>>>
>>>
>>>
>>> On 25/06/2020 20:20, mhkelley2017@xxxxxxxxx wrote:
>>>> Thanks! That helped, but I have two follow-ups.
>>>>
>>>> 1) To whom would I suggest minor changes to the available installation
>>>> instructions to help avoid future such misunderstandings?
>>>
>>> You can raise on issue on Github. Or even better raise a PR with your
>>> suggested changes. However, as it so happens the Windows instructions
>>> have very recently been significantly updated - so some of your
>>> suggestions may already have been included:
>>>
>>> https://github.com/openssl/openssl/pull/12098
>>>
>>>> crypto\aes\aesni-mb-x86_64.obj : fatal error LNK1112: module machine type
>>>> 'x64' conflicts with target machine type 'x86'
>>>
>>> This usually occurs when attempting to build 64-bit OpenSSL using the
>>> 32-bit VisualStudio tools.
>>>
>>> Matt
>>>
>>>
>>>
>>>> Could Not Find
>>>> c:\Users\Owner\LocalPrograms\OpenSSL\openssl-1.1.1g\libcrypto-1_1-x64.*
>>>> NMAKE : fatal error U1077: 'link' : return code '0x1'
>>>> Stop.
>>>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>>>> Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\nmake.exe"'
>>>> : return code '0x2'
>>>> Stop.
>>>>
>>>> -----Original Message-----
>>>> From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Matt
>>>> Caswell
>>>> Sent: Thursday, June 25, 2020 12:15 PM
>>>> To: openssl-users@xxxxxxxxxxx
>>>> Subject: Re: Error building OpenSSL-1.1.1g
>>>>
>>>>
>>>>
>>>> On 25/06/2020 18:32, Michael Wojcik wrote:
>>>>>> From: openssl-users [mailto:openssl-users-bounces@xxxxxxxxxxx] On Behalf
>>>> Of mhkelley2017@xxxxxxxxx
>>>>>> Sent: Thursday, June 25, 2020 11:54
>>>>>
>>>>>> Error:  'ml64' is not recognized as an internal or external command,
>>>>>> operable program or batch file.
>>>>>
>>>>> It's part of Visual C. The VC-WIN64A-masm configuration
>>>> (Configurations/50-masm.conf) specifies it as the assembler.
>>>>
>>>> Note that using masm to compile OpenSSL is no longer supported by us
>>>> (although it might still work).
>>>>
>>>> Preferred is to use the VC-WIN64A target and the nasm compiler.
>>>>
>>>> If you use the Developer Studio command prompt (64-bit) it should have
>>>> all the environment variables set up already to find the various VS tools.
>>>>
>>>> Matt
>>>>
>>>>
>>>>>
>>>>>> Building with Visual Studio  2019 Community
>>>>>
>>>>> Maybe VS2019 Community doesn't include the assembler? I haven't looked. Or
>>>> maybe it's part of some optional component?
>>>>>
>>>>> In VS2017 Professional, which is what I have configured at the moment on
>>>> this machine, it's in .../VC/Tools/MSVC/14.16.27023/bin/HostX86/x64, thanks
>>>> to VS's gratuitously complicated directory layout.
>>>>>
>>>>> --
>>>>> Michael Wojcik
>>>>> Distinguished Engineer, Micro Focus
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
> 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux