$ CFLAGS=-I/usr/include/ncursesw/ CPPFLAGS=-I/usr/include/ncursesw/ ./configure $ make ... building '_curses' extension gcc -fno-strict-aliasing -I/usr/include/ncursesw/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/include/ncursesw/ -I/Python-2.7.3rc2/Include -I/Python-2.7.3rc2 -c /Python-2.7.3rc2/Modules/_cursesmodule.c -o build/temp.cygwin-1.7.11-i686-2.7/Python-2.7.3rc2/Modules/_cursesmodule.o /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_EchoChar’: /Python-2.7.3rc2/Modules/_cursesmodule.c:810:18: error: dereferencing pointer to incomplete type /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_NoOutRefresh’: /Python-2.7.3rc2/Modules/_cursesmodule.c:1238:22: error: dereferencing pointer to incomplete type /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_Refresh’: /Python-2.7.3rc2/Modules/_cursesmodule.c:1381:22: error: dereferencing pointer to incomplete type /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_SubWin’: /Python-2.7.3rc2/Modules/_cursesmodule.c:1448:18: error: dereferencing pointer to incomplete type /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_Refresh’: /Python-2.7.3rc2/Modules/_cursesmodule.c:1412:1: warning: control reaches end of non-void function /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_NoOutRefresh’: /Python-2.7.3rc2/Modules/_cursesmodule.c:1270:1: warning: control reaches end of non-void function /Python-2.7.3rc2/Modules/_cursesmodule.c: In function ‘PyCursesWindow_EchoChar’: /Python-2.7.3rc2/Modules/_cursesmodule.c:817:1: warning: control reaches end of non-void function CYGWIN_NT-6.1-WOW64 ... 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin gcc version 4.5.3 (GCC) Python 2.7.2 & 2.7.3rc2
It's cygwin's issue. Cygwin's python 2.6 has a patch for it. Just in case: --- origsrc/Python-2.6.5/Include/py_curses.h 2009-09-06 16:23:05.000000000 -0500 +++ src/Python-2.6.5/Include/py_curses.h 2010-04-14 15:21:23.008971400 -0500 @@ -17,6 +17,13 @@ #define NCURSES_OPAQUE 0 #endif /* __APPLE__ */ +#ifdef __CYGWIN__ +/* the following define is necessary for Cygwin; without it, the + Cygwin-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python + can't get at the WINDOW flags field. */ +#define NCURSES_INTERNALS +#endif /* __CYGWIN__ */ + #ifdef __FreeBSD__ /* ** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
I think it would still be worth including this patch in Python. It wouldn't be the only condition in py_curses.h for platform-specific oddities with ncurses. This patch is still needed for the _curses module to build on Cygwin.
I don't agree with #14438 patch to apply branch. this is quickfix for just Cygwin. I think that curses library should be chosen using configure script. Erik, How about patch for #14598 or #28190? I prefer #28190 because better header is chosen using configure script.