I tried to build latest Python sources with Sun C compiler on Solaris snv_145 (sparc or x86)
There is no issue to build the binary, but then Python's
harness runs it as: 'python -E ./setup.py build' it core dumps.
Actually, Python's version and Sun compiler versions are not essential.
I tried viariety of them, and all produce the same core dump.
I ran dbx with this and pinpointed the place:
At some moment python binary calls rlinit_terminal_io() from
open source readline.so library, which in turn invokes kernel's tgetent()
function from libcurses.so.2. That tgetent() function crashes on the
following line where cur_term is nil:
if (strcmp(cur_term->_term, name) == 0)
The top of crashed stack looks like this:
t@1 (l@1) signal SEGV (no mapping at the fault address) in tgetent at line 65 in file "tgetent.c"
65 if (strcmp(cur_term->_term, name) == 0)
(dbx) print name
name = 0x8047a4d "sun-cmd"
(dbx) print cur_term
cur_term = (nil)
current thread: t@1
=> tgetent(buffer = 0x8786dd0 "", name = 0x8047a4d "sun-cmd"), line 65 in "tgetent.c"
 rlinit_terminal_io(terminal_name = 0x8047a4d "sun-cmd"), line 460 in "terminal.c"
 readline_initialize_everything(), line 1066 in "readline.c"
 rl_initialize(), line 968 in "readline.c"
 setup_readline(), line 884 in "readline.c"
 PyInit_readline(), line 1133 in "readline.c"
 PyImportLoadDynamicModule(name = 0x8747698 "readline", pathname = 0x8656e38 "build/lib.solaris-2.11-i86pc-3.2-pydebug/readline.so", fp = (nil)), line 57 in "importdl.c"
May be to prevent this crash I need to define some
environment variable which ultimately will initialize 'cur_term' global?