Issue1651427
Created on 2007-02-03 21:18 by guichaz, last changed 2010-09-16 20:09 by BreamoreBoy. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| config.log.bz2 | guichaz, 2007-02-03 21:18 | The full bzip2ed config.log | ||
| Messages (4) | |||
|---|---|---|---|
| msg31173 - (view) | Author: guichaz (guichaz) | Date: 2007-02-03 21:18 | |
Compiling python-2.5 and trunk (r53624) on my Fedora Core 6 i386 works but does not use GNU readline because of the following excerpt from config.log: configure:21255: gcc -pthread -o conftest -O2 -march=i386 -mtune=pentium-m -fomit-frame-pointer conftest.c -lreadline -lpthread -l dl -lutil >&5 /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `PC' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tgetflag' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tgetent' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `UP' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tputs' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tgoto' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tgetnum' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `BC' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status This seems related to http://mail.python.org/pipermail/python-checkins/2006-January/048725.html python-2.4.4 works fine, but it does not contain the aforementionned commit. Thanks. |
|||
| msg31174 - (view) | Author: guichaz (guichaz) | Date: 2007-02-03 21:31 | |
And if you wonder why I complain about not using GNU readline, here is a simple test case:
------------------------------------------
import readline
import signal
from threading import Thread
Thread(target=lambda: raw_input('Press Control-C now')).start()
signal.pause()
------------------------------------------
With GNU readline, Ctrl-C would wake up the pause() and I would resort to dirty tricks to wake up the raw_input (dup2), but that's another story ;-)
With Python >= 2.5, Ctrl-C would segfault or in a debug build abort with:
Fatal Python error: Invalid thread state for this thread
and here is the corresponding stack trace:
Program terminated with signal 6, Aborted.
#0 0xb7f13410 in ?? ()
(gdb) bt
#0 0xb7f13410 in ?? ()
#1 0xb7c2daec in ?? ()
#2 0x00000006 in ?? ()
#3 0x000003b3 in ?? ()
#4 0x48f68d40 in raise () from /lib/libc.so.6
#5 0x48f6a591 in abort () from /lib/libc.so.6
#6 0x08111000 in Py_FatalError (msg=0x81720d4 "Invalid thread state for this thread") at Python/pythonrun.c:1562
#7 0x0810d142 in PyThreadState_Swap (newts=0x8219438) at Python/pystate.c:318
#8 0x080dbbb4 in PyEval_RestoreThread (tstate=0x8219438) at Python/ceval.c:316
#9 0x08139180 in PyOS_Readline (sys_stdin=0x49079420, sys_stdout=0x490794c0, prompt=0xb7e9eb3c "Press Control-C now")
at Parser/myreadline.c:210
#10 0x080d8dbc in builtin_raw_input (self=0x0, args=0xb7eafc74) at Python/bltinmodule.c:1747
#11 0x0814643e in PyCFunction_Call (func=0xb7ec6574, arg=0xb7eafc74, kw=0x0) at Objects/methodobject.c:73
#12 0x080e89ab in call_function (pp_stack=0xb7c2e234, oparg=1) at Python/ceval.c:3567
#13 0x080e4234 in PyEval_EvalFrameEx (f=0x821c0dc, throwflag=0) at Python/ceval.c:2279
#14 0x080e66cf in PyEval_EvalCodeEx (co=0xb7ef16e8, globals=0xb7edf174, locals=0x0, args=0xb7eb7048, argcount=0, kws=0xb7c46028,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2843
#15 0x08145b7d in function_call (func=0xb7ea8354, arg=0xb7eb7034, kw=0xb7eb03f4) at Objects/funcobject.c:517
#16 0x0805ff90 in PyObject_Call (func=0xb7ea8354, arg=0xb7eb7034, kw=0xb7eb03f4) at Objects/abstract.c:1858
#17 0x080e97e9 in ext_do_call (func=0xb7ea8354, pp_stack=0xb7c2e900, flags=3, na=0, nk=0) at Python/ceval.c:3847
#18 0x080e446e in PyEval_EvalFrameEx (f=0x821b9e4, throwflag=0) at Python/ceval.c:2319
#19 0x080e8de6 in fast_function (func=0xb7c42bc4, pp_stack=0xb7c2ef04, n=1, na=1, nk=0) at Python/ceval.c:3653
#20 0x080e8b41 in call_function (pp_stack=0xb7c2ef04, oparg=0) at Python/ceval.c:3588
#21 0x080e4234 in PyEval_EvalFrameEx (f=0x8215dec, throwflag=0) at Python/ceval.c:2279
#22 0x080e66cf in PyEval_EvalCodeEx (co=0xb7c33748, globals=0xb7ea6ad4, locals=0x0, args=0xb7eaf240, argcount=1, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2843
#23 0x08145b7d in function_call (func=0xb7c42c14, arg=0xb7eaf22c, kw=0x0) at Objects/funcobject.c:517
#24 0x0805ff90 in PyObject_Call (func=0xb7c42c14, arg=0xb7eaf22c, kw=0x0) at Objects/abstract.c:1858
#25 0x08069416 in instancemethod_call (func=0xb7c42c14, arg=0xb7eaf22c, kw=0x0) at Objects/classobject.c:2497
#26 0x0805ff90 in PyObject_Call (func=0xb7e8b2b4, arg=0xb7eb7034, kw=0x0) at Objects/abstract.c:1858
#27 0x080e81bb in PyEval_CallObjectWithKeywords (func=0xb7e8b2b4, arg=0xb7eb7034, kw=0x0) at Python/ceval.c:3436
#28 0x0811e8f1 in t_bootstrap (boot_raw=0xb7ebf3e8) at ./Modules/threadmodule.c:424
#29 0x490b33db in start_thread () from /lib/libpthread.so.0
#30 0x4900d26e in clone () from /lib/libc.so.6
So maybe there is more than the readline build requirement to fix ;-)
Thanks.
|
|||
| msg84649 - (view) | Author: Daniel Diniz (ajaksu2) | Date: 2009-03-30 21:06 | |
guichaz: can you confirm this for newer versions? |
|||
| msg116601 - (view) | Author: Mark Lawrence (BreamoreBoy) | Date: 2010-09-16 20:09 | |
I can't believe that this is still an issue over 3 1/2 years on. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-09-16 20:09:49 | BreamoreBoy | set | status: open -> closed nosy: + BreamoreBoy messages: + msg116601 resolution: out of date |
| 2009-03-30 21:06:52 | ajaksu2 | set | nosy: + ajaksu2 versions: + Python 2.6, Python 3.0, - Python 2.5 messages: + msg84649 priority: normal -> low type: behavior stage: test needed |
| 2007-02-03 21:18:36 | guichaz | create | |