Error “error A2009: syntax error in expression” wh

2019-07-19 21:29发布

I need the static libs of Openssl. I followed the instructions from here. The steps I did were as follows:

  1. Run the "Visual Studio 2008 x64 Cross Tools Command Prompt".
  2. Execute perl Configure VC-WIN64A no-shared no-idea
  3. Execute ms\do_win64a
  4. Edited ms\nt.mak and change "32" to "64" in the output dirs.
  5. 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?

3条回答
戒情不戒烟
2楼-- · 2019-07-19 21:41

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楼-- · 2019-07-19 21:48

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.

查看更多
forever°为你锁心
4楼-- · 2019-07-19 21:54

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.

查看更多
登录 后发表回答