[Pyrex] Fatal Pyrex Bug - missing '__pyx_knnnp' declarations

David McNab david at rebirthing.co.nz
Wed Jun 16 04:25:37 CEST 2004


Hi,

I'm compiling a large .c file generated by pyrex, and am getting a lot 
of errors like:

module.c:11869: error: `__pyx_k198p' undeclared here (not in a function)
module.c:11869: error: initializer element is not constant
module.c:11869: error: (near initialization for `__pyx_string_tab[80].p')
module.c:11869: error: initializer element is not constant
module.c:11869: error: (near initialization for `__pyx_string_tab[80]')
module.c:11870: error: initializer element is not constant
module.c:11870: error: (near initialization for `__pyx_string_tab[81]')

On looking in the c file, i see a lot of declarations like:

static PyObject *__pyx_k177p;

However, it seems Pyrex isn't generating enough of these declarations.

If I manually insert these defs, the errors go away.

Greg - let me know if you want a copy of the .pyx which triggers this bug.

In the meantime, I'll cut a python script which parses gcc output and 
inserts the missing defs.

-- 
Cheers
David




More information about the Pyrex mailing list