Skip to content
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

_cursesmodule.c fails with ncurses-5.9 on Linux #58803

Closed
phaering mannequin opened this issue Apr 16, 2012 · 7 comments
Closed

_cursesmodule.c fails with ncurses-5.9 on Linux #58803

phaering mannequin opened this issue Apr 16, 2012 · 7 comments
Labels
3.7 (EOL) end of life build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@phaering
Copy link
Mannequin

phaering mannequin commented Apr 16, 2012

BPO 14598
Nosy @vstinner, @serhiy-storchaka, @ma8ma
Superseder
  • bpo-25720: Fix curses module compilation with ncurses6
  • Files
  • 0001-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch
  • 3.4-issue14598-curses-WINDOW_flags.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-11-04.08:56:20.987>
    created_at = <Date 2012-04-16.16:30:53.055>
    labels = ['extension-modules', 'build', '3.7']
    title = '_cursesmodule.c fails with ncurses-5.9 on Linux'
    updated_at = <Date 2017-11-04.08:56:20.986>
    user = 'https://bugs.python.org/phaering'

    bugs.python.org fields:

    activity = <Date 2017-11-04.08:56:20.986>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-04.08:56:20.987>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2012-04-16.16:30:53.055>
    creator = 'phaering'
    dependencies = []
    files = ['25243', '39085']
    hgrepos = []
    issue_num = 14598
    keywords = ['patch']
    message_count = 7.0
    messages = ['158481', '158484', '158485', '158601', '241308', '305375', '305392']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'rpetrov', 'devurandom', 'phaering', 'serhiy.storchaka', 'masamoto']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '25720'
    type = 'compile error'
    url = 'https://bugs.python.org/issue14598'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7']

    @phaering
    Copy link
    Mannequin Author

    phaering mannequin commented Apr 16, 2012

    I need to define NCURSES_INTERNALS in py_curses.h before ncurses.h is included, even on my Linux system with ncurses-5.9.

    See the same issue for cygwin: 14438

    @phaering phaering mannequin added extension-modules C modules in the Modules dir build The build process and cross-build labels Apr 16, 2012
    @rpetrov
    Copy link
    Mannequin

    rpetrov mannequin commented Apr 16, 2012

    you could find how to resolve in last patch attached to bpo-3754

    @rpetrov
    Copy link
    Mannequin

    rpetrov mannequin commented Apr 16, 2012

    extracted as separate patch

    @vstinner
    Copy link
    Member

    You should remove the old code instead of comment it.

    +/* NOTE configure check if ncurses require such definition
     #define NCURSES_OPAQUE 0
    +*/
    
    +/* NOTE configure check for existence of flags
    + * Also flags are visible only if WINDOW structure is not opaque
     #ifndef WINDOW_HAS_FLAGS
     #define WINDOW_HAS_FLAGS 1
     #endif
    +*/

    @ma8ma
    Copy link
    Mannequin

    ma8ma mannequin commented Apr 17, 2015

    I rewrote the patch for Python 3.4.
    The configure and pyconfig.h.in were generated by autoreconf.

    If evaluate to the curses WINDOW doesn't have the _flags member,
    The configure script defines related macros and checks the member again.
    And removed the quick-fix on py_curses header. The quick-fix wouldn't be needed.

    My environment (Cygwin 1.7.35 i686) cannot check the build case that NCURSES_OPAQUE is defined zero.

    @serhiy-storchaka
    Copy link
    Member

    Is this issue superseded by bpo-25720?

    @serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Nov 1, 2017
    @ma8ma
    Copy link
    Mannequin

    ma8ma mannequin commented Nov 1, 2017

    Probably, yes. ncurses on Cygwin has provided is_pad() [*]. In addition, the old version of Cygwin will become to not define WINDOW_HAS_FLAGS by bpo-25720.

    [*] newer version than patchlevel 20090906 was provided on Cygwin in 2009.
    https://sourceware.org/ml/cygwin-announce/2009-11/msg00025.html

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life build The build process and cross-build extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants