Problem building Python 2.5.2 curses module on HP/UX 11.11


M

Mike Kent

I'm having a problem building the Python 2.5.2 curses module on HP/UX
11.11 using gcc 3.3.6, and was hoping someone had a solution.
Compiling Modules/_cursesmodule.c is giving several warnings, but no
errors. The relevant compile/link output is below. The key output
line is:

*** WARNING: renaming "_curses" since importing it failed: dynamic
module does n
ot define init function (init_curses)

So, given that there are no actual errors during the compile, and the
warnings are probably benign, does anyone know what would cause the
resulting compiled module to NOT have the init function?

Full build output:

building '_curses' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-
prototype
s -I. -I/usr/local/src/xyzpython/Python-2.5.2/./Include -I/usr/local/
xyz/python/
include -I. -IInclude -I./Include -I/usr/local/include -I/usr/local/
src/xyzpytho
n/Python-2.5.2/Include -I/usr/local/src/xyzpython/Python-2.5.2 -c /usr/
local/src
/xyzpython/Python-2.5.2/Modules/_cursesmodule.c -o build/temp.hp-ux-B.
11.11-9000
-800-2.5/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.o
In file included from /usr/local/src/xyzpython/Python-2.5.2/Include/
Python.h:8,
from /usr/local/src/xyzpython/Python-2.5.2/Modules/
_cursesmodul
e.c:102:
pyconfig.h:942:1: warning: "_POSIX_C_SOURCE" redefined
<command line>:6:1: warning: this is the location of the previous
definition
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: In
function `PyCu
rsesWindow_AddStr':
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:449:
warning: impl
icit declaration of function `getattrs'
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: In
function `PyCu
rses_getsyx':
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:1712:
warning: imp
licit declaration of function `getsyx'
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: In
function `PyCu
rses_setsyx':
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:2369:
warning: imp
licit declaration of function `setsyx'
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: In
function `PyCu
rses_UnCtrl':
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:2499:
warning: imp
licit declaration of function `unctrl'
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:2499:
warning: pas
sing arg 1 of `PyString_FromString' makes pointer from integer without
a cast
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: In
function `PyCu
rses_getsyx':
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:1708:
warning: `x'
might be used uninitialized in this function
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:1708:
warning: `y'
might be used uninitialized in this function
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c: At top
level:
/usr/local/src/xyzpython/Python-2.5.2/Modules/_cursesmodule.c:2266:
warning: `up
date_lines_cols' defined but not used
ld -b build/temp.hp-ux-B.11.11-9000-800-2.5/usr/local/src/xyzpython/
Python-2.5.2
/Modules/_cursesmodule.o -L/usr/local/xyz/python/lib -L/usr/local/lib -
lncurses
-o build/lib.hp-ux-B.11.11-9000-800-2.5/_curses.sl
*** WARNING: renaming "_curses" since importing it failed: dynamic
module does n
ot define init function (init_curses)
 
Ad

Advertisements

M

Martin v. Löwis

So, given that there are no actual errors during the compile, and the
warnings are probably benign, does anyone know what would cause the
resulting compiled module to NOT have the init function?

Can you do nm(1) on the module? It's now called _curses_failed.sl

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top