【问题标题】:OpenSSL: Nmake fatal error U1077: 'ias' : return code '0x1'OpenSSL:Nmake 致命错误 U1077:“ias”:返回代码“0x1”
【发布时间】:2016-11-29 02:27:23
【问题描述】:

我正在尝试在 Windows 10 64 位上设置 OpenSSL,到目前为止已按照说明进行操作,在安装 Visual Studio 后,我尝试使用 Visual c++ 2008 命令提示符在 openssl 目录中进行 nmake 以获取以下错误:

 "C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "crypto\include\internal\bn_conf.h.in" > crypto\include\internal\bn_conf.h
        "C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "crypto\include\internal\dso_conf.h.in" > crypto\include\internal\dso_conf.h
        "C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "include\openssl\opensslconf.h.in" > include\openssl\opensslconf.h
        ias -d debug -ocrypto\aes\aes-ia64.obj "crypto\aes\aes-ia64.asm"
'ias' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'ias' : return code '0x1'
Stop.

如果我尝试编译 32 位版本,此错误会有所不同。这导致引用 NASM 时出错,我尝试安装但没有成功。

有人可以提出解决方案吗?

感谢您花时间阅读我的问题。

【问题讨论】:

    标签: c++ windows perl visual-c++ openssl


    【解决方案1】:

    问题与长文件名无关。 @Sebastian 没有安装 ias。在任何情况下,他都不应该使用ias

    如果您希望 OpenSSL 利用汇编语言优化,您需要 nasm

    如果没有,您可以将no-asm 传递给Configure

    取决于您的操作系统

    在 Windows 上(只选择一个目标进行配置):

    $ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
    

    您需要VC-WIN32VC-WIN64A。这是how I did it1.0.1g 是发布该帖子时的当前版本。

    1. 下载最新的源代码分发
    2. 启动适用的 VC 命令提示符
    3. (可选)获取 zlib,构建 DLL
    4. 获取 nasm 并构建可执行文件
    5. 如果您确实要求使用 zlib,请将目录添加到 INCLUDE 和 LIB:

      C:\…\openssl-1.0.1g> set INCLUDE=%INCLUDE%;C:\…\zlib-1.2.8
      C:\…\openssl-1.0.1g> set LIB=%LIB%;C:\…\zlib-1.2.8
      
    6. 运行C:\…\openssl-1.0.1g> perl Configure VC-WIN64A zlib-dynamic --openssldir=C:\opt\OpenSSL

    7. 运行C:\…\openssl-1.0.1g> ms\do_win64a

    8. 运行C:\…\openssl-1.0.1g> nmake -f ms\ntdll.mak

    9. cd 到 out32dll,然后运行 ​​..\ms\test

    10. 确保所有测试都通过:

    11. 通过以下方式安装:

      C:\…\openssl-1.0.1g\out32dll> cd ..
      C:\…\openssl-1.0.1g> nmake -f ms\ntdll.mak install
      

    PS:如果您正在构建 OpenSSL 以与 Strawberry Perl 一起使用,请注意 perl.exe 将使用 gcc 进行编译,因此您应该使用 Strawberry Perl 附带的 gcc 来构建 OpenSSL。

    如果您正在构建库以用于您将使用 MSVC 工具链构建的项目,您可以忽略此注释。

    【讨论】:

    • 哦,我在快速浏览问题的过程中完全错过了这一点……Doh……
    【解决方案2】:

    我的解决方案:
    -openssl-OpenSSL_1_0_0q; perl 5.8
    - 提取源代码
    - 下载 Nasm.exe - http://www.nasm.us/.
    注意 - 尝试从源代码构建给了我错误。我下载了nasm-2.13.01-win64; nasm.exe 并将其移至 openssl install\working 文件夹。
    - 启动 VS2012 X86 命令提示符 - 并运行以下命令:

    `c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"` 
    `perl Configure VC-WIN32 --prefix=C:\Build-OpenSSL-VC-32`
    `ms\do_nasm.bat`
    `nmake -f ms\nt.mak`
    `nmake -f ms\nt.mak install`
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-15
      • 2020-04-04
      • 2016-01-12
      • 2015-03-15
      • 1970-01-01
      相关资源
      最近更新 更多