Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python fails to locate system libffi #70848

Closed
rkuska mannequin opened this issue Mar 29, 2016 · 4 comments
Closed

python fails to locate system libffi #70848

rkuska mannequin opened this issue Mar 29, 2016 · 4 comments
Assignees
Labels
3.7 (EOL) end of life build The build process and cross-build

Comments

@rkuska
Copy link
Mannequin

rkuska mannequin commented Mar 29, 2016

BPO 26661
Nosy @vstinner, @tiran, @rkuska
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tiran'
    closed_at = <Date 2016-09-18.12:41:39.402>
    created_at = <Date 2016-03-29.10:09:12.167>
    labels = ['build', '3.7']
    title = 'python fails to locate system libffi'
    updated_at = <Date 2017-03-31.16:36:25.334>
    user = 'https://github.com/rkuska'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:25.334>
    actor = 'dstufft'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2016-09-18.12:41:39.402>
    closer = 'christian.heimes'
    components = ['Build']
    creation = <Date 2016-03-29.10:09:12.167>
    creator = 'rkuska'
    dependencies = []
    files = ['42320']
    hgrepos = []
    issue_num = 26661
    keywords = ['patch']
    message_count = 4.0
    messages = ['262598', '276885', '276887', '276888']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'christian.heimes', 'python-dev', 'rkuska']
    pr_nums = ['552']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue26661'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    @rkuska
    Copy link
    Mannequin Author

    rkuska mannequin commented Mar 29, 2016

    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@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?

    @rkuska rkuska mannequin added build The build process and cross-build labels Mar 29, 2016
    @tiran
    Copy link
    Member

    tiran commented Sep 18, 2016

    This affects Python 3.7 because our own copy of libffi was removed from 'default'.

    @tiran tiran added the 3.7 (EOL) end of life label Sep 18, 2016
    @tiran tiran self-assigned this Sep 18, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 18, 2016

    New changeset c4cec8f7c727 by Christian Heimes in branch '3.5':
    Issue bpo-26661: setup.py now detects system libffi with multiarch wrapper.
    https://hg.python.org/cpython/rev/c4cec8f7c727

    New changeset 18825546acbc by Christian Heimes in branch '3.6':
    Issue bpo-26661: setup.py now detects system libffi with multiarch wrapper.
    https://hg.python.org/cpython/rev/18825546acbc

    New changeset 35820a4a6967 by Christian Heimes in branch 'default':
    Issue bpo-26661: setup.py now detects system libffi with multiarch wrapper.
    https://hg.python.org/cpython/rev/35820a4a6967

    New changeset 2a3e4fa42464 by Christian Heimes in branch '2.7':
    Issue bpo-26661: setup.py now detects system libffi with multiarch wrapper.
    https://hg.python.org/cpython/rev/2a3e4fa42464

    @tiran
    Copy link
    Member

    tiran commented Sep 18, 2016

    Thanks Robert, I have been running into the same issue for a while.

    @tiran tiran closed this as completed Sep 18, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant