Boost logo

Boost Users :

Subject: [Boost-users] boost_1_19_0 fails to build random using clang-cl
From: JR Cary (cary_at_[hidden])
Date: 2018-12-21 14:18:50


This is now more of an FYI, as I can disable random and get the build I
need.

boost 1_69_0
clang version 8.0.0 (trunk 349323)
Windows 10

Build command:
./b2 toolset=clang-win runtime-link=shared link=shared
define=BOOST_TEST_DYN_LINK cxxflags='-DBOOST_THREAD_DONT_USE_CHRONO'
linkflags='-DBOOST_THREAD_DONT_USE_CHRONO' address-model=64
threading=multi variant=release -s NO_COMPRESSION=1 --layout=system
--abbreviate-paths -j2 --without-python --without-mpi --without-log
--without-math  stage

The first error is

 Â Â  Creating library
bin.v2\libs\random\build\clng-win-8.0.0\rls\adrs-mdl-64\thrd-mlt\boost_random.lib
and object
bin.v2\libs\random\build\clng-win-8.0.0\rls\adrs-mdl-64\thrd-mlt\boost_random.exp^M
random_device.obj : error LNK2019: unresolved external symbol
__imp_CryptEnumProvidersA referenced in function "public: __cdecl
boost::random::random_device::impl::impl(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??0impl_at_random_device_at_random@boost@@QEAA_at_AEBV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@@Z)^M
random_device.obj : error LNK2019: unresolved external symbol
__imp_CryptAcquireContextA referenced in function "public: __cdecl
boost::random::random_device::impl::impl(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??0impl_at_random_device_at_random@boost@@QEAA_at_AEBV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@@Z)^M
random_device.obj : error LNK2019: unresolved external symbol
__imp_CryptReleaseContext referenced in function "public: __cdecl
boost::random::random_device::impl::~impl(void)"
(??1impl_at_random_device_at_random@boost@@QEAA_at_XZ)^M
random_device.obj : error LNK2019: unresolved external symbol
__imp_CryptGenRandom referenced in function "public: unsigned int
__cdecl boost::random::random_device::operator()(void)"
(??Rrandom_device_at_random@boost@@QEAAIXZ)^M
bin.v2\libs\random\build\clng-win-8.0.0\rls\adrs-mdl-64\thrd-mlt\boost_random.dll
: fatal error LNK1120: 4 unresolved externals^M
clang-cl: error: linker command failed with exit code 1120 (use -v to
see invocation)^M

The build succeeds upon adding --without-random to the build invocation.

I tried attaching the full log, but then the message was rejected for
being too large.

..................John Cary


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net