Personal tools
You are here: Home Members cpascual Documents How to install Nexus (v 4.2) from sources

How to install Nexus (v 4.2) from sources

Installation instructions for Nexus Data Format from sources.



Important:the following instructions are for installation from sources. Alternatively, Bliss packages do exist (at least for SuSe 11.1_64 bit) and several binary distribution kits are available for different platforms from :

http://download.nexusformat.org/kits/

If installing from a binary package, make sure you also have at least hdf5, mxml and python-numpy installed in your system.

 

 

Step 1: Install dependencies

This section is divided into various subsections depending on the distribution and architecture of the host machine.

 

 

Step 1A: dependencies on Ubuntu 8.04 x86_64

All dependencies can be found on standard Ubuntu repositories. Use:

 

sudo apt-get install <package>

 

I used the following deb packages (note: nexus can be compiled without support for many of them, so you can choose not to install some of them):

 

libhdf4g-dev

libhdf5-serial-dev

libmxml1-dev

python-numpy

g++

g77

gfortran

doxygen

graphviz

 

Step 1B: dependencies on SuSe 10.2 i386

Download the following packages from http://www.nexusformat.org/Download :

hdf-4.2.1-1.i386.rpm

hdf5-1.6.4-1.i386.rpm

mxml-2.2.2-1.i386.rpm

 

Install them using:

sudo rpm -Uhv hdf-4.2.1-1.i386.rpm hdf5-1.6.4-1.i386.rpm mxml-2.2.2-1.i386.rpm

 

For the zlib package and other needed packages, use the SuSe standard packages (e.g. via Yast). Do not download the zlib package in http://www.nexusformat.org

Note: You may want to install also the g77 and gfortran packages, but I didn't try on SuSe. If they are not present, nexus will simply not be compiled with support for Fortran.

 

Step 1C: dependencies on SuSe 11.1 ix86_64

Install the following packages from the standard repositories (we do not care about HDF4 support):

        hdf5
        hdf5-devel
        mxml
        mxml-devel
        libblas3
        liblapack3

Also python-numpy (not in the standard repository, but can be found in http://software.opensuse.org/search ) :

I installed it doing:
sudo rpm -i http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_11.1/x86_64/python-numpy-1.3.0-2.1.x86_64.rpm

 


Step 2: Download the sources for Nexus.


Step 2A: Download the sources for Nexus-4.2.0 (latest estable version).

The source tarball for nexus 4.2.0 (latest release at the moment of writing) can be found in

http://download.nexusformat.org/kits/

 

You can untar it with:

tar -xvzf nexus-4.2.0.tar.gz

 

Step 2B: Download the sources for Nexus from SVN.

Alternatively, the bleeding edge sources can also be obtained from the subversion server.

Note: compiling from the SVN sources may require autogen v>=2.61, which is not available for SuSe 10.2 (although it is available in Ubuntu 8.04).

 

The sources can be obtained doing:

svn co https://svn.nexusformat.org/code/trunk/

 

Note: the svn.nexusformat.org repository requires authentication. You can register a new user at:

http://www.nexusformat.org/SubversionServer

(Important: the first character of the user name will be forcily and silently capitalised, since it is a wiki user!!)

 


Step 3: Compile the source

This is done using the standard autotools procedure (i.e. configure; make; make install).

The basic installation is done as follows (but read all the notes below!!):

cd <nexus_source_directory>

./configure

make

sudo make install

make test

 

Notes:

  • If you are compiling the SVN sources, run sh ./autogen.sh before ./configure

  • If you are installing on Kubuntu (or other debian based distro), add the “--preffix /usr” parameter to ./configure

  • If you want python support, add the “--with-python“ parameter to ./configure

  • If you want Fortran 77 support and have f77 installed, add the “--with-f77” parameter to ./configure

  • If you want Fortran 90 support and have gfortran installed, add the “--with-f90"

  • If you want to compile the class refference documentation and have Doxygen and graphviz installed on your system, add the “--with-doxygen” parameter to ./configure

  • If any of the "--with-SOMETHING" parameters is not sufficient for configure to find the associated program, you can pass a explicit path in the form of "--with-SOMETHING=path" (see ./configure --help)

 

Note: depending on the distribution, the python nxs package may not get installed in the proper place (i.e., the directory where it is installed may not be in your PYTHONPATH). Check the installation log messages to find out where nxs was copied and then either add it to your PYTHONPATH or link/move the nxs dir to your system's standard python modules directory

Done!

To uninstall Nexus, just go to the source dir and run

sudo make uninstall

Document Actions