[Gate-users] Problem in installation of Geant4

Zhengzhi Liu zliu36 at stanford.edu
Wed Mar 11 17:15:57 CET 2020


Hi Yasmine,

I have installed ROOT, Geant4, and Gate for numerous times already.
Hopefully, my notes would help you a little bit. As to your question, you
don't have to install CLHEP, as it has been provided in GEANT4, but you
need to set up correctly in CMake during the compile. Please check out my
bash history file attached.


Instruction for installations:
For ROOT:
check out: 30.4 Installing Precompiled Binaries
<https://root.cern.ch/root/html534/guides/users-guide/InstallandBuild.html>

For Geant4:
Check out this PDF file
<https://indico.tifr.res.in/indico/getFile.py/access?contribId=29&resId=0&materialId=slides&confId=5309>

For Gate:
Check out here
<https://opengate.readthedocs.io/en/latest/compilation_instructions.html>

Good luck with your installation and have fun.
Zhengzhi

On Wed, Mar 11, 2020 at 7:24 AM Yasmine Barek <yasminekenzy at gmail.com>
wrote:

> Hello
> I`m trying to install in linux system the Gate but before that I installed
> root and now Im installing the geant4 but i got this message if someone
> could help me to solve it> This this the error message:
>
> "CMake Error at cmake/Modules/Geant4OptionalComponents.cmake:64
> (find_package):
>   Could not find a package configuration file provided by "CLHEP"
> (requested
>   version 2.3.3.0) with any of the following names:
>
>     CLHEPConfig.cmake
>     clhep-config.cmake
>
>   Add the installation prefix of "CLHEP" to CMAKE_PREFIX_PATH or set
>   "CLHEP_DIR" to a directory containing one of the above files.  If "CLHEP"
>   provides a separate development package or SDK, be sure it has been
>   installed.
> Call Stack (most recent call first):
>   cmake/Modules/G4CMakeMain.cmake:59 (include)
>   CMakeLists.txt:50 (include)
>
>
> -- Configuring incomplete, errors occurred!
> See also
> "/home/dell-u/geant4/geant4.10.06.p01-build/CMakeFiles/CMakeOutput.log".
>
> I am new in the use of linux and i followed a youtube tuto to install
> Geant4 so instead of onstalling the newest version of CLHEP I installed
> that the guy had installed in his video to ovoid a proble; that I got with
> the new one>
> Now I am blocked and I don`t know what I should do so please can someone
> help for this case
> Thanks
> Best regards
> Yasmine Barek
> Medical physicist
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200311/e5ec8cc4/attachment.html>
-------------- next part --------------
##############################################
cmake -DCMAKE_INSTALL_PREFIX=/home/zliu/Products/CLHEP/2.4.1.3/CLHEP-install  /home/zliu/Products/CLHEP/2.4.1.3
make -jN
make test
make install

export CLHEP_DIR=/home/zliu/Products/CLHEP/2.4.1.3/CLHEP-install
export CLHEP_INCLUDE_DIR=${CLHEP_DIR}/include/
export CLHEP_LIBRARY=${CLHEP_DIR}/lib/
export LD_LIBRARY_PATH=${CLHEP_LIBRARY}:${LD_LIBRARY_PATH}
export PATH=$CLHEP_DIR/bin/:$PATH
##############################################
#CLHEP IS NOT NECESSARY AS LONG AS YOU SET '-DGEANT4_USE_SYSTEM_CLHEP=OFF' IN CMAKE DURING THE COMPILE OF GEANT4, SEE CODE BELOW:  



apt install libxerces-c-dev
sudo apt-get install libxmu-dev libxi-dev

cmake -DCMAKE_INSTALL_PREFIX=/home/zliu/Products/Geant4/geant4.10.05.p01-install -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_USE_SYSTEM_CLHEP=OFF -DCLHEP_INCLUDE_DIR=/home/zliu/Products/CLHEP/2.4.1.3/CLHEP-install/include/ -DCLHEP_LIBRARY=/home/zliu/Products/CLHEP/2.4.1.3/CLHEP-install/lib/libCLHEP.so -DGEANT4_INSTALL_EXAMPLES=ON /home/zliu/Products/Geant4/geant4.10.05.p01

#sudo apt install python3-pip
#pip3 install itk


https://opengate.readthedocs.io/en/latest/compilation_instructions.html#compilation-instructions-label
cmake -DCMAKE_INSTALL_PREFIX=/home/zliu/Products/ITK/InsightToolkit-5.0.1-install  /home/zliu/Products/ITK/InsightToolkit-5.0.1
ccmake ../InsightToolkit-5.0.1
make -jN (N is the number of processor(s) in your PC)
make install

sudo apt-get install cmake-curses-gui

cmake -DCMAKE_INSTALL_PREFIX=/home/zliu/Products/Gate/Gate-8.2-install  /home/zliu/Products/Gate/Gate-8.2
ccmake ../Gate-8.2
make -j8
make install

caution:

cp /home/zliu/Products/Gate/Gate-8.2/cluster_tools/jobsplitter/gjs /home/zliu/Products/Gate/Gate-8.2-install/bin

cp /home/zliu/Products/Gate/Gate-8.2/cluster_tools/filemerger/gjm /home/zliu/Products/Gate/Gate-8.2-install/bin


More information about the Gate-users mailing list