Botan 构建错误 'AutoSeeded_RNG' 没有命名类型
Botan build error 'AutoSeeded_RNG' does not name a type
尝试构建 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' 没有命名类型
static AutoSeeded_RNG static_timing_test_rng(牡丹::Entropy_Sources::global_sources(), 0);
^~~~~~~~~~~~~~
../src/cli/timing_tests.cpp:101:17: 错误:'static_timing_test_rng' 未在此范围内声明
return static_timing_test_rng;
^~~~~~~~~~~~~~~~~~~~~~
../src/cli/timing_tests.cpp:101:17: 注意:建议的替代方案:'timing_test_rng'
return 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-includedir=$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
(使用mingw32构建,在Windows10. Botan版本2.11.0)
我对此很陌生。有什么想法吗?
编辑:更改为版本 2.10.0,因为 2.11.0 尚未正式发布,但错误现在已更改为:
undefined reference to 'Botan::CPUID::state()'
似乎添加熵源 system_rng 解决了这个问题。只需将其添加到 enable-modules 列表即可。从 Botan 库的创建者 Jack Lloyd 那里得到这个,
尝试构建 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' 没有命名类型 static AutoSeeded_RNG static_timing_test_rng(牡丹::Entropy_Sources::global_sources(), 0); ^~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17: 错误:'static_timing_test_rng' 未在此范围内声明 return static_timing_test_rng; ^~~~~~~~~~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17: 注意:建议的替代方案:'timing_test_rng' return 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-includedir=$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
(使用mingw32构建,在Windows10. Botan版本2.11.0)
我对此很陌生。有什么想法吗?
编辑:更改为版本 2.10.0,因为 2.11.0 尚未正式发布,但错误现在已更改为:
undefined reference to 'Botan::CPUID::state()'
似乎添加熵源 system_rng 解决了这个问题。只需将其添加到 enable-modules 列表即可。从 Botan 库的创建者 Jack Lloyd 那里得到这个,