【发布时间】:2020-04-02 12:29:04
【问题描述】:
我正在尝试使用以下方法为 Windows 构建 OpenSSL 1.1.1f:
- 最新的 Visual Studio 2019 (v16.4.6)
- Strawberry Perl(perl 5,版本 28,subversion 1 (v5.28.1) 为 MSWin32-x86-multi-thread-64int 构建)
- Windows 10 64 位
我遵循 https://stackoverflow.com/a/50365514/220425 的指示,基本上:
- 从官网下载OpenSSL 1.1.1f
perl Configure VC-WIN32 no-asm --prefix=C:\some_dir\ --libdir=lib --openssldir=conf- 在
openssl-1.1.1e\makefile中我将/MD更改为/MT - 在控制台
x86 Native Tools Command Prompt for VS 2019:- nmake
- nmake 测试
构建成功,但是许多测试失败。这是日志中的一个片段:
test\recipes\01-test_abort.t .................... ok
test\recipes\01-test_sanity.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\01-test_symbol_presence.t .......... ok
test\recipes\01-test_test.t ..................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\02-test_errstr.t ................... skipped: This is unsupported on MSYS/MinGW or MSWin32
test\recipes\02-test_internal_ctype.t ........... ok
test\recipes\02-test_lhash.t .................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\02-test_ordinals.t ................. ok
test\recipes\02-test_stack.t .................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\03-test_exdata.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\03-test_internal_asn1.t ............ ok
test\recipes\03-test_internal_chacha.t .......... ok
test\recipes\03-test_internal_curve448.t ........ ok
test\recipes\03-test_internal_ec.t .............. ok
test\recipes\03-test_internal_mdc2.t ............ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
如果我使用 nmake test V=1 在详细模式下运行测试,则会显示更多详细信息:
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
test\recipes\04-test_bio_callback.t .............
1..1
OPENSSL_Uplink(798E0330,08): no OPENSSL_Applink
..\bio_callback_test.exe => 1
not ok 1 - running bio_callback_test
为什么测试会失败,以及如何解决这个问题?我需要使用 /MT 构建 OpenSSL
注意事项:
- 如果我不将
/MD更改为/MT,那么一切都会按预期进行,并且所有测试都会通过 - 构建以前版本的 OpenSSL 可以工作,例如 1.0.1,但从 1.1.x 开始它们会失败
【问题讨论】:
标签: openssl