Re: [patch] Allow to link with ncursesw

Pedro Alves
2017-09-20T18:39:06Z

On 09/13/2017 11:29 AM, Matthias Klose wrote:
> Triggered by https://launchpad.net/bugs/1275210, to be able to cope with UTF-8
> characters in gdbtui. Ok for the trunk?

>
> Matthias
>
> * configure.ac: Search ncursesw before ncurses.
> Check ncursesw/ncurses.h before ncurses/ncurses.h.
> * gdb_curses.h: Include <ncursesw/ncurses.h>
> * config.in, configure: Regenerate.
>

This sounds a bit scary if readline (or Python?) links with ncurses.
Looking both upstream readline sources and our local copy in the tree,
I don't see anything checking for ncursesw. Looking around for
ncurses + ncursesw, I found:

https://bugs.python.org/issue9408
https://bugs.python.org/issue7384

"Python3 now links _curses.so to ncurses library (bytes version) instead
of ncursesw library (unicode version) if readline is linked to ncurses."
....
"Thomas Dickey recommended not to load readline+ncurses and ncursesw
at the same time."

And:

https://bugs.mageia.org/show_bug.cgi?id=2156
bugs.debian.org/cgi-bin/bugreport.cgi?bug=602720

I see you've been involved with all this before.

Did you reach out to readline/bash, see if they're willing
to try ncursesw before ncurses too? Don't we need at least
a local patch to our local readline copy, to avoid breaking
those that use it and have it link with ncurses?

Thanks,
Pedro Alves