Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build fails with recent libedit versions #109191

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

Closed
jmroot opened this issue Sep 9, 2023 · 3 comments
Closed

Build fails with recent libedit versions #109191

jmroot opened this issue Sep 9, 2023 · 3 comments
Labels
OS-mac type-bug An unexpected behavior, bug, or error

Comments

@jmroot
Copy link
Contributor

jmroot commented Sep 9, 2023

Bug report

Bug description:

readline_set_completion_display_matches_hook_impl will use either VFunction (if _RL_FUNCTION_TYPEDEF is defined) or rl_compdisp_func_t. The former is deprecated but available in current readline, while the latter has historically not been available in libedit. However, libedit recently added rl_compdisp_func_t and removed VFunction entirely: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline/readline.h.diff?r1=1.53&r2=1.54&sortby=date

We ship a recent libedit in MacPorts, so we see a compilation failure like this:

./Modules/readline.c:448:10: error: use of undeclared identifier 'VFunction'; did you mean 'function'?
        (VFunction *)on_completion_display_matches_hook : 0;
         ^~~~~~~~~

It's easy enough for us to patch around this, but I guess if compatibility with both current libedit and the older version shipped by Apple is desired, there needs to be another check for the availability of this type.

CPython versions tested on:

3.12

Operating systems tested on:

macOS

Linked PRs

@jmroot jmroot added the type-bug An unexpected behavior, bug, or error label Sep 9, 2023
@corona10
Copy link
Member

see also: #105323

@corona10
Copy link
Member

And about the apple workaround: #108665

Bo98 added a commit to Bo98/cpython that referenced this issue Oct 2, 2023
Bo98 added a commit to Bo98/cpython that referenced this issue Oct 2, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 9, 2023
corona10 pushed a commit that referenced this issue Oct 9, 2023
gh-109191: Fix build with newer editline (gh-110239)
(cherry picked from commit f4cb0d2)

Co-authored-by: Bo Anderson <[email protected]>
Bo98 added a commit to Bo98/cpython that referenced this issue Oct 9, 2023
erlend-aasland pushed a commit that referenced this issue Oct 9, 2023
@erlend-aasland
Copy link
Contributor

erlend-aasland commented Oct 9, 2023

Thanks for the report, @jmroot, thanks for the PR, @Bo98, and thanks for the review, @corona10 :)

Marking this as resolved.
(3.11 backport is approved and will be automerged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants
@jmroot @corona10 @erlend-aasland @terryjreedy and others