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

Compiling Cpython 3.8.X with shared libffi fails #98145

Closed
cubanpit opened this issue Oct 10, 2022 · 2 comments
Closed

Compiling Cpython 3.8.X with shared libffi fails #98145

cubanpit opened this issue Oct 10, 2022 · 2 comments
Labels
OS-windows topic-ctypes type-bug An unexpected behavior, bug, or error

Comments

@cubanpit
Copy link

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]
@cubanpit cubanpit added the type-bug An unexpected behavior, bug, or error label Oct 10, 2022
@ronaldoussoren
Copy link
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.

@gpshead
Copy link
Member

gpshead commented Oct 23, 2022

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).

@gpshead gpshead closed this as completed Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-ctypes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants