bpo-2445: Allow the UnixCCompiler.find_library_file to correctly find DLL import libs (.dll.a) on Cygwin#4136
Closed
embray wants to merge 1 commit intopython:masterfrom
Closed
bpo-2445: Allow the UnixCCompiler.find_library_file to correctly find DLL import libs (.dll.a) on Cygwin#4136embray wants to merge 1 commit intopython:masterfrom
embray wants to merge 1 commit intopython:masterfrom
Conversation
…t libs (.dll.a) on Cygwin
Contributor
|
FYI, https://bugs.python.org/issue4032 has a patch which changes to use UnixCCompiler lastingly on Cygwin. (probably, it cannot use as it is) |
Contributor
Author
|
That is maybe a better patch. This patch is a bit janky because it reuses the |
Contributor
|
Yeah, I think so too. I submit the bpo-4032 patch after modify it. |
Contributor
Author
|
Closing in favor of #4153. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fix/workaround to a rather old issue (https://bugs.python.org/issue2445) that still hasn't had a fix merged.
The original patch is by @ma8ma .
This simple patch allows
UnixCCompiler.find_library_file, which searching library directories (e.g./usr/lib), to recognize.dll.aas matches for the library. This is necessary on Cygwin where actual DLLs are not typically found under<prefix>/lib, but rather<prefix>/bin(because Windows searchesPATHfor DLLs). However one does.dll.aimport libs under<prefix>/lib(these are simple static archives that contain stubs for symbols actually found in the DLL, which can be used in lieu of the DLL itself for linking). This satisfies that the library being searched for is typically found.This is especially necessary now that the
_ctypesmodule can only be built with--with-system-ffi; without this patch the system libffi cannot be found.https://bugs.python.org/issue2445