openssl: Fail to compile on Windows x64 MSVC 2015: error in crypto\chacha\chacha-x86_64.asm
Checkout current master branch, open VS2015 x64 Native Tools Command Prompt,
perl Configure VC-WIN64A
nmake
Results in
cl -DOPENSSL_USE_APPLINK -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM "-DENGINESDIR=\"%ProgramW6432%\\OpenSSL\\lib\\engines\"" "-DOPENSSLDIR=\"%CommonProgramW6432%\\SSL\"" -W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DUNICODE -D_UNICODE /MD /Ox /O2 /Ob2 /Zi /Fdlib /I include /I . /I crypto\include -c /Focrypto\cast\c_enc.obj crypto\cast\c_enc.c
c_enc.c
cl -DOPENSSL_USE_APPLINK -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM "-DENGINESDIR=\"%ProgramW6432%\\OpenSSL\\lib\\engines\"" "-DOPENSSLDIR=\"%CommonProgramW6432%\\SSL\"" -W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DUNICODE -D_UNICODE /MD /Ox /O2 /Ob2 /Zi /Fdlib /I include /I . /I crypto\include -c /Focrypto\cast\c_ofb64.obj crypto\cast\c_ofb64.c
c_ofb64.c
cl -DOPENSSL_USE_APPLINK -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM "-DENGINESDIR=\"%ProgramW6432%\\OpenSSL\\lib\\engines\"" "-DOPENSSLDIR=\"%CommonProgramW6432%\\SSL\"" -W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DUNICODE -D_UNICODE /MD /Ox /O2 /Ob2 /Zi /Fdlib /I include /I . /I crypto\include -c /Focrypto\cast\c_skey.obj crypto\cast\c_skey.c
c_skey.c
set ASM=ml64
set CC=cl
C:\Perl64\bin\perl.exe crypto\chacha\asm\chacha-x86_64.pl auto crypto\chacha\chacha-x86_64.asm
ml64 /c /Cp /Cx /Zi /Focrypto\chacha\chacha-x86_64.obj crypto\chacha\chacha-x86_64.asm
Microsoft (R) Macro Assembler (x64) Version 14.00.23506.0
Copyright (C) Microsoft Corporation. All rights reserved.
Assembling: crypto\chacha\chacha-x86_64.asm
crypto\chacha\chacha-x86_64.asm(1540)ed size
crypto\chacha\chacha-x86_64.asm(1540) : error A2070:invalid instruction o˔crypto\chacha\chacha-x86_64.asm(1541)ed size
crypto\chacha\chacha-x86_64.asm(1541) : error A2070:invalid instruction o˔crypto\chacha\chacha-x86_64.asm(1542)ed size
crypto\chacha\chacha-x86_64.asm(1542) : error A2070:invalid instruction o˔crypto\chacha\chacha-x86_64.asm(1543)ed size
crypto\chacha\chacha-x86_64.asm(1543) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1610)ed size
crypto\chacha\chacha-x86_64.asm(1610) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1628)ed size
crypto\chacha\chacha-x86_64.asm(1628) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1645)ed size
crypto\chacha\chacha-x86_64.asm(1645) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1666)ed size
crypto\chacha\chacha-x86_64.asm(1666) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1683)ed size
crypto\chacha\chacha-x86_64.asm(1683) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1700)ed size
crypto\chacha\chacha-x86_64.asm(1700) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1717)ed size
crypto\chacha\chacha-x86_64.asm(1717) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1738)ed size
crypto\chacha\chacha-x86_64.asm(1738) : error A2070:invalid instruction ocrypto\chacha\chacha-x86_64.asm(1755)ed size
crypto\chacha\chacha-x86_64.asm(1755) : error A2070:invalid instruction oNMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\ml64.EXE"' : return code '0x1'
Stop.
Every line where compilation fails contains the vbroadcasti128 instruction:
vbroadcasti128 ymm11,YMMWORD PTR[$L$sigma]
vbroadcasti128 ymm3,YMMWORD PTR[rcx]
vbroadcasti128 ymm15,YMMWORD PTR[16+rcx]
vbroadcasti128 ymm7,YMMWORD PTR[r8]
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 31 (21 by maintainers)
There is nothing intrinsic about the OpenSSL assembler stuff that prevents good comments explaining what is going on ☺
With
nasmon the PATH it works 😃 But I followed the “new” instructions from here.nasmis not mentioned there.Anyway, I found it weird that ml64 almost worked, except for that one instruction (vbroadcasti128).
Uhmmm, our current config for VC-WIN64A enables the possibility to use ml64, so @rustyx has good reason to raise the issue and shouldn’t be so easily dismissed. Reopening, therefore.