[New-bugs-announce] [issue26661] python fails to locate system libffi

Robert Kuska report at bugs.python.org
Tue Mar 29 06:09:12 EDT 2016


New submission from Robert Kuska:

Python fails to locate system version of ffi when building. We delete bundled version of ffi and build process fail with following error:

error: [Errno 2] No such file or directory: '/builddir/build/BUILD/Python-3.5.1/Modules/_ctypes/libffi'

This is caused by setup.py at 1993 checking only for '#define LIBFFI_H' within ffi.h.

Content of /usr/include/ffi.h:

> $ cat /usr/include/ffi.h
/* This file is here to prevent a file conflict on multiarch systems. */
#ifdef ffi_wrapper_h
#error "Do not define ffi_wrapper_h!"
#endif
#define ffi_wrapper_h

#if defined(__i386__)
#include "ffi-i386.h"
#elif defined(__powerpc64__)
#include "ffi-ppc64.h"
#elif defined(__powerpc__)
#include "ffi-ppc.h"
#elif defined(__s390x__)
#include "ffi-s390x.h"
#elif defined(__s390__)
#include "ffi-s390.h"
#elif defined(__x86_64__)
#include "ffi-x86_64.h"
#else
#error "The libffi-devel package is not usable with the architecture."
#endif

#undef ffi_wrapper_h

It is important to note that this content is Fedora specific. As a workaround we (Fedora) use attached patch.

Would it be plausible to accept this patch in upstream?

----------
components: Build
files: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch
keywords: patch
messages: 262598
nosy: rkuska
priority: normal
severity: normal
status: open
title: python fails to locate system libffi
type: compile error
Added file: http://bugs.python.org/file42320/00184-ctypes-should-build-with-libffi-multilib-wrapper.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26661>
_______________________________________


More information about the New-bugs-announce mailing list