问题
I need the static libs of Openssl. I followed the instructions from here. The steps I did were as follows:
- Run the "Visual Studio 2008 x64 Cross Tools Command Prompt".
- Execute perl Configure VC-WIN64A no-shared no-idea
- Execute ms\do_win64a
- Edited ms\nt.mak and change "32" to "64" in the output dirs.
- Execute nmake -f ms\nt.mak
After doing all this, I get an error on the 5th step:
Assembling: tmp32\md5-x86_64.asm
tmp32\md5-x86_64.asm(8) : error A2009: syntax error in expression
tmp32\md5-x86_64.asm(9) : error A2009: syntax error in expression
tmp32\md5-x86_64.asm(677) : error A2009: syntax error in expression
tmp32\md5-x86_64.asm(678) : error A2009: syntax error in expression
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC
\BIN\x86_amd64\ml64.EXE"' : return code '0x1'
Stop.
What is going wrong here? Or can anyone provide me a link to the static libs of Openssl that I can use in my Visual Studio 20005?
回答1:
I found the answer to this problem. Somehow, nasm
wasn't installed in my machine. The error shown here also didn't say anything about nasm either.
回答2:
I had the problem too, and found out that Perl was too old. The following line in x86_64-xlate.pl did not generate "PTR", although the variable $PTR was set:
$func .= " mov QWORD${PTR}[8+rsp],rdi\t;WIN64 prologue\n";
When I installed ActiveState Perl 5.16.3 it worked fine!
(I only had Visual Studio masm installed, I guess that with nasm the generated code would've worked, since nasm doesn't seem to need the PTR keyword).
回答3:
Seems Active sate is also old in my environment. I am not sure if I was using correct version of nasm but my ml64.exe was not compatible with nasm by command line parameters. People said I had to add asm variable into my environment. So I did a global change in crypto\perlasm\x86_64-xlate.pl file: "PTR}[" to "PTR} [". Just added a space after variable.
来源:https://stackoverflow.com/questions/10546234/error-error-a2009-syntax-error-in-expression-when-building-openssl-x64-static