-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux: Allow the build system to generate multiple py3k boost.python libraries #82
Comments
Anybody here? I go to https://svn.boost.org/trac/boost/newticket and it tells me "USE GITHUB" when I choose the component Boost.Python, so I guess this is the correct place for reporting issues? |
It is indeed. |
I have posted a pull request to #83, while I'm not sure whether I need to patch Jamfile.v2 as well. Is Boost.Python moving from Boost.Build to SCons once building on Visual Studio is working? |
Hello,
|
Thanks for clarafication. Give me some time to study Boost.Build syntaxes...
This might not be something bad. Distributions can create packages like boost, boost-python35, boost-python27, etc. It reduces the burden to maintain multiple Boost.Python versions in a single package. Users/Application developers can also switch among Boost.Python versions easily. Currently on Gentoo, targetting new Python version of Boost.Python requires rebuilding the whole Boost.
For me changing the naming scheme step by step is good - it's difficult to have a perfect solution at the first time. I guess it's OK to change the library name between Boost releases (for example 1.61 and 1.62). Applications using Boost.Python need to rebuild in each Boost release, isn't it? After all, adding the Python ABI signature is the first step to universal Boost.Python naming scheme. |
Any update on this, or some quick hack via some variable to be passed to CMake system, so it won't fail like this?
I am on Gentoo system and boost generates following python libs:
|
As mentioned in #185, I have (tentatively) addressed this issue by adding a Python version suffix to the library. For Python 2.7 the library name would be |
Since 8910035 (SVN r56305, GSoC 2009), the Python 3 variant of Boost.Python is built as
libboost_python3.so
(on Linux), and since 37b45d2 (SVN r59987, trac 3544), users can use--python-buildid
to add additional strings in the library name. (Though it's broken since 1.48, see trac 6286)Based on these options, Linux distributions use this option to build multiple Boost.Python libraries against different Python versions. For example Debian's
rules
(Debian source tarball):So on Debian those files are
libboost_python-py35.so
andlibboost_python-py27.so
(amd64 filelist). On the other way, Gentoo have a different scheme:PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}"
So on Gentoo files are
libboost_python-3.5.so
andlibboost_python-2.7.so
. Some other distributions, like Fedora (build spec, file list and Arch Linux (build script, file list), does not use--python-buildid
, so they havelibboost_python3.so
andlibboost_python.so
.With such a case, determine a portable way to link to the correct Boost.Python library is very difficult, especially for projects using CMake. (proposed solution at CMake)
Here I suggest Boost.Python to have a unified suffix scheme for libraries targetting different Python version, so that downstream users can follow it. An idea is use the same name libpythonXX.so. For example,
libboost_python-3.5m.so
targetslibpython3.5m.so
, andlibboost_python-2.7.so
targetslibpython2.7.so
. The suffix can be detected with the following Python script:The text was updated successfully, but these errors were encountered: