Geant4 GUI Issues

Hey everyone,

It’s great to be apart of this community so thanks in advanced for your help.

I have been able to get Geant4 running on Linux Mint 20.1 Cinnamon that I have configured on my laptop.

My build included using the Geant4, and CLHEP source code from Github and compiling as per the instructions provided.

Essentially I have just copied and pasted what I set Geant4 up as below.


Now this seemed to work but everytime I build an Example such as STCyclotron i get GUI errors, and the GUI only partially loads missing the toolbar. I have tried to load up the relevant macro which doesn’t work. I think it might be to do with the version of QT I am using but I am unsure, as I am new to Linux.

I have uploaded some screenshots below, if you have any ideas please let me know.

I have updated this with the log I get when using the make command. Perhaps the issue lies with the portions highlighted with bold font?

[ 0%] Built target G4zlib
[ 0%] Built target ptl-shared
[ 2%] Built target G4global
[ 2%] Built target G4gl2ps
[ 3%] Built target G4intercoms
[ 3%] Automatic MOC for target G4interfaces
[ 3%] Built target G4interfaces_autogen
[ 4%] Built target G4materials
[ 4%] Built target G4graphics_reps
[ 6%] Built target G4analysis
[ 7%] Built target G4interfaces
[ 15%] Built target G4geometry
[ 20%] Built target G4particles
[ 21%] Built target G4track
[ 24%] Built target G4digits_hits
[ 80%] Built target G4processes
[ 81%] Built target G4parmodels
[ 81%] Built target G4tracking
[ 82%] Built target G4event
[ 83%] Built target G4run
[ 83%] Built target G4readout
[ 83%] Built target G4tasking
[ 84%] Built target G4error_propagation
[ 87%] Built target G4modeling
[ 88%] Built target G4persistency
[ 89%] Built target G4vis_management
[ 89%] Automatic MOC for target G4OpenGL
[ 89%] Built target G4FR
[ 90%] Built target G4visXXX
[ 90%] Built target G4VRML
[ 90%] Built target G4Tree
[ 90%] Built target G4OpenGL_autogen
[ 91%] Built target G4visHepRep
[ 92%] Built target G4RayTracer
[ 92%] Built target G4GMocren
[ 93%] Built target G4OpenGL
[100%] Built target G4physicslists

the error message in your screenshot:

Can not open a macro file. Set macro path with "/control/macroPath" if needed.

The line above the error message:

/control/execute Macro/init_beam.mac

you seem to be missing a folder with name “Macro”, containing the file “init_beam.mac”…

EDIT: I think you are right about the init_beam.mac file but the G4Exception-Start warnings and GUI issues are occurring with all examples. I can’t seem to get the toolbar to load above.

did you find the missing file, or is it still missing for all examples? Reading further I see “Batch is interrupted” - so maybe some commands are not executed (yet) due to the missing file?

In your screenshot, I see all the icons in the toolbar for the lines that you highlighted :slight_smile:

Hey Weller,

I followed what you mentioned and figured out the GUI mac file was wrong and should have stated /control/execute Macro/init_parameters.mac as init_beam.mac didn’t exist.

Changed this and the simulation now works with the toolbar, and hasn’t presented errors. The toolbar I meant was displayed on top and allows you to easily change settings in this example, can see it here as I can’t upload more screenshots

I’ll try and see if the other examples have their own errors that need to be fixed.

edit: glad it works :slight_smile:

the command that was probably skipped was the line “/control/execute Macro/GUI/gui.mac”…

Yes, well hopefully I can get around to building all the examples and then using it to do my own thing.