Trying to use geant4_vmc

Dear Root (especially vmc) experts,

As a beginner, following the web page & README’s in codes, I have installed and built successfully:

  • geant3 (version 1.10 with -DWITHBOTH in cxx flags)
  • geant4 (version geant4.9.2(.p01))
  • vgm (version 3.02)
  • geant4_vmc (version 2.6) (with also examples buildind)

All is considered within root 5.23/02 framework built with g4root and pythia6 expected requirememts.

When I tryed to run examples (E01,E02,E03…), .x run_g3.C works fine :slight_smile: but .x run_g4.C leads to a crash like:

Loading Geant4 libraries ... Loading VGM libraries ... Loading G4root library ... Loading geant4vmc library ... dlopen error: ~myhome/geant4_vmc/lib/tgt_linuxx8664gcc/ undefined symbol: G3Vol Load Error: Failed to load Dynamic link library ~myhome/geant4_vmc/lib/tgt_linuxx8664gcc/

I have checked G4LIB_USE_G3TOG4, G4INSTALL, … various LD_LIBRAIRY_PATH, recompiled, all seems to be correctly set (at least as the web-list requires)

Many thanks in advance for any help !


The missing symbol is defined in libG3toG4.
Could you check that this library is present in

If it is present, check that it is also loaded to Root by
modifying the macro g4libs.C,
which is in geant4_vmc/examples/macros,
by uncommenting the lines following the comment line
// Uncomment to debug
inside the method
void HandleLinkLine(…).
This will print all Geant4 libraries which are loaded.

You can also try to use the old version, g4libs_old.C,
by changing the macro name in run_g4.C macro:


Thanks for the quick answer,

As you have suggested, due to some corrupted links, some libraries were not seen …
After some cleaning, now it works !, at least with the _old config file (modifying the granular/global call)
I have now to understand why, with the ‘uptodate’ one, I obtain:

sh: /myhome/geant4.9.2.p01/lib// No such file or directory
Loading Geant4 libraries ...
Loading VGM libraries ...
dlopen error: /myhomeVMC/vgm.3.02/lib/Linux-g++/ undefined symbol: _ZTI11G4PVReplica

even if exists at the quoted location… (maybe the the additionnal /…?)



There should be $G4SYSTEM content in between the two slashes in the path to Was G4SYSTEM variable set when you run the macro?



Many thanks !

This was missing, All is OK now.

Best regards,