A warning about libxml2 includes.



To avoid confusion and be sure it won't turn into a big battle...

I commited the following fix to gnome-xml CVS head:

-------------------
* configure,in: it was reported quite a few times that
  xml2-config --cflags should not output
  -I$includeprefix/libxml2/libxml because libxml2 header names
  clashes with existing names like list.h from C++ stl.
  Includes should be #include<libxml/xxx.h> so ...
-------------------

  Basically currently xml2-config --cflags outputs 
  -I/usr/include/libxml2/libxml -I/usr/include/libxml2

which is bad because it means libxml2 headers are directly in the 
include path, and since libxml2 headers have "common" names also in
use by other libraries it makes very difficult to use this
as is. Libxml2 (like libxml) expects its includes to be retrieved
via:
   #include <libxml/tree.h>

So this should not break anything ... except if some components
use libxml2 headers witout their namespace like
   #include <tree.h>

I would really like that those use case be fixed. However if this
turns into a big problem for the build systems, I in this case allow
Jacob to revert that patch. Still again if this raises errors the
offending modules really ought to be fixed to used the prefixed
include.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]