[build] Unexpected static libraries in 1.63
I've recently rebuilt Boost 1.63 locally for both Windows and Linux, requesting dynamic libraries only (link=dynamic). However several libraries are still being built in both static and dynamic forms: - chrono - system - timer - unit_test_framework 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?
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
On 2/03/2017 12:28, I wrote:
I've recently rebuilt Boost 1.63 locally for both Windows and Linux, requesting dynamic libraries only (link=dynamic). However several libraries are still being built in both static and dynamic forms:
- chrono - system - timer - unit_test_framework
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?
Any chance the former group of libraries can be fixed before 1.64?
In the develop branch I've deleted the non-intrusive exception_ptr support form Boost Exception and the build step it required. This feature was experimental, always disabled by default, only worked on some MSVC versions and probably wasn't used by anyone. That said, if anyone reading this has #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR in his build system please speak up. :) Emil On Sun, Mar 12, 2017 at 10:33 PM, Gavin Lambert via Boost-users < boost-users@lists.boost.org> wrote:
On 2/03/2017 12:28, I wrote:
I've recently rebuilt Boost 1.63 locally for both Windows and Linux, requesting dynamic libraries only (link=dynamic). However several libraries are still being built in both static and dynamic forms:
- chrono - system - timer - unit_test_framework
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?
Any chance the former group of libraries can be fixed before 1.64?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 14/03/2017 16:01, Emil Dotchevski via Boost-users wrote:
In the develop branch I've deleted the non-intrusive exception_ptr support form Boost Exception and the build step it required. This feature was experimental, always disabled by default, only worked on some MSVC versions and probably wasn't used by anyone.
Well, that wasn't one of the libraries I was really referring to (I don't mind static-only libraries, I just don't like it generating both static and dynamic for the same library when only one or the other was requested).
That said, if anyone reading this has #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR in his build system please speak up. :)
While I wasn't aware of this particular feature (and wasn't using it myself) and I haven't looked at the implementation, the description above sounds somewhat similar to some code I've been using for many years and across many VS versions to extract stack traces from undecorated exceptions (which is particularly handy when running anything outside a debugger). It was based on code that can be found here: http://web.archive.org/web/20100528113731/http://www.gamedev.net/reference/p... This has worked fine AFAIK on any VS version I've thrown it at (albeit x86 only, though I haven't investigated whether it was the stack-trace part or the exception-handling part that isn't compatible with x64). Perhaps it might be worthwhile retaining with some changes based on that code? FWIW, it should be possible to implement this header-only if that was the issue -- that's what I was doing. This is a bit off-topic, though. :)
On 13/03/2017 18:33, I wrote:
On 2/03/2017 12:28, I wrote:
I've recently rebuilt Boost 1.63 locally for both Windows and Linux, requesting dynamic libraries only (link=dynamic). However several libraries are still being built in both static and dynamic forms:
- chrono - system - timer - unit_test_framework
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?
Any chance the former group of libraries can be fixed before 1.64?
Trying again with individual library subject tags. Or should I just give up on this and file github issues instead?
Le 17/03/2017 à 05:11, Gavin Lambert via Boost-users a écrit :
On 13/03/2017 18:33, I wrote:
On 2/03/2017 12:28, I wrote:
I've recently rebuilt Boost 1.63 locally for both Windows and Linux, requesting dynamic libraries only (link=dynamic). However several libraries are still being built in both static and dynamic forms:
- chrono - system - timer - unit_test_framework
Additionally some libraries are being built only in static forms:
- exception - test_exec_monitor
This is a legacy of boost.test, needed by some old libraries. I am not enough expert in bjam to make it generated on demand.
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?
Any chance the former group of libraries can be fixed before 1.64?
Trying again with individual library subject tags. Or should I just give up on this and file github issues instead?
participants (4)
-
Adam Majer
-
Emil Dotchevski
-
Gavin Lambert
-
Raffi Enficiaud