-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-125206: Bug in ctypes with old libffi is fixed #125322
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
gh-125206: Bug in ctypes with old libffi is fixed #125322
Conversation
Workaround for old libffi versions is added. Module ctypes now supports C11 double complex only with libffi >= 3.3.0.
Misc/NEWS.d/next/Library/2024-10-11-18-03-05.gh-issue-125206.pWRRK6.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM.
One minor suggestion, lets rename Py_FFI_TARGET_HAS_COMPLEX_TYPE
to something like Py_FFI_SUPPORT_C_COMPLEX
.
Only non-trivial change here is in the configure.ac. I assume, you have tested this check on your system with old libffi.
Probably, this should be tested with build bots. Old workaround with FFI_TARGET_HAS_COMPLEX_TYPE
was working e.g. on Sparc #120894 (comment)
Ok.
Definitely.
Yes. It works fine with libffi.so.6:
And with libffi.so.7:
I know nothing about build bot configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@skirpichev You can request build bots now that you're a member :) |
SPARCv9 fails, but I see no failures, related to affected test. On another hand, configure now prints: Lets wait PPC64LE, I guess it's queried. |
Maybe it is. I can see such line in log from this issue:
But in actual log it differs:
Yes, it is. |
Ok, PPC64LE build was successful (and it doesn't detect a working libffi, as expected). I can't suggest some other built bot to test. LGTM. PS: It's silly that |
PEP 7 Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
CC @vstinner |
@thesamesam, that's a separate issue. |
Yes, I know. I'm mentioning it because there's other libffi cleanups which have gone awry because an approach couldn't be agreed upon for them. The same approach used here could work, but nevermind. |
It was already suggested in the referenced issue thread. |
Maybe, there is anything I could improve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged, thanks for the fix @efimov-mikhail. |
Correction: #126104 |
And yet another: #132865. Sorry :( |
Workaround for old libffi versions is added.
Module ctypes now supports C11 double complex only with libffi >= 3.3.0.
@skirpichev, could you please review this?