Skip to content

Build fails with recent libedit versions #109191

Closed

Description

@jmroot

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Sep 9, 2023
  2. corona10 commented on Sep 10, 2023

    @corona10
    Member

    see also: #105323

  3. corona10 commented on Sep 10, 2023

    @corona10
    Member

    And about the apple workaround: #108665

  4. added 2 commits that reference this issue on Oct 2, 2023
  5. added a commit that references this issue on Oct 9, 2023
  6. added a commit that references this issue on Oct 9, 2023
  7. added a commit that references this issue on Oct 9, 2023
  8. added a commit that references this issue on Oct 9, 2023
  9. added a commit that references this issue on Oct 9, 2023
  10. erlend-aasland commented on Oct 9, 2023

    @erlend-aasland
    Contributor

    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)

  11. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions