Appendix A. Installation

Table of Contents

Precompiled Binary Installation
Prerequisites
Linux RPM Distribution Kits
Microsoft Windows Installation Kit
Mac OS X Installation Kit
Source Installation
NeXus Source Code Distribution
Cygwin Kits

This section descibes how to install the NeXus API and details the requirements. The NeXus API is distributed under the terms of the GNU Lesser Public License.

The source code and binary versions for some popular platforms can be found on http://download.nexusformat.org/kits/. Up to date instructions can be found on the Wiki In case you need help feel free to contact the nexus mailing list.

Precompiled Binary Installation

Prerequisites

HDF5/HDF4

Since NeXus uses HDF as the main underlying binary format, it is necessary first to install the HDF subroutine libraries and include files before compiling the NeXus API. It is not usually necessary to download the HDF source code since precompiled object libraries exist for a variety of operating systems including Windows, Mac OS X, Linux, and various other flavors of Unix. Check the HDF web pages for more information: http://www.hdfgroup.org/

Packages for HDF4 and HDF5 are available for both Fedora (hdf, hdf5, hdf-devel, hdf5-devel) and Ubuntu/Debian (libhdf4g, libhdf5).

XML

The NeXus API also supports using XML as the underlying on-disk format. This uses the Mini-XML library, developed by Michael Sweet, which is also available as a precompiled binary library for several operating systems. Check the Mini-XML web pages for more information: http://www.minixml.org/

Packages for MXML are available for both Fedora (mxml, mxml-devel) and Ubuntu/Debian (libmxml1).

Linux RPM Distribution Kits

An installation kit (source or binary) can be downloaded from: http://download.nexusformat.org/kits/

A NeXus binary RPM (nexus-*.i386.rpm) contains ready compiled NeXus libraries whereas a source RPM (nexus-*.src.rpm) needs to be compiled into a binary RPM before it can be installed. In general, a binary RPM is installed using the command

rpm -Uvh file.i386.rpm

or, to change installation location from the default (e.g. /usr/local) area, using

rpm -Uvh --prefix /alternative/directory file.i386.rpm

If the binary RPMS are not the correct architecture for you (e.g. you need x86_64 rather than i386) or the binary RPM requires libraries (e.g. HDF4) that you do not have, you can instead rebuild a source RPM (.src.rpm) to generate the correct binary RPM for you machine. Download the source RPM file and then run

rpmbuild --rebuild file.src.rpm

This should generate a binary RPM file which you can install as above. Be careful if you think about specifying an alternative buildroot for rpmbuild by using --buildroot option as the "buildroot" directory tree will get remove (so --buildroot / is a really bad idea). Only change buildroot it if the default area turns out not to be big enough to compile the package.

If you are using Fedora, then you can install all the dependencies by typing

yum install hdf hdf-devel hdf5 hdf5-devel mxml mxml-devel

Microsoft Windows Installation Kit

A Windows MSI based installation kit is available and can be downloaded from:http://download.nexusformat.org/kits/windows/

Mac OS X Installation Kit

An installation disk image (.dmg) can be downloaded from:http://download.nexusformat.org/kits/macosx/