–2021-07-03 14:13:47-- https://geant4-data.web.cern.ch/geant4-data/releases/geant4.10.04.p02.tar.gz
Resolving geant4-data.web.cern.ch (geant4-data.web.cern.ch)… 188.185.87.216, 188.185.90.87, 137.138.31.235, …
Connecting to geant4-data.web.cern.ch (geant4-data.web.cern.ch)|188.185.87.216|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 34344696 (33M) [application/x-gzip]
geant4-data.web.cern.ch/geant4-data/releases: No such file or directory
geant4-data.web.cern.ch/geant4-data/releases/geant4.10.04.p02.tar.gz: No such file or directory
Cannot write to ‘geant4-data.web.cern.ch/geant4-data/releases/geant4.10.04.p02.tar.gz’ (Success).
Now CMAKE issue
make -j
Scanning dependencies of target G4NDL
Scanning dependencies of target PhotonEvaporation
Scanning dependencies of target G4PII
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/PhotonEvaporation.dir/depend.make.tmpCMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4PII.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4NDL.dir/depend.make.tmpCMake Error: : System Error: Permission denied
CMake Error: : System Error: Permission deniedScanning dependencies of target G4ABLA
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4ABLA.dir/depend.make.tmpCMakeFiles/G4PII.dir/build.make:140: recipe for target ‘CMakeFiles/G4PII.dir/depend’ failed
make[2]: *** [CMakeFiles/G4PII.dir/depend] Error 2
CMake Error: : System Error: Permission deniedCMakeFiles/Makefile2:390: recipe for target ‘CMakeFiles/G4PII.dir/all’ failed
CMakeFiles/PhotonEvaporation.dir/build.make:140: recipe for target ‘CMakeFiles/PhotonEvaporation.dir/depend’ failed
make[1]: *** [CMakeFiles/G4PII.dir/all] Error 2
make[2]: *** [CMakeFiles/PhotonEvaporation.dir/depend] Error 2
make[1]: *** Waiting for unfinished jobs…
Scanning dependencies of target G4NEUTRONXS
CMakeFiles/G4NDL.dir/build.make:140: recipe for target ‘CMakeFiles/G4NDL.dir/depend’ failed
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/PhotonEvaporation.dir/all’ failed
make[2]: *** [CMakeFiles/G4NDL.dir/depend] Error 2
make[1]: *** [CMakeFiles/PhotonEvaporation.dir/all] Error 2
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4NEUTRONXS.dir/depend.make.tmp
CMake Error: : System Error: Permission deniedCMakeFiles/Makefile2:141: recipe for target ‘CMakeFiles/G4NDL.dir/all’ failed
make[1]: *** [CMakeFiles/G4NDL.dir/all] Error 2
CMakeFiles/G4ABLA.dir/build.make:140: recipe for target ‘CMakeFiles/G4ABLA.dir/depend’ failed
make[2]: *** [CMakeFiles/G4ABLA.dir/depend] Error 2
CMakeFiles/Makefile2:104: recipe for target ‘CMakeFiles/G4ABLA.dir/all’ failed
make[1]: *** [CMakeFiles/G4ABLA.dir/all] Error 2
CMakeFiles/G4NEUTRONXS.dir/build.make:140: recipe for target ‘CMakeFiles/G4NEUTRONXS.dir/depend’ failed
make[2]: *** [CMakeFiles/G4NEUTRONXS.dir/depend] Error 2
CMakeFiles/Makefile2:316: recipe for target ‘CMakeFiles/G4NEUTRONXS.dir/all’ failed
make[1]: *** [CMakeFiles/G4NEUTRONXS.dir/all] Error 2
Scanning dependencies of target RadioactiveDecay
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/RadioactiveDecay.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMakeFiles/RadioactiveDecay.dir/build.make:140: recipe for target ‘CMakeFiles/RadioactiveDecay.dir/depend’ failed
make[2]: *** [CMakeFiles/RadioactiveDecay.dir/depend] Error 2
CMakeFiles/Makefile2:279: recipe for target ‘CMakeFiles/RadioactiveDecay.dir/all’ failed
make[1]: *** [CMakeFiles/RadioactiveDecay.dir/all] Error 2
Scanning dependencies of target RealSurface
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/RealSurface.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMakeFiles/RealSurface.dir/build.make:140: recipe for target ‘CMakeFiles/RealSurface.dir/depend’ failed
make[2]: *** [CMakeFiles/RealSurface.dir/depend] Error 2
CMakeFiles/Makefile2:427: recipe for target ‘CMakeFiles/RealSurface.dir/all’ failed
make[1]: *** [CMakeFiles/RealSurface.dir/all] Error 2
Scanning dependencies of target G4SAIDDATA
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4SAIDDATA.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMakeFiles/G4SAIDDATA.dir/build.make:140: recipe for target ‘CMakeFiles/G4SAIDDATA.dir/depend’ failed
make[2]: *** [CMakeFiles/G4SAIDDATA.dir/depend] Error 2
CMakeFiles/Makefile2:353: recipe for target ‘CMakeFiles/G4SAIDDATA.dir/all’ failed
make[1]: *** [CMakeFiles/G4SAIDDATA.dir/all] Error 2
Scanning dependencies of target G4zlib
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/source/externals/zlib/CMakeFiles/G4zlib.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
source/externals/zlib/CMakeFiles/G4zlib.dir/build.make:489: recipe for target ‘source/externals/zlib/CMakeFiles/G4zlib.dir/depend’ failed
make[2]: *** [source/externals/zlib/CMakeFiles/G4zlib.dir/depend] Error 2
CMakeFiles/Makefile2:1179: recipe for target ‘source/externals/zlib/CMakeFiles/G4zlib.dir/all’ failed
make[1]: *** [source/externals/zlib/CMakeFiles/G4zlib.dir/all] Error 2
Scanning dependencies of target G4EMLOW
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4EMLOW.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMakeFiles/G4EMLOW.dir/build.make:140: recipe for target ‘CMakeFiles/G4EMLOW.dir/depend’ failed
make[2]: *** [CMakeFiles/G4EMLOW.dir/depend] Error 2
CMakeFiles/Makefile2:210: recipe for target ‘CMakeFiles/G4EMLOW.dir/all’ failed
make[1]: *** [CMakeFiles/G4EMLOW.dir/all] Error 2
Scanning dependencies of target G4ENSDFSTATE
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/CMakeFiles/G4ENSDFSTATE.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
CMakeFiles/G4ENSDFSTATE.dir/build.make:140: recipe for target ‘CMakeFiles/G4ENSDFSTATE.dir/depend’ failed
make[2]: *** [CMakeFiles/G4ENSDFSTATE.dir/depend] Error 2
CMakeFiles/Makefile2:464: recipe for target ‘CMakeFiles/G4ENSDFSTATE.dir/all’ failed
make[1]: *** [CMakeFiles/G4ENSDFSTATE.dir/all] Error 2
Scanning dependencies of target G4clhep
CMake Error: Cannot open file for write: /opt/applications/geant4/geant4.10.04.p02-build/source/externals/clhep/CMakeFiles/G4clhep.dir/depend.make.tmp
CMake Error: : System Error: Permission denied
source/externals/clhep/CMakeFiles/G4clhep.dir/build.make:2109: recipe for target ‘source/externals/clhep/CMakeFiles/G4clhep.dir/depend’ failed
make[2]: *** [source/externals/clhep/CMakeFiles/G4clhep.dir/depend] Error 2
CMakeFiles/Makefile2:1124: recipe for target ‘source/externals/clhep/CMakeFiles/G4clhep.dir/all’ failed
make[1]: *** [source/externals/clhep/CMakeFiles/G4clhep.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2
Thanks dear, Issue resolved by using command with “sudo” like sudo make -j sudo make install -j
Now I am at the step 3. Running an example again here some cmake issues which did not resolved by using sudo,
sudo cmake …/B1
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:15 (find_package):
By not providing “FindGeant4.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “Geant4”, but
CMake did not find one.
Could not find a package configuration file provided by “Geant4” with any
of the following names:
Geant4Config.cmake
geant4-config.cmake
Add the installation prefix of “Geant4” to CMAKE_PREFIX_PATH or set
“Geant4_DIR” to a directory containing one of the above files. If “Geant4”
provides a separate development package or SDK, be sure it has been
installed.
– Configuring incomplete, errors occurred!
See also “/home/meshoaib/workspace/G4WORK/B1-build/CMakeFiles/CMakeOutput.log”.
sudo make -j4
make: *** No targets specified and no makefile found. Stop.
There’s no need to use sudo here, and don’t use it in these kinds of cases. It was needed when installing Geant4 under /opt because standard users don’t have permission to write there. sudo is needed there for the elevated permissions it allows, but it’s not needed to build/install anything under your home area.
The error in building the example is down to CMake not finding Geant4 in the default locations. so you need to supply the directory where the Geant4Config.cmake file in your install of Geant4 is located to CMake: