Project

General

Profile

(Build packages required by art) (Build a distributable ups) (Building art externals)
(Building extra packages for the neutrino experiments) (Building extra packages for Mu2e)
(Building CET packages and art)

Building extra packages for Mu2e

These instructions should be considered obsolete. Please see the download page for the mu distribution.

In addition to the art externals products, Mu2e uses the following products:

Product Qualifier Extra Qualifier Notes
g4abla
g4emlow
g4neutron
g4neutronxs
g4photon
g4pii
g4radiative
g4surface
geant4 eN debug, opt, or prof
heppdt eN debug, opt, or prof
scons gccXX debug, opt, or prof
xerces_c eN debug, opt, or prof
root mu2e:eN debug, opt, or prof the Mu2e build of root enables RooFit

<product-dir> is the fully qualified path to your external packages directory.

  • The build order is very important. Several products rely on the existence of other products.
  • We start by building those products which have no depencencies except the existence of packages already in art_externals.
  • We recommend that you look at the various log files after they are created.

1. Make sure you have the art externals installed in your <product-dir>

Build a distributable ups
Building art externals

2. Setup the environment

For the purposes of this build, make sure that the PRODUCTS variable only points to <product-dir>.
This variable is used in the build scripts.

source <product-dir>/setup
bash: export PRODUCTS=<product-dir>
tcsh: setenv PRODUCTS <product-dir>

Get and unwind the mu2e_externals source code tarball:

cd $PRODUCTS
curl -O http://oink.fnal.gov/distro/art/mu2e_externals-<version>-source.tar.bz2
tar xf mu2e_externals-<version>-source.tar.bz2

3. Now build packages which have no extra dependencies:

There are 3 available build types: opt, debug, and prof.
If you are unsure which to use, start by building for debug. However, we note that the experiments generally use the prof build.
We have found very little difference in performance between opt and prof, and therefore recommend building prof (for profile) for increased performance.

You MUST specify either debug, opt, or prof for all build scripts except scons.
We will refer to this as <extra_qual> in the directions below.

Build xerces_c

cd $PRODUCTS/xerces_c/<version>
./buildXerces.sh <extra qual> <eN> >& log.buildXerces.<extra qual> &

Build heppdt

cd $PRODUCTS/heppdt/<version>
./buildHepPDT.sh <extra qual> <eN> >& log.buildHepPDT.<extra qual> &

Build scons

scons requires python (see art_externals)

cd $PRODUCTS/scons/<version>
./buildScons.sh >& log.buildScons &

4. Next, Build Geant4

Geant4 requires clhep (see art_externals) and xerces_c

cd $PRODUCTS/geant4/<version>
./buildGeant4.sh <eN> <extra_qual> >& log.buildGeant4.<extra_qual> &

The Geant4 optional data files are installed as separate products.
The simplest way to install these packages is via upd, using getG4DataSets.sh:

cd $PRODUCTS/geant4/<version>
./getG4DataSets.sh

5. Getting root

ROOT is a complex product. Several packages are needed to build ROOT.
The Mu2e build of ROOT requires gcc, fftw, libxml2, and python.

Build root

cd $PRODUCTS/root/<version>
./buildRoot.sh <mu2e:eN> <extra_qual> >& log.buildRoot.mu2e.<extra_qual> &

6. Distributing mu2e_extras

Verify that ups recognizes all the products

  • List all the products in <product-dir>
ups list -aK+

Build the distributable ups tar file.

  • Some definitions used to name the tarball:
  • version: usually written as, for instance, 0.5.0 instead of v0_5_0
  • os: sl6, sl5, etc.
  • architecture: noarch, i686, or x86_64
  • compiler: e2, gcc47, etc.
  • For general distribution, we allow people to define their own <product-dir>, so we build the tarball from inside <product-dir>
  • We tar the noarch and architecture specific packages separately.
  • Note that <product-dir> will also contain other products. These instructions are just for the extra Mu2e packages.
cd $PRODUCTS/art_externals/<version>
./tarMu2eExtras.sh $PRODUCTS <eN> <extra_qual> [noarch]
  • This will create $PRODUCTS/mu2e_extras-<version>-noarc.tar.gz and $PRODUCTS/mu2e_extras-<version>-<os>-<architecture>-<compiler>.<extra_qual>.tar.gz

7. Getting a prebuilt tarball

  • You can copy and unwind your own tarball wherever you need it.
  • Tarballs for supported distributions of mu2e_extras are at http://oink.fnal.gov/distro/art/
  • To conserve disk space, we strongly recommend deleting your local copy of the tarball after you unwind it.