I’m running into a problem when I try to run make in a project build folder. I am working on Ubuntu and tried this with the latest Geant4 (v11) and even went back to v10.06.p03 to see if it was a version issue.
I installed Geant4 seemingly without problem. I was also able to use cmake to build an example that I’ve run on a different computer, but when I try and make the executable I get this error.
make: *** No rule to make target ‘/home/andrea/Documents/Geant4/geant4.10.06.p03-build/BuildProducts/lib/libG4Tree.so’, needed by ‘ConverterSim’. Stop.
I’ve seen this similar error in other questions, but can’t figure out how to solve/find libG4Tree.so. It seems like the shared Geant4 libraries aren’t getting built, but the documentation indicates that should be default…
I presume you did both build and install? To make the examples, are you sourcing the “…/bin/geant4.sh” script from the install area, or from the build area? The path above looks like it’s pointing at the build area.
I think this is a step I’m missing. I thought I sourced geant4, but I don’t think I did that from the bin environment. I might be thinking about sourcing Root, but there is no install directory that I can tell is getting populated, where exactly is the install area.
You probably want to review the G4 Installation Guide. You specify the install area with the “-DCMAKE_INSTALL_PREFIX=/some/path/you/like” option to cmake, and then after you’ve done the build, you run make install (or cmake --install, as an alternative, I think), and it copies the libraries, .hh files, etc. from the build to the install area.
Then, you can delete the source and build areas if you want to, and only have the installation on your system. We don’t normally do that, but it’s possible.