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

ctypes compilation fails on FreeBSD: Undefined symbol "ffi_call_win32" #66711

Closed
vstinner opened this issue Sep 30, 2014 · 6 comments
Closed
Labels
build The build process and cross-build topic-ctypes

Comments

@vstinner
Copy link
Member

BPO 22521
Nosy @pitrou, @vstinner, @koobs
Superseder
  • bpo-23042: ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol "ffi_call_win32"
  • 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 = None
    closed_at = <Date 2015-03-18.13:44:08.588>
    created_at = <Date 2014-09-30.11:15:10.906>
    labels = ['ctypes', 'build']
    title = 'ctypes compilation fails on FreeBSD: Undefined symbol "ffi_call_win32"'
    updated_at = <Date 2015-03-18.14:08:17.317>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2015-03-18.14:08:17.317>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-03-18.13:44:08.588>
    closer = 'vstinner'
    components = ['ctypes']
    creation = <Date 2014-09-30.11:15:10.906>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 22521
    keywords = ['buildbot']
    message_count = 6.0
    messages = ['227878', '227880', '227886', '230448', '238442', '238445']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'vstinner', 'Arfrever', 'koobs', 'Dmitry.Sivachenko']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '23042'
    type = 'compile error'
    url = 'https://bugs.python.org/issue22521'
    versions = ['Python 3.4', 'Python 3.5']

    @vstinner
    Copy link
    Member Author

    On buildbots FreeBSD 6.4 and 7.2, the compilation of the ctypes module fails because the function "ffi_call_win32" is missing. I don't understand why a "win32" function would be needed on FreeBSD!?

    http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/5618/steps/test/logs/stdio

    http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/5060/steps/compile/logs/stdio

    *** WARNING: renaming "_ctypes" since importing it failed: build/lib.freebsd-6.4-RELEASE-i386-3.5-pydebug/_ctypes.so: Undefined symbol "ffi_call_win32"

    @vstinner vstinner added build The build process and cross-build topic-ctypes labels Sep 30, 2014
    @vstinner
    Copy link
    Member Author

    I don't understand why a "win32" function would be needed on FreeBSD!?

    I see the function defined in libffi, but I don't see it used in the ctypes module.

    Note: the system libffi is not used, these buildbots compile the embedded version of libffi: "checking for --with-system-ffi... no" in configure logs.

    @pitrou
    Copy link
    Member

    pitrou commented Sep 30, 2014

    Those FreeBSD versions are totally obsolete, perhaps we should simply ignore any failures on them.

    @DmitrySivachenko
    Copy link
    Mannequin

    DmitrySivachenko mannequin commented Nov 1, 2014

    On modern FreeBSD version (10/stable) on i386 arch it fails with the following error:
    build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function .LBB4_4': /usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x661): undefined reference to ffi_closure_THISCALL'
    build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function .LBB4_3': /usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x673): undefined reference to ffi_closure_FASTCALL'
    build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function .LBB4_5': /usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x685): undefined reference to ffi_closure_STDCALL'
    /usr/bin/ld: build/lib.freebsd-10.0-RELEASE-p10-i386-3.4/_ctypes.so: hidden symbol `ffi_closure_FASTCALL' isn't defined

    There is no such a problem on amd64.

    --with-system-ffi it works fine (system libffi is the same version: 3.0.13)

    @vstinner
    Copy link
    Member Author

    FreeBSD 6.4 buildbot is broken (hg update fails), FreeBSD 7.2 is offline. I close the issue.

    @koobs
    Copy link

    koobs commented Mar 18, 2015

    FWIW, see bpo-23042

    @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
    build The build process and cross-build topic-ctypes
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants