Bug 64134
Summary: | Autoconf m4 macro provided does not work as includes have been moved relative to previous version. | ||
---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | Alistair Riddoch <alriddoch> |
Component: | libxml2 | Assignee: | Daniel Veillard <veillard> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | skipjack-beta2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-04-26 09:29:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Alistair Riddoch
2002-04-26 09:03:20 UTC
Libxml2 include files must be stored in $prefix/include/libxml2 Libxml1 include files must be stored in $prefix/include/gnome-xml Anything present in $prefix/include/libxml is an error and MUST be removed. The way to gather the include flags (and libraries) for libxml2 and libxml is to query xml2-config and xml-config respectively. I do not support the AM_PATH_XML2/AM_PATH_XML autoconf constructs since I'm unable to figure out how to maintain or debug them. If you have a specific suggestion on how to fix AM_PATH_XML? I take patches but again it is not the supported way to get compile-time and link-time flags for libxml and libxml2 Daniel The AM_PATH_XML2 macro uses xml2-config to gets its include flags. The problem is that the tests, and most software I have come across, expect xml2-config to give them the full path for the directory which contains the libxml2 header files, which in this case is /usr/include/libxml2/libxml, but xml2-config only returns /usr/include/libxml2. If this change is intentional, then the m4 macro can be fixed by changing the line that includes xmlversion.h to include libxml/xmlversion.h, and source which uses libxml2 will need to be modified. I will be happy with either a fix to xml2-config, or a clarification that the output of xml2-config is correct, and source needs to be changed. Thanks for the fast response. libxml2-2.4.10-0.7x.2 exhibits what I believe is the correct behavoir. Includes are in /usr/include/libxml2/libxml. xml2-config --cflags give this following: -I/usr/include/libxml2/libxml -I/usr/include/libxml2 -I/include No, the libxml2 include path *MUST* be $prefix/libxml2 Applications *MUST* include the headers as #include <libxml/tree.h> Trying to include directly <tree.h> or <parser.h> for examples conflicts with the namespace of of some code C++ classes (STL for example). I confirm that the behaviour of xml2-config --cflags is correct and that your code must be modified to use the fully namespaced include path, This is NOT a bug, Daniel Agreed, thanks for the clarification. I note that the m4 macro in libxml2 2.4.20 already addresses this issue. Thanks again. Yes this was fixed on-purpose trying to put it in time for the release, yours, Daniel |