Bug 979696 - can't rebuild python3 in fedora-rawhide (libffi: No such file or directory)
can't rebuild python3 in fedora-rawhide (libffi: No such file or directory)
Product: Fedora
Classification: Fedora
Component: python3 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Bohuslav "Slavek" Kabrda
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-29 09:29 EDT by Dick Marinus
Modified: 2013-07-10 22:32 EDT (History)
3 users (show)

See Also:
Fixed In Version: python3-3.3.2-3.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-10 22:32:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dick Marinus 2013-06-29 09:29:53 EDT
1. mock python3-3.3.2-2.fc20.src.rpm
Finish: Outputting list of installed packages
ERROR: Exception(/tmp/python3-3.3.2-2.fc20.src.rpm) Config(fedora-rawhide-x86_64) 6 minutes 17 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: Command failed. See logs for output.

2. tail -n19 /var/lib/mock/fedora-rawhide-x86_64/result/build.log 
gcc -pthread -shared -Wl,-z,relro -Wl,-z,relro -Wl,-z,relro -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv build/temp.linux-x86_64-3.3-pydebug/builddir/build/BUILD/Python-3.3.2/Modules/_tkinter.o build/temp.linux-x86_64-3.3-pydebug/builddir/build/BUILD/Python-3.3.2/Modules/tkappinit.o -L/usr/X11/lib -L. -L/usr/local/lib64 -ltk8.5 -ltcl8.5 -lX11 -lpython3.3dm -o build/lib.linux-x86_64-3.3-pydebug/_tkinter.cpython-33dm.so
error: /builddir/build/BUILD/Python-3.3.2/Modules/_ctypes/libffi: No such file or directory
[110698 refs]
make: *** [sharedmods] Error 1
fout: Bad exit status from /var/tmp/rpm-tmp.ANMIEI (%build)
    Bad exit status from /var/tmp/rpm-tmp.ANMIEI (%build)
RPM build errors:
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/python3.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 359, in do
    raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/python3.spec']
Comment 1 Bohuslav "Slavek" Kabrda 2013-07-01 03:12:56 EDT
This seems to be a result of change in libffi placement of headers, resp. pkg-config output:

++ pkg-config --cflags-only-I libffi
+ export 'CPPFLAGS=-I/usr/lib64/libffi-3.0.13/include '

++ pkg-config --cflags-only-I libffi
+ export CPPFLAGS=

Python seems not to be able to find libffi and therefore tries to fall back to bundled libffi (which is deleted in %prep precisely for this reason). The libffi headers seem not to need an additional -I directive, since they live in /usr/include - I'll try to investigate why Python can't find them there.
Comment 2 Bohuslav "Slavek" Kabrda 2013-07-02 03:06:10 EDT
Fixed by commit (the comment on what the problem was is part of the commit):
Koji build:
Comment 3 Fedora Update System 2013-07-02 03:08:06 EDT
python3-3.3.2-3.fc19 has been submitted as an update for Fedora 19.
Comment 4 Fedora Update System 2013-07-02 21:44:02 EDT
Package python3-3.3.2-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python3-3.3.2-3.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-07-10 22:32:02 EDT
python3-3.3.2-3.fc19 has been pushed to the Fedora 19 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.