Issue 14438: _cursesmodule build fails on cygwin (original) (raw)

Created on 2012-03-29 10:47 by luch, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg157026 - (view) Author: Alexey Luchko (luch) Date: 2012-03-29 10:47
$ 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
msg157134 - (view) Author: Alexey Luchko (luch) Date: 2012-03-30 10:35
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
msg278031 - (view) Author: Erik Bray (erik.bray) * (Python triager) Date: 2016-10-04 11:55
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.
msg278033 - (view) Author: Masayuki Yamamoto (masamoto) * Date: 2016-10-04 12:26
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.
msg278034 - (view) Author: Erik Bray (erik.bray) * (Python triager) Date: 2016-10-04 13:05
I see what you're saying--thanks for pointing out those other tickets. I'll give #28190 a try first.
msg278045 - (view) Author: (yan12125) * Date: 2016-10-04 14:56
My patch at solves a different problem. IMO the correct way to go for this issue is . By the way, this problem affects more than Cygwin. ()
History
Date User Action Args
2022-04-11 14:57:28 admin set github: 58643
2016-10-04 14:56:56 yan12125 set nosy: + yan12125messages: +
2016-10-04 13:05:43 erik.bray set messages: +
2016-10-04 12:26:48 masamoto set messages: +
2016-10-04 11:55:30 erik.bray set nosy: + erik.braymessages: +
2015-04-18 06:52:36 masamoto set nosy: + masamoto
2012-03-30 10:35:29 luch set status: open -> closedresolution: not a bugmessages: +
2012-03-29 10:47:11 luch create