牡丹构建错误"AutoSeeded_RNG"未命名类型



尝试构建Botan可执行文件时,我收到以下错误:

../src/cli/timing_tests.cpp: In static member function 'static        Botan::RandomNumberGenerator& Botan_CLI::Timing_Test::timing_test_rng()':

../src/cli/timing_tests.cpp:100:17:错误:"AutoSeeded_RNG"未命名类型 静态AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0); ^~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17:错误:"static_timing_test_rng"未在此范围内声明 返回static_timing_test_rng; ^~~~~~~~~~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17:注意:建议的替代方案:"timing_test_rng" 返回static_timing_test_rng; ^~~~~~~~~~~~~~~~~~~~~~ timing_test_rng make: *** [makefile:606: build/obj/cli/timing_tests.o] 错误 1

这是C++代码:

static Botan::RandomNumberGenerator& timing_test_rng()
{
#if defined(BOTAN_HAS_SYSTEM_RNG)
return Botan::system_rng();
#elif defined(BOTAN_HAS_AUTO_SEEDING_RNG)
static AutoSeeded_RNG   static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0);
return static_timing_test_rng;
#else
// we could just use SHA-256 in OFB mode for these purposes
throw CLI_Error("Timing tests require a PRNG");
#endif
}

我正在使用以下设置: configure.py --prefix=$BUILD_DIR --with-external-includeir=$OPENSSL_PREFIX/include --with-external-libdir=$OPENSSL_PREFIX/lib --os=mingw --cpu=i386 --minimized-build --enable- modules=rsa,dsa,ecdsa,ed25519,hmac,hmac_drbg,mode_pad,bigint,filters,block,auto_rng,x509,cbc,dh --with-openssl

(在 Windows 10 中使用 mingw32 构建。牡丹版本2.11.0)

我对此很陌生。有什么想法吗?

编辑:更改为版本2.10.0,因为2.11.0尚未正式发布,但是错误现在已更改为:

undefined reference to 'Botan::CPUID::state()'

似乎添加熵源system_rng解决了这个问题。只需将其添加到启用模块列表中即可。从Botan lib的创建者Jack Lloyd那里得到这个,

最新更新