Boost logo

Boost :

From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2020-04-03 15:43:00

tools/build/src/tools/python.jam says:

    # 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
    # embedding.

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 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 (rather than
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 can be (optionally)
linked to libpython?

Is there a cleaner way to do this than those patches?

Boost list run by bdawes at, gregod at, cpdaniel at, john at