GNOME Bugzilla – Bug 398567
undefined symbol: libxml_xmlDocPtrWrap
Last modified: 2017-07-26 17:55:43 UTC
calling "gst.xml_write(element)" gives the following output: python: symbol lookup error: /usr/lib/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Does this still happen? Which version of libxml have you installed?
Created attachment 83709 [details] Test pygst xml output
It's still happening and I've tested it on Ubuntu Feisty with the latest updates. It's using libxml2 2.6.27. The above test case demonstrates.
Really critical indeed. So that symbol is contained in the libxml2 python module (site-packages/libxml2mod.so). It is defined as extern in the gst module, but for some reason when it tries to resolve that symbol after the libxml2 python module is loaded.. it fails. I'm wondering if this is REALLY the best way to do that.
The problem was that the libxml2 module was being loaded without GLOBAL and LAZY flags. 2007-03-02 Edward Hervey <edward@fluendo.com> * gst/__init__.py: Import libxml2 (if available) at import time with GLOBAL and LAZY flags. Fixes #398567
This doesn't help for Cygwin or MinGW, as the undefined symbol causes the *link* to fail. Patching gst/__init__.py doesn't help; another way needs to be found to import required libxml2 code without using its symbols. While many python modules depend on others, pygtk included, not one does so in the way done here. Please reopen.
Repoening. Same comment as previous.
*** Bug 473234 has been marked as a duplicate of this bug. ***
Any suggestions on how to fix this ? Or rather (question to the cygwin ports maintainer), any pointers to python packages with the same goals, but doing it differently ?
How about something similar to the xmlNodePtrWrap handling in arg-types.py?
Cygwin maintainers: We are handling it exactly the same way as xmlNodePtrWrap in arg-types.py. Could you attach the config.log, config.h and generated gst/gst.c ?
Is this still an issues?
Yes.
Created attachment 188815 [details] [review] gst: avoid unresolved xml symbol This is one way to 'fix' this. That is, it least it allows building gst-python form mingw and cygwin, at the expense of a non-functional gst_xml_write wrapper, which is hardly a great loss and provides a whole more gst-python for e.g. cygwin than currently (= none, out-of-the-box).
Closing this bug now, gst-python is only an extension module to pygi now and this bug doesn't make much sense anymore in this context.
A similar bug report, but with less information: https://bugzilla.gnome.org/show_bug.cgi?id=310263