Table of Contents |
---|
Building Geant4 Using the Native Compilation Script
...
- 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
Windows VS2008
- Install cygwin, if you do not already have it.
Include gcc-g77 in the installation
You may need to install an older version of "make"
Rename the link.exe to link_cyg.exe, so it will not be used. See: http://geant4.web.cern.ch/geant4/support/windows_note.shtml - Obtain and build CLHEP 1.9.2.3 (the source for 1.9.2.2 no longer seems to be available)
- 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.
- In a DOS command window, set up to use VS 2008:
- set PATH=
- set LIB=
- set INCLUDE=
- Run C:\Program Files\Microsoft Visual Studio 9.0\Common\Tools\vsvars32.bat
- set LIB=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;%LIB%
- set PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;%PATH%
- set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;include;%INCLUDE%
- Start up a cygwin session:
cd cygwin/bin
bash --login -i - Enter the directory containing your G4 source code
- Set the G4_NO_VERBOSE flag
export G4_NO_VERBOSE=1 - set CLHEP_LIB to CLHEP.lib (avoid trouble building shared libraries)
export CLHEP_LIB=CLHEP.lib - Create a data directory in the top-level of the G4 source
- Run G4's Configure script
./Configure -build- OS: WIN-VC
- 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 location of CLHEP
Base Directory: $GLAST_EXT/CLHEP/1.9.2.3- and double-check the setting of CLHEP_LIB
- Build shared libraries
- Build static libraries too
- 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
- Provide the location of CLHEP