Baffling extension module compile problem
Greg Ewing
see at my.signature
Wed May 9 22:50:23 EDT 2001
I have a REALLY screwy problem.
I'm working on a C extension module. If I issue
my 'make' command from the shell, everything
is fine.
But if I use the 'make' command in Emacs, the
resulting module causes a seg fault when I
import it!
Exactly the same compile/link commands are being
executed in both cases, and proceed without error.
My LD_LIBRARY_PATH is the same in both environments
as far as I can tell.
Examining the core file after the crash reveals
that somehow Py_InitModule4 is being called with
junk for the first argument (i.e. the module name).
This is the only part of the code that is executed
on import:
static PyMethodDef LSInter_methods[] = {
{"fit", LSInter_fit, METH_VARARGS},
{NULL, NULL}
};
DL_EXPORT(void)
initLSInter()
{
PyObject *m, *d;
m = Py_InitModule("LSInter", LSInter_methods);
d = PyModule_GetDict(m);
}
Does anyone have any idea what sort of weird
juju is going on?
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list