Software/Geant4/Installation/Xerces-C

From PBTWiki
Revision as of 15:36, 24 May 2016 by SimonJolly (talk | contribs) (Created page with "== Introduction == <code>Xerces-C++</code> is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data.

Geant4 requires the Xerces-C++ headers and libraries compiled against the C++11 standard in order to provide support for GDML geometry descriptions.

Details

Website
http://xerces.apache.org/xerces-c/
Source URL
http://www.apache.org/dist/xerces/c/3/sources/
Installed version
3.1.3 (17 Feb 2016)
Source code
src/geant4-prerequisites/xerces-c/xerces-c-3.1.3.tar.gz

Installation Notes

The Xerces-C++ website provides some useful instructions on Building and Installing Xerces-C++.

For installation, Xerces-C++ does not support installation into a sandbox directory (i.e. there are no options prefix or DESTDIR defined for command make install) and must be given the installation directory with the -prefix option. As such, to recompile Xerces-C++ for different target directories, the configure script must be rerun with a modified -prefix /path/to/dest option. This has to be managed manually as can be seen in the installation commands below.

Installation

When downloading software, the downloaded tarball (or other Zip archive) should be placed in an appropriately named directory in /unix/pbt/software/src: the instructions below assume that the directory is /unix/pbt/software/src/geant4-prerequisites/xerces-c.

The source code should then be extracted into a suitable subdirectory in /unix/pbt/software/build. The extracted source code directory can only be deleted once the software has been built and installed.

Source Code Extraction

cd /unix/pbt/software/src/geant4-prerequisites/xerces-c
tar -xvz -f xerces-c-3.1.3.tar.gz

Build And Install

These instructions assume the code has already been built for the Development environment before building for the Production environment, so some of the commands for the Production install are omitted. Although it is highly discouraged to install straight to the Production environment without first compiling a Development version, it is possible to do so by adding in the directory creation commands at the start.

Development Environment

cd /unix/pbt/software/build
mkdir -pv xerces-c/xerces-c-3.1.3
cd xerces-c/xerces-c-3.1.3
../../../src/geant4-prerequisites/xerces-c/xerces-c/configure -prefix /unix/pbt/software/dev/xerces-c-3.1.3
make
make install

Production Environment

cd /unix/pbt/software/build/xerces-c/xerces-c-3.1.3
../../../src/geant4-prerequisites/xerces-c/xerces-c/configure -prefix /unix/pbt/software/dev/xerces-c-3.1.3
make
make install