Building Geant4 Using the Native Compilation Script
Unpack the G4 source, and you will find the Configure script in the top-level directory.
You could set the environment variable G4_NO_VERBOSE in the hopes of improving performance, though to date those improvements have not fully materialized, in fact as of G4 version 8.0.p01, a code modification (see updated G4ParticleDefinition.cc which is attached) is required to prevent the setting of G4_NO_VERBOSE from skipping important code in G4. Tracy has patched this and it is included in our 8.0.p01-gl4 version of G4, located in $GLAST_EXT/srcExtLibs/geant4.8.0.01-gl4-src.tar.gz
Make sure to install the header files into a single common directory.
Logs of the build are stored in the .config directory
Some interesting things... the library libG4parameterisations is the product of Tracy's CMT requirements used to build G4 rather than the native G4 build scripts. G4 calls this same library libG4parmodels
libG4visualizations is the product of Riccardo's addition to the CMT requirements file: http://www.fisica.uniud.it/~glast/MRStudio/Geant4vis.html
libG4g3tog4 is natively called libG4G3toG4
8.0.p01-gl4
We must use CLHEP 1.9.2.2 to build this version of Geant4 - there are incompatible changes in later versions of CLHEP (even 1.9.4.2).
redhat4-i686-32bit-gcc34
- Obtain the source from /afs/slac/g/glast/ground/GLAST_EXT/srcExtlibs/geant4-8.0.p01-gl4-src.tar.gz and unpack a geant4.8.0.p01 directory will be created.
- Enter the geant4.8.0.p01 directory and locate the Confgure script
- setenv G4_NO_VERBOSE 1
- Create a directory named "data"
- Run ./Configure -build
- OS: Linux Compiler: g++
- Expect to run these binaries on multiple machines: y
- You'll answer where the source is located
- Take default for where to install the libraries
- Copy all headers into one directory
- Store data in data directory
- Accept default directories
- Provide the locagtion of CLHEP
Base Directory: $GLAST_EXT/CLHEP/1.9.2.2/gcc34 - Build shared libraries
- Build static libraries too
- Build global libraries
- Do not build granular libraries
- Do not build in DEBUG
- G4UI_NONE accept default n
- G4UI_BUILD_XAW_SESSION accept default n
- G4UI_BUILD_XM_SESSION accept default n
- G4VIS_NONE accept default n
- G4VIS_BUILD_OPENGLX_DRIVER accept default n
- G4VIS_BUILD_OPENGLXM_DRIVER accept default n
- G4VIS_BULID_DAWN_DRIVER accept default n
- G4VIS_BUILD_OIX_DRIVER accept default n
- G4VIS_BUILD_RAYTRACERXX_DRIVER Set to Yes
- G4VIS_BUILD_VRML_DRIVER Set to Yes
- G4LIB_BUILD_G3TOG4 Set to Yes
- G4LIB_BUILD_ZLIB Set to Yes
- G4ANALYSIS_USE Accept default n
- Run ./Configure -install
- In the lib/Linux-g++ directory:
- rename libG3toG4.* to libG4g3tog4.*
- rename libparmodels.* to libparameterisations.*
- Copy the following directories to the $GLAST_EXT/redhat4-i686-32bit-gcc34/geant4/8.0.p01-gl4/gcc34 directory
include lib - Copy the tables directory from an existing Geant4 8.0.p01 installation in $GLAST_EXT, such as $GLAST_EXT/redhat4-i686-32bit-gcc34/gcc34/tables