Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
efimov-mikhail commented Oct 11, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
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 resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
skirpichev left a comment
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)
efimov-mikhail commented Oct 11, 2024
Ok.
Definitely.
Yes. It works fine with libffi.so.6: And with libffi.so.7:
I know nothing about build bot configuration. |
skirpichev left a comment
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.
picnixz commented Oct 11, 2024
@skirpichev You can request build bots now that you're a member :) |
skirpichev commented Oct 11, 2024
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. |
efimov-mikhail commented Oct 11, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Maybe it is. I can see such line in log from this issue: But in actual log it differs:
Yes, it is. |
Uh oh!
There was an error while loading. Please reload this page.
skirpichev commented Oct 12, 2024
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>
Uh oh!
There was an error while loading. Please reload this page.
skirpichev commented Oct 12, 2024
CC @vstinner |
thesamesam commented Oct 14, 2024
skirpichev commented Oct 14, 2024
@thesamesam, that's a separate issue. |
thesamesam commented Oct 14, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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. |
skirpichev commented Oct 14, 2024
It was already suggested in the referenced issue thread. |
efimov-mikhail commented Oct 15, 2024
Maybe, there is anything I could improve? |
skirpichev commented Oct 15, 2024
vstinner left a comment
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
vstinner commented Oct 15, 2024
Merged, thanks for the fix @efimov-mikhail. |
skirpichev commented Oct 29, 2024
Correction: #126104 |
skirpichev commented Apr 24, 2025
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?