Notes on compiling azara on Linux

(Davide Salomoni, June 7, 2005)

Important disclaimer: do this at your own risk. If by following the procedure below you manage to destroy your computer, lose data, burn your house, or if in general you are not satisfied with the result, I don't accept any responsibility. You have been warned.

The azara home page is at http://www.bio.cam.ac.uk/azara/

Please note that I don't know anything about azara, NMR, and so on. If you find these notes useful, good. If not, please seek advice from someone more knowledgeable than me.

These notes assume you have some basic knowledge of how to manage a Linux system. Everything written here has been tested on Linux Ubuntu "Hoary", freshly installed from the Ubuntu installation CD. These notes should be easily portable at least to other Debian-like systems.

To download or learn more about Ubuntu, see www.ubuntulinux.org.

First of all, make sure that the "universe" repository is uncommented in the file /etc/apt/sources.list. There should be a line like

deb http://nl.archive.ubuntu.com/ubuntu hoary universe

(the URL for the repository might be different on your system.)

Make sure the apt cache is up-to-date running the following command as root:

# apt-get update

Install the following packages as root:

# apt-get install lesstif2-dev libxpm-dev
(needed for the plot1 and plot2 programs)

# apt-get install xlibmesa-gl-dev freeglut3-dev libxmu-dev
(needed for the viewer program)

Say yes if asked about installing package dependencies.

All the following operations can be done without root privileges, so from this point on there is no need to use the root account.

Download the latest azara tarball fetching it from ftp://www.bio.cam.ac.uk/pub/azara/; when I wrote these notes, the latest available version was azara 2.7.

I suggest you download the file azara-2.7-linux.tar.gz; this includes some Linux binaries, but they are probably compiled with old shared libraries that won't work on your system, so we will recompile everything from source.

You could also download just the source, but then you'd need to change the file named ENVIRONMENT to tell azara you are actually on Linux. If you download azara-2.7-linux.tar.gz, this file is ready to use. If you decide to download the source tarball instead (azara-2.7-src.tar.gz), make sure you edit the file ENVIRONMENT to look like this. The notes below assume you have downloaded azara-2.7-linux.tar.gz.

Untar with

$ tar zxf azara-2.7-linux.tar.gz

This will create the subdirectory azara-2.7. Now:

$ cd azara-2.7
$ export PATH=$PATH:.
$ make clean
$ make


This will recompile all azara programs. The final binaries are all in the bin subdirectory.

[end of notes]

Appendix

The file ENVIRONMENT I used:

# this file specifies environment for makefiles and source code
# X11 and Motif stuff used in global, plot1, plot2, viewer
# XPM stuff used in plot2
# GL stuff used in viewer
# ENDIAN_FLAG used in global
# rest used in many or all makefiles

# C compiler
CC = cc

# compiler flags
#CFLAGS = -g
CFLAGS = -O

# linker flags
#LFLAGS = -p

# generic library
#LIB = -lmalloc

# math library
MATH_LIB = -lm

# X11 include path
X11_INCLUDE_DIR = -I/usr/X11R6/include

# MOTIF include path, if different from X11
#MOTIF_INCLUDE_DIR = -I/usr/X11R6/include

# X11 library path
X11_LIB_DIR = -L/usr/X11R6/lib

# MOTIF library path, if different from X11
#MOTIF_LIB_DIR = -L/usr/X11R6/lib

# whether XPM used (available)
XPM_FLAG = -DUSE_XPM

# Xpm library (if used, otherwise comment out)
XPM_LIB = -lXpm
#XPM_LIB = /usr/X11R6/lib/libXpm.so.4

# X11 libraries
#X11_LIB = -lX11 -lPW
# non-SGI platforms do not need PW
X11_LIB = -lX11
# below uses shared libraries
#X11_LIB = -lX11_s -lPW

# Motif libraries
MOTIF_LIB = -lXm -lXt
# below uses shared libraries
#MOTIF_LIB = -lXm_s -lXt_s

# GL include path
GL_INCLUDE_DIR = $(X11_INCLUDE_DIR) -I/home/wb104/mesa/include

# GL library path
GL_LIB_DIR = $(X11_LIB_DIR) -L/home/wb104/mesa/lib

# GL libraries
GL_LIB = -lglut -lGLU -lGL -lXmu -lX11 -lXext

# set up ENDIAN_FLAG as required
#   WRITE_ENDIAN_PAR if want endianess written to par file
#   BIG_ENDIAN_DATA if want data files to be big endian by default
#   LITTLE_ENDIAN_DATA if want data files to be little endian by default
#   FLIP_SWAP if want input data files to have swap flipped
# not all of these make sense in combination
# some examples of what you might do:
#ENDIAN_FLAG = -DWRITE_ENDIAN_PAR
#ENDIAN_FLAG = -DBIG_ENDIAN_DATA
#ENDIAN_FLAG = -DLITTLE_ENDIAN_DATA