Bug 555943

Summary: python-devel has broken multilib
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dmalcolm, ivazqueznet, james.antill, jonathansteffan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-22 23:18:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
.spec fix. none

Description Jan Kratochvil 2010-01-15 23:07:53 UTC
Description of problem:
One cannot build gdb with rpmbuild --target=i686 on x86_64 OS.
This is a regression since F-12.

Version-Release number of selected component (if applicable):
python-2.6.4-4.fc13.x86_64
python-devel-2.6.4-4.fc13.x86_64
python-devel-2.6.4-4.fc13.i686

How reproducible:
Always.

Steps to Reproduce:
1. rpmbuild -bb --target=i686 gdb-7.0.50.20100115-26.fc13.src.rpm
(currently not checked in)

Actual results:
checking whether to use python... yes
checking for python2.6... no
checking for python2.5... no
checking for python2.4... no
configure: error: python is missing or unusable
In file included from /usr/include/python2.6/Python.h:8,
                 from conftest.c:63:
/usr/include/python2.6/pyconfig.h:4:25: error: pyconfig-32.h: No such file or directory

Expected results:
checking for python2.6... yes
etc.

Additional info:

for i in /usr/include/python2.6/pyconfig{,-32,-64}.h;do echo -n "$i: ";rpm -qf $i;done

on F-12:

/usr/include/python2.6/pyconfig.h: python-devel-2.6.2-3.fc12.x86_64
python-devel-2.6.2-3.fc12.i686
/usr/include/python2.6/pyconfig-32.h: python-devel-2.6.2-3.fc12.i686
/usr/include/python2.6/pyconfig-64.h: python-devel-2.6.2-3.fc12.x86_64

while on F-13:

/usr/include/python2.6/pyconfig.h: python-devel-2.6.4-4.fc13.x86_64
python-devel-2.6.4-4.fc13.i686
/usr/include/python2.6/pyconfig-32.h: error: file /usr/include/python2.6/pyconfig-32.h: No such file or directory
/usr/include/python2.6/pyconfig-64.h: python-2.6.4-4.fc13.x86_64

Apparently /usr/include/python2.6/pyconfig-{64,32}.h should be both in python-devel and not python.

python-devel.i686 should be sufficient to build application using --target=i686.

Comment 1 Dave Malcolm 2010-01-15 23:16:41 UTC
/usr/include/python2.6/pyconfig-{64,32}.h were moved from python-devel to python as a fix for bug 531901.

You don't have python.i686 installed; if you install python.i686 does it build OK?

Comment 2 Jan Kratochvil 2010-01-15 23:51:18 UTC
Created attachment 384743 [details]
.spec fix.

Understood now...

Therefore attaching a fix (untested).

python should follow the principle that PACKAGE-devel.ARCH enables build for ARCH using PACKAGE.

Comment 3 Dave Malcolm 2010-01-16 01:22:47 UTC
Thanks.

There are some notes on %{?_isa} at http://www.rpm.org/wiki/PackagerDocs/ArchDependencies

On my machine (F-12 i686):
$ rpm --eval "%{_isa}"
(x86-32)
$ rpm -q --provides python | grep python\(
python(abi) = 2.6
python(x86-32) = 2.6.4-4.fc13

Looks like we need:
  Requires: %{python}%{?_isa} = %{version}-%{release}
rather than:
  Requires: %{python} = %{version}-%{release}%{?_isa}

The former should work for all packages built with rpm >= 4.6.0

Building with fix into dist-f13:
  python: http://koji.fedoraproject.org/koji/taskinfo?taskID=1925427
  python3: http://koji.fedoraproject.org/koji/taskinfo?taskID=1925422

Comment 4 Jan Kratochvil 2010-01-16 01:41:43 UTC
OK, I probably made a mistake, I agree with your fix, thanks.

Comment 5 Dave Malcolm 2010-01-16 01:53:38 UTC
Should appear in rawhide as:
  python-2.6.4-5.fc13
  python3-3.1.1-16.fc13

Please test and confirm the fix - thanks!

Comment 6 Jan Kratochvil 2010-01-22 23:18:11 UTC
Confirming it has installed automatically on x86_64 installation:
Jan 22 04:23:44 Installed: python-2.6.4-7.fc13.i686