我正在尝试使用以下工具为Windows构建OpenSSL 1.1.1f:
我基本上是按照 https://stackoverflow.com/a/50365514/220425中的说明进行操作的:
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
中:
构建成功,但是许多测试失败。这是日志的一部分:
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
注释:
/MD
更改为/MT
,那么一切都会按预期进行,并且所有测试都通过了答案 0 :(得分:0)
获取/ MT的标准方法是配置“不共享”,即不 产生DLL。
https://www.mail-archive.com/openssl-users@openssl.org/msg88356.html