简体   繁体   中英

OpenSSL NMAKE Unresolved External Symbol

I'm trying to compile a very light version of OpenSSL with many of the features disabled.

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.

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. Output shown below.

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

Start->Visual Studio 2019->x64 Native Tools Command Prompt for VS 2019 (Run as Administrator)

OpenSSL version 3.0.0 according to VERSION file. Downloaded 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

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. 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. A fix is here:

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

One way to get things working would be to drop "no-dsa" from your Configure line. Or you could apply the fix at the above URL (or wait a couple of days for it to be merged). Probably though the best route is to just use a stable version of OpenSSL. The latest stable version is 1.1.1d which you can download as a tar from here:

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

Alternatively if you have the git repo cloned locally then you can check that version out like this:

$ git checkout OpenSSL_1_1_1d

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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