Issue building after configuring for VC-WIN64A (version 3.0.8)

Neil Horman nhorman at openssl.org
Wed Jun 26 19:28:46 UTC 2024


You will almost certainly need to preform an nmake distclean (or just run
git clean on your tree) prior to reconfiguring.  nmake is really bad about
getting lost in dependency resolution.  Its quite likely that there is a
remaining object file somewhere that didn't get rebuilt for x64 when you
ran your second configure.

Start with a clean tree, run vcvarsall.bat x64 to set up your tool chain,
then Configure for VC-WIN64A and nmake, it should work fine.

On Wed, Jun 26, 2024 at 3:20 PM BENTLEY Thom via openssl-users <
openssl-users at openssl.org> wrote:

> Hi All,
>
>
>
> I followed the instructions for building OpenSSL 3.0.8 at
> https://github.com/openssl/openssl/blob/openssl-3.0.8/NOTES-WINDOWS.md#native-builds-using-visual-c
>
> The nmake step failed with the following error:
>        cmd /C ""cl" /Zs /showIncludes  /Zi /Fdossl_static.pdb /Gs0 /GF /Gy
> /MD /W3 /wd4090 /nologo /O2 -I"crypto" -I"include"
> -I"providers\implementations\include" -I"providers\common\include"
> -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"C:\\Program Files\\Common
> Files\\SSL\"" -D"ENGINESDIR=\"C:\\Program Files\\OpenSSL\\lib\\engines-3\""
> -D"MODULESDIR=\"C:\\Program Files\\OpenSSL\\lib\\ossl-modules\""
> -D"OPENSSL_BUILDING_OPENSSL" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN"
> -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE"
> -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG"   -DOPENSSL_BN_ASM_GF2m
> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ
> -DOPENSSL_IA32_SSE2 "ssl\record\tls_pad.c" >
> ssl\record\libcommon-lib-tls_pad.d 2>&1"
>
>         "lib" /nologo /out:providers\libcommon.lib
> @C:\Users\tbentley\AppData\Local\Temp\1\nmFF6D.tmp
>
>         IF EXIST .manifest DEL /F /Q .manifest
>
>         IF EXIST libcrypto-3-x64.dll DEL /F /Q libcrypto-3-x64.dll
>
>         cmd /C ""link" /nologo /debug /dll  /nologo /debug
> @C:\Users\tbentley\AppData\Local\Temp\1\nm96.tmp /implib:libcrypto.lib ||
> (DEL /Q libcrypto-3-x64.* libcrypto.lib & EXIT 1)"
>
> crypto\aes\libcrypto-shlib-aes_cfb.obj : fatal error LNK1112: module
> machine type 'x86' conflicts with target machine type 'x64'
>
> Could Not Find C:\OpenSSL\openssl-3.0.8\openssl-3.0.8\libcrypto-3-x64.*
>
> NMAKE : fatal error U1077: 'cmd /C ""link" /nologo /debug /dll  /nologo
> /debug @C:\Users\tbentley\AppData\Local\Temp\1\nm96.tmp
> /implib:libcrypto.lib || (DEL /Q libcrypto-3-x64.* libcrypto.lib & EXIT
> 1)"' : return code '0x1'
>
> Stop.
>
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
> Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX86\x86\nmake.exe"
> /                   _build_sw' : return code '0x2'
>
> Stop.
>
>
>
> I then realized that the wrong version of cl.exe was in the path so I ran:
> "C:\Program Files\Microsoft Visual
> Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
>
>
>
> I re-ran
>
> perl Configure VC-WIN64A
>
>
>
> and re-ran nmake.
>
> I still have a mismatch error during linking
>
>         cmd /C ""cl" /Zs /showIncludes  /Zi /Fdossl_static.pdb /Gs0 /GF
> /Gy /MD /W3 /wd4090 /nologo /O2 -I"." -I"include" -I"apps\include"
> -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"C:\\Program Files\\Common
> Files\\SSL\"" -D"ENGINESDIR=\"C:\\Program Files\\OpenSSL\\lib\\engines-3\""
> -D"MODULESDIR=\"C:\\Program Files\\OpenSSL\\lib\\ossl-modules\""
> -D"OPENSSL_BUILDING_OPENSSL" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN"
> -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE"
> -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG"   "apps\lib\tlssrp_depr.c" >
> apps\lib\libapps-lib-tlssrp_depr.d 2>&1"
>
>         "lib" /nologo /out:apps\libapps.lib
> @C:\Users\tbentley\AppData\Local\Temp\1\nm9792.tmp
>
> apps\lib\libapps-lib-fmt.obj : fatal error LNK1112: module machine type
> 'x86' conflicts with target machine type 'x64'
>
> NMAKE : fatal error U1077: '"lib" /nologo /out:apps\libapps.lib
> @C:\Users\tbentley\AppData\Local\Temp\1\nm9792.tmp' : return code '0x458'
>
> Stop.
>
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
> Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe"
> /                   _build_sw' : return code '0x2'
>
> Stop.
>
>
>
> If I run cl.exe I see:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33133 for x64
>
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
> Thanks.
>
>
>
>
>
>
>
>
>
> *Thom Bentley *| Senior Software Engineer | Medidata, a Dassault Systèmes
> company <http://www.mdsol.com/>
>
>
>
> This email and any attachments are intended solely for the use of the
> individual or entity to whom it is addressed and may be confidential and/or
> privileged.
>
> If you are not one of the named recipients or have received this email in
> error,
>
> (i) you should not read, disclose, or copy it,
>
> (ii) please notify sender of your receipt by reply email and delete this
> email and all attachments,
>
> (iii) Dassault Systèmes does not accept or assume any liability or
> responsibility for any use of or reliance on this email.
>
> Please be informed that your personal data are processed according to our
> data privacy policy as described on our website. Should you have any
> questions related to personal data protection, please contact 3DS Data
> Protection Officer https://www.3ds.com/privacy-policy/contact/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20240626/7109bda7/attachment.htm>


More information about the openssl-users mailing list