looking into https://github.com/boostorg/python/issues/129, I think I understand the underlying issue, which, I think, is a Boost.Build issue. After adding
using python : 2.7 ;
to my user-config.jam file, and running `./b2 --with-python -d2`, I observe the following output:
Notice how the "link.cpp" source file (tracing an arbitrary source file from Boost.Python) gets compiled once (against Python 2.7 headers), then linked twice, once for libboost_python (i.e. Python 2.7), and once for libboost_python3 (i.e. Python 3.5).
This is clearly wrong. If Boost.Python is compiled for multiple
Python versions in the same process, the build tree needs to
differentiate between the intermediate object files the same way
it differentiates between objects compiled with different
toolchains. Instead, Boost.Build gets confused and links two
Boost.Python libraries from the same object files.
I'm normally not building for multiple Python versions in the
same process (and neither for multiple toolchains), but as the
script that generates Windows binaries uses that process, the
generated binaries are wrong.
What needs to happen to fix this ? My personal advice would be to build for one Python version at a time (even if the resulting binaries get bundled into the same package). To support what some believe to be an important use-case, the internal Boost.Build logic needs to be augmented to add a <python-version> component to the build path, to make sure objects get rebuild properly for each additional Python version.
-- ...ich hab' noch einen Koffer in Berlin...
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
|Free forum by Nabble||Edit this page|