Project

General

Profile

Building art externals

external packages needed by ART
Product Version Qualifier Notes
ups v4_9_1 build first
upd v4_7_4b installed by ups build
cmake v2_6_4 build second
gcc v4_5_1 build or install second
boost v1_45_0 gcc45 built without boost python libraries
cppunit v1_12_1 gcc45
gccxml v0_9_20101128 gcc45 build requires cmake
libsigcpp v2_2_7 gcc45
clhep v2_1_0_1 gcc45
fftw v3_2_2 gcc45 required by root
libxml2 v2_7_8 gcc45 required by root
python v2_4_2b gcc45 required by root
root v5_28_00a gcc45 build last

These directions start from scratch by building EVERYTHING.
Tarballs for supported distributions of art_exernals are at http://oink.fnal.gov/distro/art/

<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 ups.
  • Next, we build products which depend only on gcc and cmake.
  • Within these sub-groups, products can be built in any order, and in parallel.
  • We recommend that you look at the various log files after they are created.

1. Make sure you have ups installed in your <product-dir>

Build a distributable ups

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 art_externals source code tarball:

cd $PRODUCTS
wget http://oink.fnal.gov/distro/art/art_externals-<art_externals-version>-source.tar.gz
tar xzf art_externals-<art_externals-version>-source.tar.gz

3. Next, build utility packages cmake and gcc:

Build cmake

cd $PRODUCTS/cmake/v2_6_4/
./buildCmake.sh >& log.buildCmake.sh &

Build gcc

cd $PRODUCTS/gcc/v4_5_1/
./buildGCC.sh >& log.buildGCC.sh &

If building on ubuntu, make sure dejagnu is installed.

Building gcc takes a long time. If available, you may prefer to download and install a binary tarfile from http://oink.fnal.gov/distro/packages/ For instance:

cd $PRODUCTS
wget http://oink.fnal.gov/distro/packages/gcc-4.5.1-slf5-x86_64.tar.gz
tar xzf gcc-4.5.1-slf5-x86_64.tar.gz
rm gcc-4.5.1-slf5-x86_64.tar.gz

Please note that we require that gcc 4.5.1 be available as a ups product.

4. Now, build remaining packages with gcc 4.5.1

Building the core packages with one script

For the safest build, do each of the steps below and check the log files.
However, if you just want to fire up a script and leave things to build, you can use buildCore.sh
This will build everything except cmake, gcc, and root.
It is best to make sure everything else has finished cleanly before starting the root build.

cd $PRODUCTS/art_externals/v0_1_0/scripts
./buildCore.sh $PRODUCTS

Build cppunit

cd $PRODUCTS/cppunit/v1_12_1
./buildCppunit.sh >& log.buildCppunit.sh &

Build libsigcpp

cd $PRODUCTS/libsigcpp/v2_2_7
./buildLibsigcpp.sh >& log.buildLibsigcpp.sh &

Build gccxml

The gccxml build requires cmake.

cd $PRODUCTS/gccxml/v0_9_20101128
./buildGccxml.sh >& log.buildGccxml.sh &

Build boost

cd $PRODUCTS/boost/v1_45_0
./buildBoost.sh >& log.buildBoost.sh &

Build clhep

cd $PRODUCTS/clhep/v2_1_0_1
./buildClhep.sh >& log.buildClhep.sh &

Build fftw

cd $PRODUCTS/fftw/v3_2_2
./buildFFTW.sh >& log.buildFFTW.sh &

Build libxml2

cd $PRODUCTS/libxml2/v2_7_8
./buildLibxml2.sh >& log.buildLibxml2.sh &

Build python

cd $PRODUCTS/python/v2_4_2b
./buildPython.sh >& log.buildPython.sh &

5. Getting root

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

Build root

cd $PRODUCTS/root/v5_28_00a
./buildRoot.sh >& log.buildRoot.sh &

6. Distributing art_externals

Verify that ups recognizes all the products

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

Your output might look like this:

"boost" "v1_45_0" "Linux64bit+2.6-2.5" "gcc45" "" 
"clhep" "v2_1_0_1" "Linux64bit+2.6-2.5" "gcc45" "" 
"cmake" "v2_6_4" "Linux64bit+2.6-2.5" "" "current" 
"cppunit" "v1_12_1" "Linux64bit+2.6-2.5" "gcc45" "" 
"fftw" "v3_2_2" "Linux64bit+2.6-2.5" "gcc45" "" 
"gcc" "v4_5_1" "Linux64bit+2.6-2.5" "" "" 
"gccxml" "v0_9_20101128" "Linux64bit+2.6-2.5" "gcc45" "" 
"libsigcpp" "v2_2_7" "Linux64bit+2.6-2.5" "gcc45" "" 
"libxml2" "v2_7_8" "Linux64bit+2.6-2.5" "gcc45" "" 
"python" "v2_4_2b" "Linux64bit+2.6-2.5" "gcc45" "" 
"root" "v5_28_00a" "Linux64bit+2.6-2.5" "gcc45" "" 
"upd" "v4_7_4b" "NULL" "" "current" 
"ups" "v4_9_1" "Linux64bit+2.6-2.5" "" "current" 

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: sl4, sl5, etc.
  • architecture: noarch, i686, or x86_64
  • compiler: gcc34, gcc41, gcc45, etc.
  • For general distribution, we allow people to define their own <product-dir>, so we build the tarball from inside <product-dir>
  • Note that there are two hidden directories, .updfiles and .upsfiles, which need to be included explicitly
  • We put everything in one tarball since the noarch part is very small compared to the architecture specific part.
  • Note that <product-dir> may also contain other products. These instructions are just for the products required to build art.
cd $PRODUCTS/art_externals/v0_2_0/scripts
./tarArtExternals.sh $PRODUCTS
  • This will create $PRODUCTS/art_externals-<version>-<os>-<architecture>-<compiler>.tar.gz

7. Getting a prebuilt tarball