Boost logo

Boost :

Subject: Re: [boost] [log] [asio] Conflicting default configs
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-03-30 20:41:56


On 31 Mar 2015 at 1:54, Andrey Semashev wrote:

> 1. Introduce an inline ABI namespace in Boost.ASIO, much like the one I have
> in Boost.Log. The namespace name would depend on
> BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION and other macros that affect
> binary compatibility. This would be my preferred solution, although I'm not
> sure how fast and easy it can be implemented.

Why don't you just use standalone ASIO internally? It has a different
ABI, and I believe is expected to not interact with Boost.ASIO.

The internal copy can be generated using Chris's special "include all
of ASIO" magic file. Just fire it through a bit of python which
implements only the #include directive or use a STL excluding
preprocessor to generate a single file including all of standalone
ASIO.

> 2. Remove symbol visibility enforcement from Boost.ASIO, or at least make it
> optional. That way I could encapsulate my private copy of Boost.ASIO in
> Boost.Log binaries.

You'd still run into ABI mismatch if the end user uses a different
Boost ASIO version to you which is not uncommon (users like to pin
the version of Boost and Boost.ASIO separately). The only valid
visibility of an internal ASIO is hidden, but then you have to be
real careful you never allow Log to be used as anything but a shared
object else you'll cause all ASIOs to be hidden too as hidden
visibility is sticky.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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