Compilation with Xerces-C version 3.0.1 (current version) failes due to missing classes.
gapinski@chipotle:~/projects/ovaldi/trunk/project/linux> make
make[1]: Entering directory `/home/gapinski/projects/ovaldi/trunk/project/linux'
g++ -c -Wall -O -DLINUX -DPACKAGE_RPM -I/usr/local/include -I/usr/include -I../../src/linux -I../../src -I../../src/probes/unix -I../../src/probes/linux -I../../src/probes/independent -o ./Release/obj/Main.obj ../../src/Main.cpp
In file included from ../../src/Main.h:53,
from ../../src/Main.cpp:31:
../../src/XmlProcessor.h:43:38: error: xercesc/dom/DOMBuilder.hpp: No such file or directory
../../src/XmlProcessor.h:53:37: error: xercesc/dom/DOMWriter.hpp: No such file or directory
../../src/XmlProcessor.h:60:45: error: xercesc/dom/DOMEntityResolver.hpp: No such file or directory
../../src/XmlProcessor.h:61:42: error: xercesc/dom/DOMInputSource.hpp: No such file or directory
In file included from ../../src/Main.h:53,
from ../../src/Main.cpp:31:
../../src/XmlProcessor.h:74: error: expected class-name before ‘{’ token
../../src/XmlProcessor.h:79: error: ISO C++ forbids declaration of ‘DOMInputSource’ with no type
../../src/XmlProcessor.h:79: error: expected ‘;’ before ‘*’ token
../../src/XmlProcessor.h:119: error: ISO C++ forbids declaration of ‘DOMBuilder’ with no type
../../src/XmlProcessor.h:119: error: expected ‘;’ before ‘*’ token
In file included from ../../src/linux/ProbeFactory.h:49,
from ../../src/linux/ObjectCollector.h:36,
from ../../src/linux/DataCollector.h:35,
from ../../src/Main.h:58,
from ../../src/Main.cpp:31:
../../src/probes/linux/RPMInfoProbe.h:112: error: ‘int_32’ has not been declared
../../src/probes/linux/RPMInfoProbe.h:113: error: ‘int_32’ has not been declared
../../src/probes/linux/RPMInfoProbe.h:114: error: ‘int_32’ does not name a type
In file included from ../../src/linux/ProbeFactory.h:62,
from ../../src/linux/ObjectCollector.h:36,
from ../../src/linux/DataCollector.h:35,
from ../../src/Main.h:58,
from ../../src/Main.cpp:31:
../../src/probes/independent/XmlFileContentProbe.h:138: error: conflicting return type specified for ‘virtual unsigned int DummyEntityResolver::DoNothingBinInputStream::curPos() const’
/usr/include/xercesc/util/BinInputStream.hpp:41: error: overriding ‘virtual XMLFilePos xercesc_3_0::BinInputStream::curPos() const’
../../src/Main.cpp: In function ‘int main(int, char**)’:
../../src/Main.cpp:200: error: ‘strnicmp’ was not declared in this scope
make[1]: *** [Main.obj] Error 1
make[1]: Leaving directory `/home/gapinski/projects/ovaldi/trunk/project/linux'
make: *** [set-platform] Error 2
gapinski@chipotle:~/projects/ovaldi/trunk/project/linux>
(Hit create button too soon).
Latest Xerces-C class list is at http://xerces.apache.org/xerces-c/apiDocs-3/classes.html.
This compilation errors noted were on an openSUSE v11.2 system using the 11.2 software repository, in which Xerces-C v3.0.1 is provided (and Xerces-C v2.8.0 is not).
It appears that the most recent version (3.0.1) lacks some classes used by ovaldi; these had been present in Xerces-C v2.8.0 (http://xerces.apache.org/xerces-c/apiDocs-2/classes.html).
We have can look into the incompatibility, but at the moment we are tied to the older version of Xerces. The interpreter also uses xalan-c which has a dependency on xerces. See: http://xml.apache.org/xalan-c/install.html
Debian vote for this ticket too.
Debian maintainer of xerses already start migration to 3.0.0 and plan to remove 2.x versions of xerces from next Debian release (but not fact that this is happens)
For those of you that are following this issue, do you have a preferred alternative to xerces and xalan for xml, xpath, and xsl support inthe oval interpreter?
Hi,
Fedora has some patch for this [1], though it didn't get any testing yet, merely just that it compiles. Anyone's welcome to test/fix it.
[1] http://cvs.fedoraproject.org/viewvc/rpms/ovaldi/devel/ovaldi-5.6.4-xerces.patch?view=markup
Having a patch for xerces-c-3.0.1 is great, and if it works (I haven’t tested it yet), anyone who is interested in using it should feel free to do so. However, at the moment, we will not make the move to upgrade to xerces-c-3.0.1 in the next release of OVALDI. As an alternative, we would like to investigate what it would take to re-factor OVALDI to allow for different XML parsers and XSLT processors to be used. However, this will take some time and is currently a lower priority item for us. Does it seem like this re-factoring effort would be beneficial to OVALDI?
I'm trying to port ovaldi to Fedora 14 (and later ones). There is no alternative than to go with Xerces 3 because Xalan in Fedora is also patched so it doesn't support Xerces 2. Anyway, I managed to get over RPM related problems, but now I stucked with Xerces. The problem is that I have never used any DOM parser and this creates problems for me. What I would like is some tips on _where_ the problem could be and the rest I'll work out somehow. Details can be seen here:
https://bugzilla.redhat.com/show_bug.cgi?id=689730
OVALDI now supports Xerces 3 and Xalan 1.11. Support was added in r1691.