Open codicodi opened 4 years ago
I agree that this is a bug. It's also a potential source of ODR violations, since users will often be using versions of Boost other than the exact one we used to build with, and Boost doesn't attempt to provide ABI stability.
@CaseyCarter, I think we may have to use bcp
to rename the Boost namespace when building.
I would recommend using bcp
to make a renamed copy of sources, and put them somewhere in the repository.
This way the version of Boost will be fixed, instead of whatever .\vcpkg.exe install boost-math:x86-windows boost-math:x64-windows
would obtain. So no worries about Boost roadmap.
Also it will simplify joining by removing a half of the build instructions.
Finally, it would help me. Because on my main project there is older boost in the repository, and somehow vcpkg-integrated boost 1.7x affects build in very interesting (probably ABI-breaking) way by linking in. Not sure if it is misconfiguration or vcpkg bug, currently working around by vcpkg integrate install
/ vcpkg integrate remove
Also it will simplify joining by removing a half of the build instructions.
We've been wavering back and forth on how to best handle this bug. Boost is pretty big: extracting boost::math
with BCP produces a directory with 135MB of sources, whereas our entire repo right now is ~441MB (without submodules). We'd rather not carry those sources if we can avoid it.
"Just include the sources" does solve the three major issues we have:
_Boost
),special_math
test wants access to available in a convenient known location.I would also strongly prefer to avoid checking Boost sources into our tree. Extracting Boost and running bcp
as part of our build step would be preferable, if possible.
Does this bug still exist?
Yes it does.
Description Boost symbols embedded in static library can conflict with user code and/or custom boost installations.
Example 1 In this example one can override behaviour of standard library function using custom boost symbol.
Playing with different compiler flags I also got following output once:
but I forgot exact combination and wasn't able to reproduce it later.
Example 2 In this example one can link to boost symbols contained in STL.
Expected behavior STL shouldn't expose any third-party symbols to user code in order to avoid conflicts.