Xerces-C is the C++ XML Parser from the Apache Software Foundation. It is used for all XML processing in OpenSAML and Shibboleth.
Project Website: http://xerces.apache.org/xerces-c/
Versions of OpenSAML prior to 2.2 (and Shibboleth 2.2) support Xerces the 2.x release, 2.8.0 being the suggested version. As of OpenSAML 2.2, Xerces 3.x is also now supported, and is the suggested version to use going forward.
Xerces 3.x is fully autoconf-based, with a standard
configure script. The XERCESCROOT variable is no longer required.
Something to keep in mind is that the new configuration script is designed to auto-detect certain dependencies, and will link Xerces to libcurl if it's not told not to do so. This is usually ok, but will result in anything linked to Xerces being linked indirectly to OpenSSL, which may create conflicts in some environments. To avoid this, you can override
configure and tell it to use an alternate "NetAccessor" implementation, e.g.
Xerces 2.x relies on an unusual script to configure itself, and there are a lot of switches to control the compiler used, thread support, etc. Typically, it's best to be explicit and specify every option you care about, including platform (-p), compilers (-c and -x), bitness (-b 32 or -b 64), thread support (-r pthread), and so on.
On OS X, you MUST use the "socket" NetAccessor and the "icu" transcoder options to avoid a dependency on so-called CF apis that do not work under Apache due to the use of the fork system call. You must set the ICUROOT environment variable to the directory you installed it (export ICUROOT=/opt/shibboleth-sp).
Finally, you will need to set the XERCESCROOT variable in your shell when configuring the package. It should contain the path to the root directory of your unpacked source tree.
The project is now producing binaries for use with VS 2008 projects, and this is suitable for Shibboleth 2.2. Older 1.x releases require VS6 binaries, and these can be created using the source package, which contains suitable VS6 project files.
The following files dependencies subdirectory of the cpp-msbuild project can be used to automate the build:
Config.bat to set up the environment
xerces-compile.bat [ win32| x64 ] to compile (requires the appropriate VS command line)