wiki:InstallXmlTools

XML libraries

1. XSD

XSD requires a bit of work.

Two different binaries are available for 32 and 64 bit.

Download the tarball for version 3.2.0 and unpack in the Chaste home directory. We also create a symlink for the executable in ~/bin.

In the following instructions we do 64 bit, you may need to change the xsd tar and folder name.

cd
wget http://codesynthesis.com/download/xsd/3.2/linux-gnu/x86_64/xsd-3.2.0-x86_64-linux-gnu.tar.bz2
tar -xjf xsd-3.2.0-x86_64-linux-gnu.tar.bz2
ln -s ~/xsd-3.2.0-x86_64-linux-gnu/bin/xsd ~/bin/xsd

2. Xerces

For Fedora machines:

yum install xerces-c xerces-c-devel

For Ubuntu machines:

sudo aptitude -y install libxerces27-dev

Note that the bob user also needs XSD, for #include files.

Static linking

If you want to create a statically linked version of the Chaste executable, then you need to build xerces from source rather than installing the package, since by default it only provides a shared library. Note: edit the "/home/chaste/" in the runConfigure line below appropriately.

# Build
wget http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/source/xerces-c-src_2_7_0.tar.gz
tar -zxf xerces-c-src_2_7_0.tar.gz
cd xerces-c-src_2_7_0/
export XERCESCROOT=`pwd`
cd $XERCESCROOT/src/xercesc
./runConfigure -plinux -cgcc -xg++ -P/home/chaste/xerces -l-static
make
make install
# Create a static library (this is a bit of a hack!)
cd $XERCESCROOT/obj/LINUX
ar cru libxerces-c.a `find . -name "*.o"`
mv libxerces-c.a /home/chaste/xerces/lib/

You may also need to adjust your hostconfig settings to use the static libxerces-c. Currently only those machines using chaste32.py use the static library.

Last modified 8 years ago Last modified on May 30, 2012, 8:28:29 PM

Attachments (1)