Skip to content

Compiling Cpython 3.8.X with shared libffi fails #98145

Closed

Description

@cubanpit

Bug report

Compiling CPython on Windows with shared libffi fails because of redefinition of some symbols (see conan-io/conan-center-index#13279).
This recent commit seems to address the problem in the next release, but it is not going to be backported.
Is it worth to open a PR to backport a fix?

I tried to compile CPython 3.8.12 and the linked PR to the Conan project shows plenty of information.

The error message with my setup is:

malloc_closure.obj : error LNK2005: ffi_closure_alloc already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbui
ld\_ctypes.vcxproj]
malloc_closure.obj : error LNK2005: ffi_closure_free already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbuil
d\_ctypes.vcxproj]
C:\Users\anonapath\source_subfolder\PCbuild\amd64\_ctypes.pyd : fatal error LNK1169: one or more multiply defined symbols found [C:\Users\
anonpath\source_subfolder\PCbuild\_ctypes.vcxproj]

Activity

  1. added
    type-bug
    on Oct 10, 2022
  2. ronaldoussoren commented on Oct 10, 2022

    @ronaldoussoren
    Contributor

    Python 3.8 is in security fix mode, and this is not a security issue. Hence this will likely not get fixed in 3.8.

    The relevant issue mentions that the fix is not back ported to 3.10, which can still receive bug fixes. I don't know if this should be considered a bug or feature though and will leave that to the platform and ctypes experts.

  3. gpshead commented on Oct 23, 2022

    @gpshead
    Member

    The change you'd want to backport came from #29791. I agree with Christian on the cited issue on not wanting to backport that to 3.10 (which will only receive non-security fixes for a few more weeks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstopic-ctypestype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions