build itaps primer

The build_itaps shell script can help to simplify the process of building and installing the various pieces of ITAPS software including each implementation as well as each service with each implementation.

You can download the build_itaps script from https://redmine.scorec.rpi.edu/svn/itaps/software/branches/<VERS>/tools/build_itaps using either wget, curl or svn co were VERS is the ITAPS version number you wish to build (e.g. "1.2" or "1.3", etc.) If you want instead to build the current trunk, you would download build_itaps from the trunk of the repository, https://redmine.scorec.rpi.edu/svn/itaps/software/trunk/tools/build_itaps.

build_itaps is controlled by enviornment variables.

Global variables

variable name meaning default value
INSTALLROOT top-level directory underwhich all software build_itaps builds is installed to By default, everything is installed to the current working directory
GRPNAME Name to be used for 'chgrp' calls upon installation. not defined
DEBUG If non-empty string, calls set -x to help debug build_itaps script itself emtpy string
IGNORE_ERRORS Continue past errors that build_itaps would otherwise consider fatal no
LOG_FILE Name of the file into which all output generated by build_itaps is placed build_itaps_log
ARCH architecture specific install-point moniker (e.g. linux_x86_64_gcc-4.1) generated
ITAPS_IMPLS space separated list of ITAPS interface implementations to build CGM GMI GRUMMP FMDB MOAB LASSO
ITAPS_SERVICES space separated list of ITAPS services to build iMesh_unitTest Mesquite Swapping eyeMesh HelloMesh
DEFURL Default URL from which to download products https://redmine.scorec.rpi.edu/anonsvn/itaps/software/branches/1.2RC

Variables with both global and per-product overrides

For those variables that effect how individual software components are handled, there are both global and per-component variants. For example, CPPFLAGS is global and can be used to influence CPPFLAGS for all software components the script manages but MOAB_CPPFLAGS is component-specific (e.g. specific to MOAB in this case), and will affect only how MOAB is compiled.

variable name meaning default value
DOWNLOAD_ONLY Use build_itaps just to download all software components and nothing more no
OVERDOWNLOAD Even if a product has already been downloaded, download it again replacing current no
OVERINSTALL Even if a product has already been installed, install over it no
CC C compiler to use gcc
CXX C++ compiler to use g++
FC Fortran compiler to use gfortran
CFLAGS C compiler flags -DNDEBUG -fPIC -O2
CXXFLAGS C++ compiler flags -DNDEBUG -fPIC -O2
FCFLAGS Fortran compiler flags -DNDEBUG -O2
MKFLAGS make flags -j2
MKCKCMD make check command make check
MKINSTCMD make install command make install
MVSHLIBS After installing, put shared libs in own dir, lib.so and static libs in own dir, lib.a yes
USESHLIBS After separating static and shared libs into their own directories, make lib dir link to shared libs in lib.so make lib link to lib.a
INSTALL top-level installation point for product generated from INSTALLROOT and ARCH
VERSION version number of product
DISTFILE name of distribution file for product
URL URL for product download point

Failover behavior

build_itaps is designed so that it can be stopped and restarted as necessary and will pickup from where it left off. If products are requested and it finds those products already installed, it will issue an informational message and skip on to the next product. As it runs it builds up knowledge of what has and has not been downloaded, compiled and installed.

Ordinarily, it will immediately stop and proceed no further when it encounters an error with any product. However, if IGNORE_ERRORS is non-empty string, then it will continue on to the next product.

Examples

Typical invokation

env INSTALLROOT=<path> ./build_itaps

where <path> is the path where you would like to install all these
software products.

Just download all products and nothing else.

env DOWNLOADONLY=yes ./build_itaps

To build only GRUMMP and FMDB implementations

env ITAPS_IMPLS="GRUMMP FMDB" ./build_itaps

To build only Mesquite service (with all implementations)...

env ITAPS_SERVICES="Mesquite" ./build_itaps

Of course, these can all be used in combination...

env DOWNLOADONLY=yes \
    ITAPS_IMPLS="GRUMMP FMDB" \
    ITAPS_SERVICES="Mesquite" \
    ./build_itaps

To override MOAB's CXXFLFAGS so that it is not built with default -fPIC -DNDEBUG -O2

    MOAB_CXXFLAGS="-O3" ./build_itaps

To override FMDB's CXXFLFAGS so that it is not built with default -fPIC -DNDEBUG -O2

    FMDB_CXXFLAGS="-O3" ./build_itaps

To use an installed version of HDF5...

    HDF5_INSTALL=/usr/local/lib ./build_itaps

If your QTDIR (TrollTech's Qt library) env. variable is either not setup correctly or not pointing to qt-4...

env QTDIR=<path-to-qt4> ./build_itaps