Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-04-28 09:16:40


John Maddock wrote:
> On 27/04/2024 22:08, Glen Fernandes via Boost wrote:
> > On Sat, Apr 27, 2024 at 4:56 PM René Ferdinand Rivera Morell wrote:
> >
> >> Can we get rid of auto-linking?
> >>
> >>
> > I've always felt that auto-linking should have been disabled by default.
> >
> > But then I remember users complaining when it is:
> > https://github.com/boostorg/boost_install/issues/54
>
> The problem is one of "which of the many library variants do I link to?". My
> experience was always that users are terrible at picking the right one, and if
> they do do that, then the result is some very hard to track down errors arising
> from two different std libraries (memory
> managers) being in play. And that means more bug reports for us :(
>
> But.... if you're using Boost.Build, or even CMake to build everything at once
> then it's obviously not an issue.

It's a Rene-specific issue because he builds with b2 without the superproject,
which means that the superproject is no longer defining BOOST_ALL_NO_LIB
for him, but he hasn't fixed the Jamfiles of the libraries to define the library-
specific BOOST_<LIBNAME>_NO_LIB macros (as I have in CMake.)

And yes, I agree that not having autolinking will generate many more
complaints that having it does today.

(Also, usually when autolinking is on when it shouldn't be, nothing bad
happens because the library is just linked to twice, which is harmless. When
a problem appears, it's usually a symptom of something else, because that
means that the headers think they should be linking to some library and the
build system thinks it should be linking to some other library, which is a
sign of a configuration mismatch which is almost always bad news.)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk