简体   繁体   English

OpenSSL NMAKE 未解析的外部符号

[英]OpenSSL NMAKE Unresolved External Symbol

I'm trying to compile a very light version of OpenSSL with many of the features disabled.我正在尝试编译一个非常轻量级的 OpenSSL 版本,其中许多功能被禁用。

Using the post Build openssl with just RSA and AES I have run the build step successfully, but I have a problem when running nmake.使用仅带有 RSA 和 AES 的 Build openssl帖子我已经成功运行了构建步骤,但是在运行 nmake 时出现问题。

The first time it ran for a few minutes before failing.第一次它运行了几分钟才失败。 Now when I run nmake, it fails in the same way without all the previous text.现在,当我运行 nmake 时,它以同样的方式失败,没有所有以前的文本。 Output shown below. Output 如下所示。

D:\xxxxxxxx\openssl-master>nmake

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe" /                   depend && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe" /                   _all

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.


Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        IF EXIST test\evp_extra_test.exe.manifest DEL /F /Q test\evp_extra_test.exe.manifest
        link /nologo /debug /subsystem:console /opt:ref  /nologo /debug /out:test\evp_extra_test.exe @C:\Users\Jim\AppData\Local\Temp\nmBFB6.tmp
evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol d2i_DSAPrivateKey referenced in function load_example_dsa_key

evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol EVP_PKEY_set1_DSA referenced in function load_example_dsa_key

evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol DSA_free referenced in function load_example_dsa_key

test\evp_extra_test.exe : fatal error LNK1120: 3 unresolved externals

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.EXE"' : return code '0x460'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe"' : return code '0x2'

Stop.

I am using:我在用:

Windows 10 Windows 10

Start->Visual Studio 2019->x64 Native Tools Command Prompt for VS 2019 (Run as Administrator)开始->Visual Studio 2019->x64 Native Tools 命令提示符 for VS 2019(以管理员身份运行)

OpenSSL version 3.0.0 according to VERSION file. OpenSSL 版本 3.0.0 根据 VERSION 文件。 Downloaded 20191107已下载 20191107

The build command:构建命令:

perl Configure VC-WIN64A no-idea no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 no-md2 no-md4 no-ripemd no-mdc2 no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock no-ssl2 no-ssl3 no-err no-engine no-hw no-asm perl 配置VC-WIN64A no-idea no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 no-md2 no-md4 no-ripemd no-mdc2 no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock no-ssl2 no-ssl3 no-err no-engine no-hw no-asm

Thanks in advance,提前致谢,

Jim吉姆

You seem to be using OpenSSL 3.0 which is the as-yet-unreleased still in development version of OpenSSL that you (presumably) downloaded from the git master branch - which is where all active OpenSSL development goes on. You seem to be using OpenSSL 3.0 which is the as-yet-unreleased still in development version of OpenSSL that you (presumably) downloaded from the git master branch - which is where all active OpenSSL development goes on. As a development branch this should be considered as unstable and not really suitable for any "real" use.作为一个开发分支,这应该被认为是不稳定的,并不适合任何“真正的”使用。 It looks like the no-dsa support is currently broken.看起来 no-dsa 支持目前已被破坏。 A fix is here:修复在这里:

https://github.com/openssl/openssl/pull/10375 https://github.com/openssl/openssl/pull/10375

One way to get things working would be to drop "no-dsa" from your Configure line.使事情正常进行的一种方法是从您的配置行中删除“no-dsa”。 Or you could apply the fix at the above URL (or wait a couple of days for it to be merged).或者您可以在上述 URL 上应用修复(或等待几天将其合并)。 Probably though the best route is to just use a stable version of OpenSSL.可能最好的方法是只使用 OpenSSL 的稳定版本。 The latest stable version is 1.1.1d which you can download as a tar from here:最新的稳定版本是 1.1.1d,您可以从这里下载为 tar:

https://www.openssl.org/source/ https://www.openssl.org/source/

Alternatively if you have the git repo cloned locally then you can check that version out like this:或者,如果您在本地克隆了 git 存储库,那么您可以像这样检查该版本:

$ git checkout OpenSSL_1_1_1d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM