Python1-5.2/Demo/embed/demo.c core dump

root wpostma at ztr.com
Mon Jan 31 13:56:24 EST 2000


I am having fun trying to get the basic "embedding" demo to compile,
link and run.

First, on Linux, I needed to add -lpthread to the Library options in the
makefile, and I had to remove -lsocket.   Any idea why that would be?
Hmm.  Do I need to install libsocket? Couldn't find any libsock*.rpm on
my RedHat 6.1 CD so I have no idea what libsocket is.

Anyways, I just removed -lsocket and it links okay.  Then I try to run
it and I get the "Hello Brave New World" message (from printf) and the
first attempt to access Python causes a core dump.   I ran inside gdb
and the crash more specifically appears to be:

Program received signal SIGSEGV, Segmentation fault.
0x400ca093 in _IO_vfprintf (s=0x80a8a78, format=0x8090c04 "(",
ap=0xbffffb5c)
    at vfprintf.c:1059

Any ideas what I'm doing wrong and why this is crashing?

--

Warren Postma
ZTR Control Systems






More information about the Python-list mailing list