From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2020-04-03 15:43:00
# On *nix, we do not want to link either Boost.Python or Python
# to libpython, because the Python interpreter itself provides all those
# symbols. If we linked to libpython, we would get duplicate symbols. So
# declare two targets -- one for building extensions and another for
Why would that give duplicate symbols? Wouldn't ELF symbol interposition
mean that only one is used? Why would it be a problem to link to libpython?
In Fedora's Boost RPM packages we *do* link libboost_python.so to the
system libpython (and we don't get any problems). But to do this, we have
these two local patches:
and then to make it link to libpython3.7m.so (rather than libpython3.7.so)
we have this patch to pass the "m" into the Boost build:
I'd prefer not to need these local hacks. Would the upstream Boost.Python
consider making changes so that libboost_python.so can be (optionally)
linked to libpython?
Is there a cleaner way to do this than those patches?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk