Subject: Re: [boost] Mixing different versions of Boost libs in a single process
From: Grund, Holger (Holger.Grund_at_[hidden])
Date: 2011-05-24 13:54:12
Well, BoostCon is over. So let me try again focusing on some specific bits:
> So the next best thing would be the ability to mix different versions
> of Boost in a single process. Today, linkage names will be identical
> across versions, which is problematic for static libraries on Windows,
> and static libs and DSOs on Linux.
> Also there's BCP, which supports renaming namespaces. That's great, but
> I guess it could be even better -- e.g. on toolchains where we have
> inline namespaces or __attribute__((strong)). On Linux targets, symbol
> versioning via GNU LD version scripts might make things a bit better --
> specifically, in that things gone wrong fail earlier and with better
So when I run BCP on the entire boost tree I still get linkage names that would seem to clash across versions. Specifically, there's the graphml_reader namespace in libs/graph/src/graphml.cpp.
Boost.Python and Boost.MPI have symbols that could cause problems, though these would seems to come from external OpenMPI and Python headers. I haven't really looked but it seems these should be fine so long as we build against the same OpenMPI and Python versions with the same configuration.
What's the policy here? Do we want BCP to address these things? Or do we want libraries to not use namespaces outside of ::boost (or use linkage/symbol visibility to hide symbols from other DSOs)?
Are there any tools to detect this kind of problem? I have a few things check two binaries for potential conflicts by walking debug info and symbol tables -- it's far from perfect and I can't just upload this to Boost, but I'd be happy to help out, if there's interest to get something into the regression tests.
NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk