Issue making example B1: "No rule to make target"

Hi all,

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[2]: *** No rule to make target ‘/home/andrea/Documents/Geant4/geant4.10.06.p03-build/BuildProducts/lib/’, needed by ‘ConverterSim’. Stop.

I’ve seen this similar error in other questions, but can’t figure out how to solve/find It seems like the shared Geant4 libraries aren’t getting built, but the documentation indicates that should be default…

Any help is appreciated!

I presume you did both build and install? To make the examples, are you sourcing the “…/bin/” 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.

I’m sorry for the silly question.

I did not complete the install step! I have no other words. Thanks @mkelsey

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.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.