Issue1324799
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2005-10-12 12:21 by arkoenig, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
curses.patch | akuchling, 2005-11-22 14:45 | Patch for mvwgetnstr |
Messages (5) | |||
---|---|---|---|
msg26570 - (view) | Author: Andrew Koenig (arkoenig) | Date: 2005-10-12 12:21 | |
During installation, the following happens: building '_curses' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC - fno-strict-aliasing -I. -I/tmp/build-gnu20746/Python- 2.4.2/./Include -I/usr/gnu/include -I/usr/local/include - I/tmp/build-gnu20746/Python-2.4.2/Include -I/tmp/build- gnu20746/Python-2.4.2 -c /tmp/build-gnu20746/Python- 2.4.2/Modules/_cursesmodule.c -o build/temp.solaris-2.8- sun4u-2.4/_cursesmodule.o /tmp/build-gnu20746/Python- 2.4.2/Modules/_cursesmodule.c: In function 'PyCursesWindow_GetStr': /tmp/build-gnu20746/Python- 2.4.2/Modules/_cursesmodule.c:822: warning: implicit declaration of function 'mvwgetnstr' gcc -shared build/temp.solaris-2.8-sun4u- 2.4/_cursesmodule.o -L/usr/gnu/lib -L/usr/local/lib -lcurses - ltermcap -o build/lib.solaris-2.8-sun4u-2.4/_curses.so *** WARNING: renaming "_curses" since importing it failed: ld.so.1: ./python: fatal: relocation error: file build/lib.solaris-2.8-sun4u-2.4/_curses.so: symbol mvwgetnstr: referenced symbol not found building '_curses_panel' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC - fno-strict-aliasing -I. -I/tmp/build-gnu20746/Python- 2.4.2/./Include -I/usr/gnu/include -I/usr/local/include - I/tmp/build-gnu20746/Python-2.4.2/Include -I/tmp/build- gnu20746/Python-2.4.2 -c /tmp/build-gnu20746/Python- 2.4.2/Modules/_curses_panel.c -o build/temp.solaris-2.8- sun4u-2.4/_curses_panel.o gcc -shared build/temp.solaris-2.8-sun4u- 2.4/_curses_panel.o -L/usr/gnu/lib -L/usr/local/lib -lpanel - lcurses -ltermcap -o build/lib.solaris-2.8-sun4u- 2.4/_curses_panel.so *** WARNING: renaming "_curses_panel" since importing it failed: No module named _curses |
|||
msg26571 - (view) | Author: Nelson Arzola (narzola) | Date: 2005-10-29 08:01 | |
Logged In: YES user_id=39023 I would like to add that this problem also exists under Solaris 2.10. For some reason, mvwgetnstr is not defined under Solaris 10. When I use nm to get the symbols out of /usr/lib/libcurses.so.1, I do not find it. When I replace the two references in /dsk/data0/build/Python-2.4.2/Modules/_cursesmodule.c from mvwgetnstr to mvwgetnwstr, I was able to compile the module and pass the appropriate tests. Since I don't use curses, I really don't have a good way to test this. |
|||
msg26572 - (view) | Author: A.M. Kuchling (akuchling) * | Date: 2005-11-22 14:45 | |
Logged In: YES user_id=11375 One use of mvwgetnwstr in the module is replaced by a manual emulation of the function, if STRICT_SYSV_CURSES is true, but another use isn't replaced; I suspect this is the problem. I've attached a patch that ensures that mvwgetnstr() is only used when STRICT_SYSV_CURSES is undefined. Please let me know if this fixes the compilation problem. |
|||
msg26573 - (view) | Author: Tim Mooney (enchanter) | Date: 2006-05-15 02:06 | |
Logged In: YES user_id=36222 First, your patch does fix the problem. Next, Solaris 8+ *does* have mvwgetnwstr, the problem is that it's in the X/Open version of the curses library, not the (old, stinky, backwards-compatible) default version of libcurses. Solaris 10's man pages do a much better job of explaining the differences, on 10 one can look at man -s 3xcurses libcurses vs. man libcurses If you want to compile and link against the X/Open version of the curses library, you need to have -I/usr/xpg4/include in CPPFLAGS and CFLAGS, and either -L/usr/xpg4/lib or -L/usr/xpg4/lib/64 (depending on whether you're compiling for ILP32 or LP64). /usr/xpg4/lib and /usr/xpg4/lib/64 are also not in the default loader search path, so you either need to modify the loader search path (man crle) or your also need a -R/usr/xpg4/lib or -R/usr/xpg4/lib/64 in LDFLAGS too. Because of the way the _cursesmodule is currently written, though, it assumes that if __sun is defined as a preprocessor symbol, STRICT_SYSV_CURSES should be defined, which actually causes problems if you try build with with newer X/Open curses. It should be possible to support building against either curses implementation on Solaris, but for now your patch at least makes _cursesmodule compile with the default version. |
|||
msg26574 - (view) | Author: A.M. Kuchling (akuchling) * | Date: 2006-09-07 13:37 | |
Logged In: YES user_id=11375 Committed in rev.50845, so this fix will be in Python 2.5. Closing this bug. If someone wants to submit a patch to use X/Open curses, please do. (I don't have a Solaris machine, so I can't assemble a patch myself.) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:13 | admin | set | github: 42473 |
2005-10-12 12:21:05 | arkoenig | create |