-
Notifications
You must be signed in to change notification settings - Fork 2
Compiling and Installing Geant4.10.3.x
While in the Geant4.10.3 working directory
mkdir build
cd build
cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON ../
If you come across errors during configuration, be sure to have dependencies installed. A list of dependencies can be found at the bottom of this page. Be mindful of differences in package names across various distributions
make -j<number of cpu cores>
make install
In your .bashrc under your home directory, append the followings to the end of the file. Be sure to log out and log in after adding this lines! (source .bashrc)
export G4LEDATA=/usr/local/share/Geant4-10.3.0/data/G4EMLOW6.50
export G4LEVELGAMMADATA=/usr/local/share/Geant4-10.3.0/data/PhotonEvaporation4.3
export G4SAIDXSDATA=/usr/local/share/Geant4-10.3.0/data/G4SAIDDATA1.1
export G4RADIOACTIVEDATA=/usr/local/share/Geant4-10.3.0/data/RadioactiveDecay5.1
export G4NEUTRONHPDATA=/usr/local/share/Geant4-10.3.0/data/G4NDL4.5
export G4NEUTRONXSDATA=/usr/local/share/Geant4-10.3.0/data/G4NEUTRONXS1.4
export G4ENSDFSTATEDATA=/usr/local/share/Geant4-10.3.0/data/G4ENSDFSTATE2.1
Not a necessary variable to have, but it certainly makes building DarkGeant4 easier to manage.
export GEANTDIR=/path/to/geant4.10.3
note, while these variables ought to be set, their paths might vary depending on your system. Be aware of that!
So thankfully everything you need to build Geant4.9.6 and DarkGeant4 are mostly in the standard repositories. However you want to enable the EPEL repository to get cmake3.x
Make sure you install cmake3 instead of just plain cmake, otherwise yum will download version 2.8 which is missing important lua configuration files.
Setting an alias might also by appropriate for cmake3
alias cmake="cmake3"
Enable EPEL to get cmake3.x
sudo apt install g++ libx11-dev libxmu-dev mesa-common-dev libgl1-mesa-dev libglapi-mesa libglu1-mesa-dev freeglut3-dev libexpat1-dev
sudo apt install libx11-dev libxmu-dev mesa-common-dev mesa-util-extra libgl1-mesa-dev libglapi-mesa libglu1-mesa-dev freeglut3-dev
sudo yum install expat-devel libX11-devel libXmu-devel mesa-libGL-devel mesa-libGLU-devel
sudo xcode-select --install