Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Depending on your system speed, the entire build process will take around 2 hours, but starting the automated build only takes about 5 minutes.

...

Packages in the Distribution

There are nine software packages built by SimDist, only one of which is optional.

These are described in the table below.

Package

Version

Description

Website

CLHEP

2.0.4.7

physics utilities for Geant4

http://proj-clhep.web.cern.ch/proj-clhep/

Geant4

9.4.0

physics simulation toolkit

http://geant4.cern.ch

LCIO

head

ILC data format

http://lcio.desy.de/

HepPDT

3.3.2

extended physics data

https://savannah.cern.ch/projects/heppdt/

Xerces

3.1.1

XML toolkit

http://xerces.apache.org/xerces-c/

GDML

head

geometry XML format

http://gdml.web.cern.ch/GDML/

LCDD

head

detector description XML format

lcdd

SLIC

head

simulation front-end

slic

LCDetectors

head

detector data library (optional)

LCDetectors

Versions are current as of 1/12/2011.

Supported Platforms

The SimDist project requires a Unix-like environment. The CVS head currently builds successfully on Linux (tested on Redhat Enterprise Linux), OSX, and Windows using Cygwin. The recommended compiler version is gcc 4.1 or greater, though depending on your platform, a gcc 3 series compiler might work.

Build Instructions

Required Build Tools

SimDist requires a number of different build tools beyond the standard ones you may have on your system. This is because the project has a lot of external dependencies, each of which has its own build system.

Here is the list of required binaries that must be on your PATH in order tools to build SimDist successfully.

If one or more of these is not present, then you or your admin should install it before proceeding with these instructions. If you are unsure of which version to use, just get the most recent version that works on your platform. This should work fine.

Warning
titleCMake on Windows

CMake does not seem to work well with Windows. Specifically, it does not like paths with spaces in them. To build SimDist successfully using Cygwin, uninstall CMake from your Cygwin installation and make sure that you don't have the CMake binary in your PATH.

Obtaining SimDist

SimDist is a module in the SLAC CVS repository. You can check it out with the following command.

No Format

cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co SimDist

This will create a directory called SimDist in the directory where this command is run. The next sections will cover building SimDist once you have checked it out.

Basic Build Procedures

If you want to execute each step of the build yourself, these are the commands used by the build script (covered in next section).

...

This will create the log files configure.log and build.log, which might be useful if your build fails.

Testing the Build

Try executing this script when the build completes.

No Format

./scripts/slic.sh

If there is an error running the slic binary using this script, then check your build logs (starting at the top) for error messages.

Starting a Clean Build

To cleanup an existing build and start a new one from scratch, execute these commands in the SimDist directory.

No Format

make distclean
./configure [options]

This should remove all package binaries and return the project to a clean state. The build can then be executed in the normal fashion.

Creating a Tarball

The slic package includes a target for creating a .tar.gz file containing the slic binary and its runtime dependencies.

No Format

make dist

The tarball will be named based on the slic and Geant4 versions and your platform. It will appear one directory below your SimDist directory.

Configure Script

Simdist uses a configure script generated by Autoconf. This script only accepts a few options, as the slic binary has a standard set of external dependencies, none of which are optional.

...

The arguments listed under "Fine tuning" and "Optional Packages" are generally not supported. For instance, you cannot disable individual packages, as they are all required. Also, the "influential environment variables" are generally ignored by SimDist, as each package has a different set of compiler arguments.

Disabling Geant4 Visualization

Sometimes it may be useful to disable Geant4 visualization entirely, as at has many dependencies that may not all be present on your host system. Execute this command from the SimDist directory to disable Geant4 visualization.

...

This should set the variable G4VIS_NONE to 1 in the Geant4 environment configuration file at packages/geant4/env.gmk.

Testing the Build

Try executing this script when the build completes.

No Format

./scripts/slic.sh

If there is an error running the slic binary using this script, then check your build logs (starting at the top) for error messages.

Starting a Clean Build

To cleanup an existing build and start a new one from scratch, execute these commands in the SimDist directory.

No Format

make distclean
./configure [options]

This should remove all package binaries and return the project to a clean state. The build can then be executed in the normal fashion.

Creating a Tarball

The slic package includes a target for creating a .tar.gz file containing the slic binary and its runtime dependencies.

No Format

make dist

The tarball will be named based on the slic and Geant4 versions and your platform. It will appear one directory below your SimDist directory.

Troubleshooting Common Build Problems

...

Each package supports either a cvs or a download command, depending on whether it is contained in the SLAC cvs repository. External packages are retrieved using the wget program.

How SimDist Works

Package System

SimDist operates on a loose system of package configuration, which sets a number of standard build variables in the configuration stage for each package in the packages directory. A configure script in the base directory generates the actual Make file fragments for the packages, depending on the configuration selected and on the properties of the local host. Following the Autoconf build system's conventions, there are .in files in the package directories that are used by the configure script to generate these Make fragments. The configuration of individual packages is defined in the Autoconf file at build/packages.m4. This sets and substitutes the necessary variables for the build system by calling the Autoconf macro associated with each package.

...

Each package has different possible options for this particular variable. The above examples will not work on other packages with SimDist, only the slic package.

Package

...

Variables

The core of the SimDist build system is in build/package.gmk where a standard set of build procedures is defined for a generic software package. These procedures include automation of fetching package source codes, configuration, execution of build commands, and installing binaries and headers.

...

SimDist can usually figure out how to manipulate these version tags into the format required for accessing the package's sources via cvs or download. The only exception to this currently is the HepPDT package. You should not change the version of this package, anyways. For other packages, it may be useful to override the defaults. For instance, selecting a different Geant4 version might be necessary. You can do this by editing the Geant4 version file at packages/geant4/VERSION. The Geant4 version string may also have a b instead of a p to designate beta versions.