Bug 1496757 - Missing redhat-rpm-config Requires:
Summary: Missing redhat-rpm-config Requires:
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-28 10:06 UTC by Christophe Fergeau
Modified: 2017-11-11 02:50 UTC (History)
10 users (show)

Fixed In Version: python3-3.6.2-8.fc26 python3-3.6.3-2.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-11 02:50:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christophe Fergeau 2017-09-28 10:06:16 UTC
I was looking at bug #1411545, and it turns out the problem is caused by gobject-introspection using distutils:
https://git.gnome.org/browse/gobject-introspection/tree/giscanner/ccompiler.py#n74

A self-contained test case would be

import distutils
from distutils.unixccompiler import UnixCCompiler

compiler = distutils.ccompiler.new_compiler(compiler="unix")
distutils.sysconfig.customize_compiler(compiler)
print(compiler.compiler)

What happens is that when asking distutils for the compiler/flags to use, we get back the flags which were used when the python interpreter was built.
On my fedora 26, the test above returns

['gcc', '-pthread', '-fno-strict-aliasing', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '-fstack-protector-strong', '--param=ssp-buffer-size=4', '-grecord-gcc-switches', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-m64', '-mtune=generic', '-D_GNU_SOURCE', '-fPIC', '-fwrapv', '-DNDEBUG', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '-fstack-protector-strong', '--param=ssp-buffer-size=4', '-grecord-gcc-switches', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-m64', '-mtune=generic', '-D_GNU_SOURCE', '-fPIC', '-fwrapv']

This data comes from /usr/lib64/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py which was generated at compile-time

What this all means is that when using distutils to build some C code, redhat-rpm-config has to be installed, but this is not reflected in the rpm Requires:. Without this, the user will get build failures.

I see 2 ways of avoiding this:
- add a Requires: redhat-rpm-config to system-python-libs
- sanitize the content of /usr/lib64/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py so that the flags returned do not require redhat-rpm-config.

Comment 1 Christophe de Dinechin 2017-09-28 10:25:47 UTC
I initially spotted that problem trying to do a clean developer build of spice-gtk on a freshly installed Fedora 26. Doing a `dnf builddep spice-gtk`, my build failed with a rather unfriendly "Error 1" with a complaint about redhat-hardened-cc1, which Christophe Fergeau traced to the problem above.

Comment 2 Miro Hrončok 2017-09-29 10:03:52 UTC
The general idea was that to build Python extension modules, the user needs python3-devel package. So I believe the requires should be there. (And honestly, I thought it was there.)

Comment 3 Miro Hrončok 2017-09-29 10:16:26 UTC
Oh, see https://bugzilla.redhat.com/show_bug.cgi?id=1217376

Comment 4 Miro Hrončok 2017-09-29 10:32:27 UTC
Pull request: https://src.fedoraproject.org/rpms/python3/pull-request/15

Comment 5 Fedora Update System 2017-10-02 16:03:09 UTC
python3-3.6.2-19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-33a9e5cea4

Comment 6 Fedora Update System 2017-10-03 09:11:03 UTC
python3-3.6.2-8.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f99c2b1427

Comment 7 Fedora Update System 2017-10-06 03:24:53 UTC
python3-3.6.2-8.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f99c2b1427

Comment 8 Fedora Update System 2017-10-06 04:24:23 UTC
python3-3.6.2-19.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-33a9e5cea4

Comment 9 Fedora Update System 2017-10-06 14:29:04 UTC
python3-3.6.3-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a3ba3230f

Comment 10 Fedora Update System 2017-10-08 06:23:02 UTC
python3-3.6.3-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a3ba3230f

Comment 11 Fedora Update System 2017-10-09 15:23:53 UTC
python3-3.6.2-8.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-10-11 06:26:32 UTC
python3-3.6.3-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a20cf0e9b8

Comment 13 Fedora Update System 2017-11-11 02:50:31 UTC
python3-3.6.3-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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