Boost logo

Boost Users :

Subject: Re: [Boost-users] [build] Unexpected static libraries in 1.63
From: Adam Majer (amajer_at_[hidden])
Date: 2017-03-03 15:52:03


On 03/02/2017 12:28 AM, Gavin Lambert via Boost-users wrote:
> Additionally some libraries are being built only in static forms:
>
> - exception
> - test_exec_monitor
>
> I assume the latter is intentional, as presumably some libraries can
> only work as static libraries. Is the former intentional or a bug? It
> seems like a bug. Or do these contain symbols that the dynamic
> libraries do not?

I've actually modified build to create dynamic library for openSUSE for
test_exec_exception. There is very little reason for this library not to
be dynamic, but since it is only used in unit tests, I'm assuming Boost
maintainers find it very niche. But if you want you can just apply the
patch below to get this library dynamically linked. No idea if
dynamic/static makes any difference on Windows though, but it shouldn't.
Only if exceptions are involved, AFAIK, and compilers/runtimes differ.

For exception library, that library only contains one symbol.
 boost::exception_detail::clone_current_exception_non_intrusive(boost::exception_detail::clone_base const*&)

and it is only used in case of,

   BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR

which I believe only applies for MSVC. So that library is not shipped
for us at all. But if you want that dynamic, then you can patch
appropriate Jamfile similarly, but then exceptions are going across DLL
boundaries? careful.

Cheers,
- Adam

--- boost_1_63_0.orig/libs/test/build/Jamfile.v2
+++ boost_1_63_0/libs/test/build/Jamfile.v2
@@ -93,7 +93,7 @@ lib boost_test_exec_monitor
   : # sources
     $(TEST_EXEC_MON_SOURCES).cpp
   : # requirements
- <link>static
+ # <link>static
   : # default build
   : # usage-requirements
     <link>shared:<define>BOOST_TEST_DYN_LINK=1


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