GNOME Bugzilla – Bug 622023
libxml has undefined references
Last modified: 2012-05-15 12:17:37 UTC
This has been reported downstream: http://bugs.gentoo.org/show_bug.cgi?id=246745 More information about this can be seen at: http://www.gentoo.org/proj/en/qa/asneeded.xml The error can be reproduced when compiling with the following LDFLAGS: LDFLAGS="${LDFLAGS} -Wl,-z,-defs -Wl,--no-undefined" And is: libxml2-py.c:(.text+0x10969): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x1097f): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlXPathNormalizeFunction': libxml2-py.c:(.text+0x109bc): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x109cb): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlFreeNs': libxml2-py.c:(.text+0x10a09): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10a19): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlValidCtxtNormalizeAttributeValue': libxml2-py.c:(.text+0x10a6e): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10a82): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlSchemaSetValidOptions': libxml2-py.c:(.text+0x10ae9): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10afe): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlCheckLanguageID': libxml2-py.c:(.text+0x10b36): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlRelaxNGFreeParserCtxt': libxml2-py.c:(.text+0x10b79): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10b89): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlXPathInit': libxml2-py.c:(.text+0x10bbc): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlUCSIsMalayalam': libxml2-py.c:(.text+0x10be6): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlGetID': libxml2-py.c:(.text+0x10c29): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10c3f): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlValidateOneElement': libxml2-py.c:(.text+0x10c80): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10c94): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlNanoFTPCleanup': libxml2-py.c:(.text+0x10cec): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlSchemaWhiteSpaceReplace': libxml2-py.c:(.text+0x10d16): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlUCSIsHangulJamo': libxml2-py.c:(.text+0x10d56): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlDebugDumpNodeList': libxml2-py.c:(.text+0x10da3): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10db3): undefined reference to `_Py_NoneStruct' libxml2-py.c:(.text+0x10dc5): undefined reference to `PyFile_Type' libxml2-py.c:(.text+0x10dcf): undefined reference to `PyType_IsSubtype' libxml2-py.c:(.text+0x10de0): undefined reference to `PyFile_AsFile' .libs/libxml2-py.o: In function `libxml_xmlUCSIsMathematicalAlphanumericSymbols': libxml2-py.c:(.text+0x10e36): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlFreeParserInputBuffer': libxml2-py.c:(.text+0x10e79): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10e89): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlTextReaderExpand': libxml2-py.c:(.text+0x10ec6): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10edc): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlReaderForFile': libxml2-py.c:(.text+0x10f20): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlStrstr': libxml2-py.c:(.text+0x10f69): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlXPathNsLookup': libxml2-py.c:(.text+0x10fa9): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x10fbf): undefined reference to `_Py_NoneStruct' .libs/libxml2-py.o: In function `libxml_xmlUCSIsBopomofo': libxml2-py.c:(.text+0x10ff6): undefined reference to `PyArg_ParseTuple' .libs/libxml2-py.o: In function `libxml_xmlGetDocEntity': libxml2-py.c:(.text+0x11039): undefined reference to `PyArg_ParseTuple' libxml2-py.c:(.text+0x1104f): undefined reference to `_Py_NoneStruct' collect2: ld returned 1 exit status make[1]: *** [libxml2mod.la] Error 1 make[1]: Leaving directory `/var/tmp/portage/dev-libs/libxml2-2.7.7/work/libxml2-2.7.7/python-2.6' make: *** [all-recursive] Error 1 I attach full build.log Christian Ruppert suggested that this could be fixed running: sed -i -r -e 's:(@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD =.*):\1 -lpython$(PYTHON_VERSION):' python/Makefile.in
Created attachment 164031 [details] build.log
Could anyone look to the possible fix: sed -i -r -e 's:(@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD =.*):\1 -lpython$(PYTHON_VERSION):' python/Makefile.in ? Thanks a lot :-)
Created attachment 186209 [details] [review] libxml2-2.7.8-undefined.patch Patch
Okay, the patch is wrong in the sense that Makefile.in is a generated file and the fix should really go in Makefile.am , but that seems to work for me: http://git.gnome.org/browse/libxml2/commit/?id=1ea6b1412508776b788ad6056dc9fc11fd6c7227 This needs more review and testing but since this is commited, we should get those, thanks ! Daniel
Thanks a lot :D One question, do you have any idea about when a new libxml version will be released? We are needing to apply a lot of security fixes downstream from git, there are also a ton of other fixes not included in latest version. Thanks again :)
That was one of the last patches I needed to review, I will make an rc1 release within hours, announce it on the xml list and see how it goes for a week, then I will try to push the final release... So please give feedback to the rc1 which should show up within a few hours, Daniel