Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
skirpichev
left a comment
There was a problem hiding this comment.
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. |
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. |
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. |
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
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?