Bug 1896713 - boost-python3 does not require Python 3.Y
Summary: boost-python3 does not require Python 3.Y
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wakely
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-11 11:00 UTC by Miro Hrončok
Modified: 2021-09-02 12:28 UTC (History)
4 users (show)

Fixed In Version: boost-1.76.0-5.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-01 14:52:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-11-11 11:00:05 UTC
boost-python3 ships /usr/lib64/libboost_python39.so.1.73.0 but it does not rquire Python 3.9:

$ repoquery --repo=koji --requires boost-python3
libc.so.6(GLIBC_2.14)(64bit)
libdl.so.2()(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libpthread.so.0()(64bit)
librt.so.1()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libutil.so.1()(64bit)
rtld(GNU_HASH)


As such, packages that BR boost-python3 will happily install the Python 3.9 boost package in Python 3.10 environment. I think that boost-python3 should require Python 3.9, WDYT?

Comment 1 Denis Arnaud 2020-11-11 16:36:23 UTC
Note that, as boost-python does not run the Python interpreter, it should not require it. The idea is that the caller of the Boost:Python library will bring their own Python library, usually part of the Python interpreter. That way, the Boost:Python library can be used from many different Python programs, including the interpreters.

But maybe I missed your point?

Some references, as when the issue was raised a few months ago (in May 2020):
* Many packages unnecessarily link to libpython: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/IAIUO5XU54FQM64TDXWF4YMHHWGQFNXT/
* libarcus Pull Request - Stop linking the Python module to libpython (on Python 3.8+): https://src.fedoraproject.org/rpms/libarcus/pull-request/8
* Changes/PythonStaticSpeedup: https://fedoraproject.org/wiki/Changes/PythonStaticSpeedup
* Changes/PythonNoSemanticInterpositionSpeedup: https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
* https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-c-api
* https://bugs.python.org/issue21536

Comment 2 Jonathan Wakely 2020-11-11 19:39:23 UTC
It could require it without linking to it though.

Comment 3 Miro Hrončok 2020-11-12 09:58:47 UTC
The issue is that if you have boost-python3 (for 3.9) and python3-devel (3.10) installed, you cannot really do anything.

Comment 4 Denis Arnaud 2020-11-12 17:40:01 UTC
(In reply to Miro Hrončok from comment #3)
> The issue is that if you have boost-python3 (for 3.9) and python3-devel
> (3.10) installed, you cannot really do anything.

You are right (obviously), thanks!

@Jonathan, will you add that require in the RPM specification file?

Comment 5 Ben Cotton 2021-02-09 16:55:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 6 Miro Hrončok 2021-06-04 20:15:14 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 7 Miro Hrončok 2021-06-07 22:59:42 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 8 Jonathan Wakely 2021-09-01 11:54:35 UTC
How should the requirement be expressed?


'Requires: python3 = %{python3_version}' doesn't work, because version "3.9" doesn't match the %version of the package in the repo.


Should it be Requires: 'python(abi) = ${python3_version}' ?

Comment 9 Jonathan Wakely 2021-09-01 11:55:33 UTC
(In reply to Jonathan Wakely from comment #8)
> Should it be Requires: 'python(abi) = ${python3_version}' ?

Oops, that single quote was supposed to be before the Requires, i.e.

Requires: python(abi) = ${python3_version}

without any quotes.

Comment 10 Jonathan Wakely 2021-09-01 13:52:24 UTC
That seems to work for a rawhide scratch build:

$ rpm -qp --requires results_boost/1.76.0/5.fc36/boost-python3-1.76.0-5.fc36.x86_64.rpm 
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
libstdc++.so.6(GLIBCXX_3.4.29)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
python(abi) = 3.10
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
rtld(GNU_HASH)

Comment 11 Miro Hrončok 2021-09-01 14:24:21 UTC
> How should the requirement be expressed?

That is a good question. python(abi) kinda works but feels hacky, it also cannot be arched. But it is currently the best we have unless you want a more complex macro magic that generates the requirement on:

Requires: (python3-libs%{_isa?} >= 3.10 with python3-libs%{_isa?} < 3.11)

If you do want that, I can write it.

Comment 12 Jonathan Wakely 2021-09-01 14:48:52 UTC
It doesn't seem worth it for one package. I'll push the change to add the python(abi) requirement.

Comment 13 Jonathan Wakely 2021-09-02 10:25:34 UTC
Although it serves no purpose in F35 (because the Python version isn't going to change now) I think I'm going to push this to the f35 branch as well. Keeping the f35 and rawhide branches in sync allows fast-forward merges for fixes such as https://src.fedoraproject.org/rpms/boost/c/bba3a6c2a04e68f2c50ec48ec20bd05c0d380493?branch=rawhide

Please let me know if you object to requiring python(abi)=3.9 for the f35 build.

Comment 14 Miro Hrončok 2021-09-02 12:28:39 UTC
No objections, except that it is 3.10. But the macro will take care of the correct value.


Note You need to log in before you can comment on or make changes to this bug.