On 30/03/2012 4:09 AM, Andy Polyakov wrote:
I am having some trouble compiling OpenSSL 1.0.1 with MinGW-w64 under
MSYS with the following commands:
./Configure mingw64 shared
make
Error output:
perl asm/sha1-x86_64.pl mingw64> sha1-x86_64.s
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -D_WINDLL
-DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -O3 -Wall
-DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -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 -DWHIRLPOOL_ASM -DGHASH_ASM -c -o sha1-x86_64.o sha1-x86_64.s
sha1-x86_64.s: Assembler messages:
sha1-x86_64.s:1824: Warning: end of file not at end of a line; newline
inserted
sha1-x86_64.s:2183: Error: number of operands mismatch for `rol'
I've tested with MinGW-w64 4.5.2, 4.6.1 and 4.7.0 prerelease.
Any ideas?
Look into generated file, at lines in question. Run 'perl
asm/sha1-x86_64.pl mingw64> sha1-x86_64.s' on another system (Windows
or not, doesn't matter) and compare outputs... I can't reproduce the
problem, so it's likely to be problem with your environment. You refer
to 4.5.2, 4.6.1, 4.7.0. These sound like gcc versions, not MinGW, while
problem is likely to be Perl or binutils...
I was able to fix the issue by adding:
$| = 1;
before
open STDOUT,">$output" || die "can't open $output: $!"
in crypto/perlasm/x86_64-xlate.pl to disable output buffering.
Apparently GCC was reading sha1-x86_64.s before Perl finished writing to it.
Regards,
Jonathan
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]