[Python-Dev] Embedding demos are broken
Barry A. Warsaw
barry@digicool.com
Tue, 20 Feb 2001 15:58:43 -0500
Something changed recently, and now the Demo/embed programs are
broken, e.g.
% ./loop pass 2
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Segmentation fault (core dumped)
The crash is happening in the second call to init_exceptions()
(gdb) where
#0 PyModule_GetDict (m=0x0) at Objects/moduleobject.c:40
#1 0x8075ea8 in init_exceptions () at Python/exceptions.c:1058
#2 0x8051880 in Py_Initialize () at Python/pythonrun.c:147
#3 0x80516db in main (argc=3, argv=0xbffffa34) at loop.c:28
because the attempt to import __builtin__ returns NULL. I don't have
time right now to look any deeper, but I suspect that the crash may be
due to changes in the semantics of PyImport_ImportModule() which now
goes through __import__.
I'm posting this in case someone with spare cycles can look at it.
-Barry