Software/Geant4/Installation/Xerces-C: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
(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 ...")
 
No edit summary
Line 36: Line 36:
=== Build And Install ===
=== 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.   
It is possible to build for the '''Production''' environment without deleting the <code>Xerces-C build</code> directory created for the '''Development''' installation, meaning that significant time is saved when running <code>make</code>. 
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.  
However, it isn't recommended to do so as the '''Production''' installation ends up referencing components within <code>/unix/pbt/software/dev</code> which is not desirable as the two environments are no longer independent.   
As such, these instructions assume one is building from scratch for each environment: to do so, make sure that the <code>build/qt</code> directory is deleted before recreating it for the subsequent build and install.
 
Also, although it is possible to install straight to the '''Production''' environment, it is highly discouraged to do so without first compiling a '''Development''' version.  


==== Development Environment ====
==== Development Environment ====
Line 53: Line 56:


<pre>
<pre>
cd /unix/pbt/software/build/xerces-c/xerces-c-3.1.3
cd /unix/pbt/software/build
../../../src/geant4-prerequisites/xerces-c/xerces-c/configure -prefix /unix/pbt/software/dev/xerces-c-3.1.3
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/prod-sl6
make
make
make install
make install
</pre>
</pre>

Revision as of 15:54, 24 May 2016

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

It is possible to build for the Production environment without deleting the Xerces-C build directory created for the Development installation, meaning that significant time is saved when running make. However, it isn't recommended to do so as the Production installation ends up referencing components within /unix/pbt/software/dev which is not desirable as the two environments are no longer independent. As such, these instructions assume one is building from scratch for each environment: to do so, make sure that the build/qt directory is deleted before recreating it for the subsequent build and install.

Also, although it is possible to install straight to the Production environment, it is highly discouraged to do so without first compiling a Development version.

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
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/prod-sl6
make
make install