While I *think* this should be a trivial fix for the problem: diff -r e005b58d83b8 Cython/Compiler/ModuleNode.py --- a/Cython/Compiler/ModuleNode.py Tue Apr 08 01:25:09 2008 -0700 +++ b/Cython/Compiler/ModuleNode.py Tue Apr 15 14:22:51 2008 +0200 @@ -1443,10 +1443,10 @@ class ModuleNode(Nodes.Node, Nodes.Block header = "PyMODINIT_FUNC init2%s(void)" % env.module_name code.putln("%s; /*proto*/" % header) code.putln("%s {" % header) + code.put_var_declarations(env.temp_entries) code.putln("static int __Pyx_unique = 0;") code.putln("if (__Pyx_unique==1) return;") code.putln("__Pyx_unique = 1;") - code.put_var_declarations(env.temp_entries) code.putln("/*--- Execution code ---*/") code.mark_pos(None) self.body.generate_execution_code(code) ... I currently cannot test this, as I then run into other lxml compilation problems, see below. However, I see these other problems also with gcc 4.2.1, so they don't seem related to the compiler version, but rather be either an lxml-specific or a more general cython problem. gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/apps/prod//include -I/apps/prod//include/libxml2 -I/apps/prod/include/libxml2 -I/apps/prod/include -I/apps/pydev/include/python2.4 -c src/lxml/lxml.objectify.c -o build/temp.solaris-2.8-sun4u-2.4/src/lxml/lxml.objectify.o -w In file included from src/lxml/lxml.objectify.c:52: src/lxml/lxml.etree_api.h: In function `import_lxml__etree': src/lxml/lxml.etree_api.h:219: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:220: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:221: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:222: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:223: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:224: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:225: sizeof applied to an incomplete type src/lxml/lxml.etree_api.h:226: sizeof applied to an incomplete type src/lxml/lxml.objectify.c: At top level: src/lxml/lxml.objectify.c:248: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:260: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:274: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:286: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:310: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:322: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c:334: field `__pyx_base' has incomplete type src/lxml/lxml.objectify.c: In function `__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__': src/lxml/lxml.objectify.c:1150: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:1150: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:1165: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:1216: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__': src/lxml/lxml.objectify.c:1714: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__': src/lxml/lxml.objectify.c:2349: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__lookupChild': src/lxml/lxml.objectify.c:3438: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:3513: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__buildChildTag': src/lxml/lxml.objectify.c:3702: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:3702: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__replaceElement': src/lxml/lxml.objectify.c:3781: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:3781: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:3897: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__appendValue': src/lxml/lxml.objectify.c:3937: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:3937: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4043: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__setElementValue': src/lxml/lxml.objectify.c:4136: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4285: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4298: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__setSlice': src/lxml/lxml.objectify.c:4497: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4497: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4521: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4841: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4853: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4867: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4867: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4867: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:4940: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c:5026: dereferencing pointer to incomplete type src/lxml/lxml.objectify.c: In function `__pyx_f_4lxml_9objectify__strValueOf': src/lxml/lxml.objectify.c:8097: dereferencing pointer to incomplete type if (__Pyx_ImportFunction(module, "previousElement", (void**)&previousElement, "xmlNode *(xmlNode *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "appendChild", (void**)&appendChild, "void (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "pyunicode", (void**)&pyunicode, "PyObject *(char *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "utf8", (void**)&utf8, "PyObject *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "getNsTag", (void**)&getNsTag, "PyObject *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "namespacedName", (void**)&namespacedName, "PyObject *(xmlNode *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "namespacedNameFromNsName", (void**)&namespacedNameFromNsName, "PyObject *(char *, char *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "iteratorStoreNext", (void**)&iteratorStoreNext, "void (struct LxmlElementIterator *, struct LxmlElement *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "initTagMatch", (void**)&initTagMatch, "void (struct LxmlElementTagMatcher *, PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "findOrBuildNodeNsPrefix", (void**)&findOrBuildNodeNsPrefix, "xmlNs *(struct LxmlDocument *, xmlNode *, char *, char *)") < 0) goto bad; Py_DECREF(module); module = 0; __pyx_ptype_4lxml_5etree__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument)); if (!__pyx_ptype_4lxml_5etree__Document) goto bad; __pyx_ptype_4lxml_5etree__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement)); if (!__pyx_ptype_4lxml_5etree__Element) goto bad; __pyx_ptype_4lxml_5etree__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree)); if (!__pyx_ptype_4lxml_5etree__ElementTree) goto bad; __pyx_ptype_4lxml_5etree__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher)); if (!__pyx_ptype_4lxml_5etree__ElementTagMatcher) goto bad; __pyx_ptype_4lxml_5etree__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator)); if (!__pyx_ptype_4lxml_5etree__ElementIterator) goto bad; __pyx_ptype_4lxml_5etree_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase)); if (!__pyx_ptype_4lxml_5etree_ElementBase) goto bad; __pyx_ptype_4lxml_5etree_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup)); if (!__pyx_ptype_4lxml_5etree_ElementClassLookup) goto bad; __pyx_ptype_4lxml_5etree_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup)); if (!__pyx_ptype_4lxml_5etree_FallbackElementClassLookup) goto bad; return 0; bad: Py_XDECREF(module); return -1; }