-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
readline module fails to build against recent libedit #117845
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
Comments
The upstream libedit "fixed" the function declaration in 1.53, which kind of creates a disaster for us. The apple version branched before that and arguably the most common libedit we will have. Linux user (or maybe Mac user that builds their own libedit) potentially could use any version. I can't think of anything to distinguish between the versions, and I think there are multiple version mechanics out in the market (ubuntu seems to use the version 3.1 + date?). I don't know any C tricks to make this work because that's a different typedef, not MACRO. I can think of a couple non-ideal solutions:
I don't think tricking compiler works in this case as the input argument number is different. |
I think it would need to be an autoconf check, albeit a little more sophisticated than the one that was removed. You could check if a C function that calls function pointers of the appropriate types will compile when using the different numbers of args. |
I'm not an expert on autoconf so I don't know if this kind of check is feasible or common for autoconf. @corona10 worked on the original option I believe and he might have a better idea of it. |
Older libedit versions (like Apple's) use a different type signature for rl_startup_hook and rl_pre_input_hook. Add a configure check to determine which one is accepted.
Older libedit versions (like Apple's) use a different type signature for rl_startup_hook and rl_pre_input_hook. Add a configure check to determine which signature is accepted by introducing the Py_RL_STARTUP_HOOK_TAKES_ARGS macro in pyconfig.h.
…ython#117870) Older libedit versions (like Apple's) use a different type signature for rl_startup_hook and rl_pre_input_hook. Add a configure check to determine which signature is accepted by introducing the Py_RL_STARTUP_HOOK_TAKES_ARGS macro in pyconfig.h.
Bug report
Bug description:
Building Python 3.13.0a6 configured with
--with-readline=editline
fails like this for me:It looks like e7e1116 is the cause. No editline header defines
_RL_FUNCTION_TYPEDEF
, but recent versions (in this case 20230828) declare these functions as takingvoid
whereas Apple's version declares them the other way. I suspect that older clang versions and gcc may let you off with a warning rather than erroring on this type mismatch.CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: