-
Notifications
You must be signed in to change notification settings - Fork 13
Installing Geant4 on Scientific Linux 6
Please note that if at any time these instructions do not make sense or do not produce the expected results, the following web pages might be of use.
-
Download the latest version of Geant4 from the source downloads page. Do not worry about the data sets at the moment.
-
Unpack the compressed file in a location of your choice. Preferably where you wish to install Geant4. Open a terminal window in this directory and execute the command:
tar -zxvf geant4.9.6.tar.gzMake sure that you use the correct file name. Geant4 should now be sitting in a subdirectory/path/to/geant4.9.6 -
Create a new directory adjacent to the directory into which geant4 was unpacked, then navigate to this directory.
mkdir geant4.9.6-buildfollowed bycd geant4.9.6-build. -
Once you are sitting in the build directory, execute:
cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DCMAKE_INSTALL_PREFIX=/path/to/geant4.9.6-install /path/to/geant4.9.6 -
This installation will install all the datasets provided as well as use the OpenGL drivers for visualization. If there are other parameters that you wish to configure, please visit the Geant4 Build Options link provided at the beginning. If you install Geant4 and wish to configure parameters after the fact, simply re-run the installation with the proper parameters.
-
If all goes well, you should now see a statement saying
-- Build files have been written to: /path/to/geant4.9.6-build. If you run into a problem with the expat location, it is possible to download a new version from expat and install it. You must then re-run the command from step 4 with two additional parameters. Once you have installed expat, you can include the parameters-DGEANT4_USE_SYSTEM_EXPAT=OFF -DEXPAT_LIBRARY=/path/to/expatlibwhich should solve the problem. If it does not, then visit the Geant4 build options page (second link at the top of this wiki) and look for other parameters relating to expat. -
Assuming that you have successfully completed step 6, you may now run the
makecommand in the build directory. -
Next, run
make installin the build directory as well. -
Geant4 should now be installed in a directory labelled
geant4.9.6-install, adjacent to the build directory.